'ComplexBuildCollideCheckClient' not suitable for this, due to missing context (looks into wrong varinats array); returns 'true' if collision does not block action
354{
356 {
357 }
358
360 {
361 m_InfoData =
new ActionInfoDataConstructionImpossible();
362 }
363
365 {
368 }
369
371 {
372 return false;
373 }
374
376 {
377 return true;
378 }
379
381 {
384 if (part)
385 {
387 if (overrideText ==
string.
Empty)
389 else
391
392 #ifdef DIAG_DEVELOPER
394 {
396 }
397 #endif
398 }
399
400 }
401
403 {
406 return false;
407
408 if (player.IsPlacingLocal() || player.IsPlacingServer())
409 return false;
410
411
412 if (player.GetBrokenLegs() ==
eBrokenLegs.BROKEN_LEGS)
413 return false;
414
415 if (!ent.CanUseConstruction() || !ent.CanUseConstructionBuild())
416 return false;
417
418 if ((!
GetGame().IsDedicatedServer()))
419 {
421 {
423 }
424 }
425
426 return false;
427 }
428
430 {
431 return false;
432 }
433
435 {
437
440 {
441 ActionInfoDataConstructionImpossible info = ActionInfoDataConstructionImpossible.Cast(
m_InfoData);
445 construction.CanBuildPartEx(part.
GetPartName(), item, info.m_InfoContextMask);
446 info.SetConstructionPart(part);
447 info.SetTool(item);
448
449 #ifdef DIAG_DEVELOPER
451 DbgPrint(construction, info, target.GetComponentIndex());
452 #endif
453
456
457 return info.CanDisplayInfo();
458 }
459
460 return false;
461 }
462
463 #ifdef DIAG_DEVELOPER
464 void DbgPrint(notnull
ConstructionBase construction, ActionInfoDataConstructionBase info,
int componentIdx)
465 {
466 int failureMask = info.m_InfoContextMask;
469
470 if (failureMask == 0)
471 {
472 ConstructionDebug.RemoveBuildPartInfoData(partName);
473 }
474 else
475 {
476 string conflictingPart;
478 construction.HasConflictPart(partName, conflictingPart);
479
480 string missingSlot;
481 float missingQty;
483 construction.HasMaterialsEx(partName, false, missingSlot, missingQty);
484
486 string badToolType = "hands";
488 badToolType = tool.GetType();
489
490 ActionInfoDebugData data = new ActionInfoDebugData();
491 data.partName = partName;
492 data.componentIdx = componentIdx;
493 data.failureMask = failureMask;
494 data.conflictingPart = conflictingPart;
495 data.missingSlot = missingSlot;
496 data.missingQty = missingQty;
497 data.badToolType = badToolType;
498
499 ConstructionDebug.AddBuildPartInfoData(data);
500 }
501 }
502 #endif
503
506 {
512
513 if (!part)
514 {
517 }
518 else
519 {
522 return false;
523
524 if (!construction.ConstructionDirectionCheck(player, part, EConstructionDirCheckType.INDOORS))
525 return false;
526 if (!construction.ConstructionInsiderBoxCheck(player, part))
527 return false;
528 if (player.GetInputController().CameraIsFreeLook())
529 return false;
530
531 if (baseBuilding)
532 {
533 bool boo;
535 return false;
536 }
537
538 if (player.IsPlacingLocal() || player.IsPlacingServer())
539 return false;
540
543
544 return !construction.IsCollidingEx(checkData);
545 }
546
547 return false;
548 }
549}
550
551
553{
555 {
556 return ContinuousInteractActionInput;
557 }
558}
560
562{
564
566 {
568 }
569
571 {
572 return true;
573 }
574}
575
578{
581
583 {
585 }
586
588 {
590 }
591
593 {
595 }
596
598 {
600 }
601}
602
605{
606}
607
609class ActionInfoDataConstructionImpossible: ActionInfoDataConstructionBase
610{
612 {
613 bool forceHide = false;
618 bool show = true;
619
620
621
622 return super.CanDisplayInfo() && !forceHide && show;
623 }
624}
ref ActionInfoDataBase m_InfoData
ref CCIBase m_ConditionItem
ref CCTBase m_ConditionTarget
void SetConstructionPart(ConstructionPart part)
ActionInfoDataConstructionPossible ActionInfoDataConstructionBase CanDisplayInfo()
visible only under specific conditions
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
class ActionInfoDataBase m_Tool
not intended for direct use
override bool ActionConditionContinue(ActionData action_data)
void SetTool(ItemBase tool)
override bool CanBeStarted()
bool GatherInfoData(PlayerBase player, ActionTarget target, ItemBase item)
override void CreateConditionComponents()
override void OnActionInfoUpdate(PlayerBase player, ActionTarget target, ItemBase item)
bool SimplifiedCollisionInfoCheck(PlayerBase player, ActionTarget target, ItemBase item)
'ComplexBuildCollideCheckClient' not suitable for this, due to missing context (looks into wrong vari...
override void InitInfoData()
ConstructionPart GetConstructionPart()
void ActionConstructionPartInfoContinuous()
void ActionTarget(Object object, Object parent, int componentIndex, vector cursorHitPos, float utility, string surfaceName="")
void ConstructionBase(EntityAI parent)
void CollisionCheckData()
EConstructionInfoCategories
void ConstructionPart(string name, string part_name, string main_part_name, int id, bool is_built, bool is_base, bool is_gate, array< string > required_parts)
class GP5GasMask extends MaskBase ItemBase
void ActionInfoDataBase()
override bool PerformRoofCheckForBase(string partName, PlayerBase player, out bool result)
override bool MustBeBuiltFromOutside()
Super root of all classes in Enforce script.
ConstructionPart GetBuildPartInfoAtIndex(int idx)
void SetTarget(Object target)
string GetBuildTextOverride()
Instanced construction part data classes for dynamic data, statics now stored on EntityType level in ...
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.