149 if (player && !player.IsPlacingLocal() && !player.IsPlacingServer())
152 if (
Class.
CastTo(targetEntity,target.GetObject()) && targetEntity.CanUseConstruction())
154 if (targetEntity.FindAttachmentBySlotName(
"Material_FPole_Flag"))
163 targetEntity.GetActionComponentNameList(target.GetComponentIndex(), compNames);
164 int count = compNames.Count();
165 for (
int i = 0; i < count; ++i)
167 partName = compNames[i];
168 constructionPart = construction.GetConstructionPartToDismantle(partName, item);
169 if (constructionPart)
173 if (constructionPart)
176 if (baseBuilding && constructionPart.
IsGate() && baseBuilding.
IsOpened())
187 #ifdef DIAG_DEVELOPER
190 DbgPrintFailure(constructionPart,
"essential attachment " + attachment.GetType() +
" attached in slot: " +
slotName);
199 bool checked =
false;
201 if (constructionPart.
IsBase())
204 if (!checked && targetEntity.IsPlayerInsideEx(player, partName))
211 if (targetEntity.IsFacingCamera(partName))
213 #ifdef DIAG_DEVELOPER
216 DbgPrintFailure(constructionPart,
"!IsFacingCamera");
228 if (!construction.ConstructionDirectionCheck(player, constructionPart, EConstructionDirCheckType.INDOORS))
230 #ifdef DIAG_DEVELOPER
233 DbgPrintFailure(constructionPart,
"ConstructionDirectionCheck failing, type: EConstructionDirCheckType.INDOORS");
240 if (constructionPart.
IsReversible() && (constructionPart.
IsReversedLocal() != construction.ConstructionDirectionCheck(player, constructionPart, EConstructionDirCheckType.REFERENCE_DIRECTION)))
242 #ifdef DIAG_DEVELOPER
245 DbgPrintFailure(constructionPart,
"ConstructionDirectionCheck failing, type: EConstructionDirCheckType.REFERENCE_DIRECTION");
251 if (!construction.ConstructionInsiderBoxCheck(player, constructionPart))
253 #ifdef DIAG_DEVELOPER
256 DbgPrintFailure(constructionPart,
"ConstructionInsiderBoxCheck failing");