9 m_InfoData =
new ActionInfoDataConstructionImpossible();
35 if (overrideText ==
string.
Empty)
56 if (player.IsPlacingLocal() || player.IsPlacingServer())
60 if (player.GetBrokenLegs() ==
eBrokenLegs.BROKEN_LEGS)
63 if (!ent.CanUseConstruction() || !ent.CanUseConstructionBuild())
66 if ((!
GetGame().IsDedicatedServer()))
89 ActionInfoDataConstructionImpossible info = ActionInfoDataConstructionImpossible.Cast(
m_InfoData);
93 construction.CanBuildPartEx(part.
GetPartName(), item, info.m_InfoContextMask);
94 info.SetConstructionPart(part);
99 DbgPrint(construction, info, target.GetComponentIndex());
105 return info.CanDisplayInfo();
111 #ifdef DIAG_DEVELOPER
112 void DbgPrint(notnull
ConstructionBase construction, ActionInfoDataConstructionBase info,
int componentIdx)
114 int failureMask = info.m_InfoContextMask;
118 if (failureMask == 0)
120 ConstructionDebug.RemoveBuildPartInfoData(partName);
124 string conflictingPart;
126 construction.HasConflictPart(partName, conflictingPart);
131 construction.HasMaterialsEx(partName,
false, missingSlot, missingQty);
134 string badToolType =
"hands";
136 badToolType = tool.GetType();
138 ActionInfoDebugData data =
new ActionInfoDebugData();
139 data.partName = partName;
140 data.componentIdx = componentIdx;
141 data.failureMask = failureMask;
142 data.conflictingPart = conflictingPart;
143 data.missingSlot = missingSlot;
144 data.missingQty = missingQty;
145 data.badToolType = badToolType;
147 ConstructionDebug.AddBuildPartInfoData(data);
172 if (!construction.ConstructionDirectionCheck(player, part, EConstructionDirCheckType.INDOORS))
174 if (!construction.ConstructionInsiderBoxCheck(player, part))
176 if (player.GetInputController().CameraIsFreeLook())
186 if (player.IsPlacingLocal() || player.IsPlacingServer())
192 return !construction.IsCollidingEx(checkData);
257class ActionInfoDataConstructionImpossible: ActionInfoDataConstructionBase
261 bool forceHide =
false;
270 return super.CanDisplayInfo() && !forceHide && show;
ref ActionInfoDataBase m_InfoData
ref CCIBase m_ConditionItem
ref CCTBase m_ConditionTarget
void SetConstructionPart(ConstructionPart part)
ActionInfoDataConstructionPossible ActionInfoDataConstructionBase CanDisplayInfo()
visible only under specific conditions
class ActionInfoDataBase m_Tool
not intended for direct use
void SetTool(ItemBase tool)
ConstructionPart GetConstructionPart()
void ActionTarget(Object object, Object parent, int componentIndex, vector cursorHitPos, float utility, string surfaceName="")
void ConstructionBase(EntityAI parent)
void CollisionCheckData()
EConstructionInfoCategories
class GP5GasMask extends MaskBase ItemBase
void ActionConstructionPartInfoContinuous()
override void OnActionInfoUpdate(PlayerBase player, ActionTarget target, ItemBase item)
override void InitInfoData()
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override bool ActionConditionContinue(ActionData action_data)
bool GatherInfoData(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 CreateConditionComponents()
override bool CanBeStarted()
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.