145 {
146 if (player && !player.IsPlacingLocal() && !player.IsPlacingServer())
147 {
148 Object targetObject = target.GetObject();
150 if (targetObject && targetObject.CanUseConstruction())
151 {
152
153 if (Class.CastTo(targetEntity, targetObject) && (targetEntity.FindAttachmentBySlotName("Att_CombinationLock") || targetEntity.FindAttachmentBySlotName("Material_FPole_Flag")) )
154 return false;
155
156 string partName = targetObject.GetActionComponentName(target.GetComponentIndex());
157
159 Construction construction = baseBuilding.GetConstruction();
160 ConstructionPart constructionPart = construction.GetConstructionPartToDismantle(partName, item);
161
162 if (constructionPart)
163 {
164
165
167 return false;
168
169
170 bool checked = false;
171
172 if (constructionPart.
IsBase())
173 checked = true;
174
176 {
177
178 if (camera_check)
179 {
181 {
183 return false;
184 }
185 }
186
187 checked = true;
188 }
189
190 if (checked)
191 {
192 ConstructionActionData constructionActionData = player.GetConstructionActionData();
194
195 return true;
196 }
197 }
198 }
199 }
200
201 return false;
202 }
void Construction(BaseBuildingBase parent)
override bool IsPlayerInside(PlayerBase player, string selection)
override bool IsFacingCamera(string selection)
void SetTargetPart(ConstructionPart target_part)
proto native CGame GetGame()