14 static const float DECONSTURCT_MATERIAL_LOSS = 0.2;
56 if ( constrution_part )
59 constrution_part.SetBuiltState(
true );
67 if ( constrution_part )
69 if (
LogManager.IsBaseBuildingLogEnable())
bsbDebugPrint(
"[bsb] Construction " +
Object.GetDebugName(
m_Parent) +
" RemoveFromConstructedParts part=" + constrution_part.GetPartName());
70 constrution_part.SetBuiltState(
false );
80 if (DamageSystem.GetDamageZoneFromComponentName(GetParent(),part_name,damage_zone))
82 GetParent().SetAllowDamage(
true);
83 GetParent().SetHealthMax(damage_zone);
94 GetParent().OnPartBuiltServer( player, part_name, action_id );
101 DamageSystem.GetDamageZoneFromComponentName( GetParent(),part_name,damage_zone );
103 if (
LogManager.IsBaseBuildingLogEnable())
bsbDebugPrint(
"[bsb] Construction DismantlePartServer | " + part_name);
111 GetParent().OnPartDismantledServer( player, part_name, action_id );
121 void DestroyPartServer( Man player,
string part_name,
int action_id,
bool destroyed_by_connected_part =
false )
123 if (
LogManager.IsBaseBuildingLogEnable())
bsbDebugPrint(
"[bsb] Construction DestroyPartServer | " + part_name);
131 GetParent().OnPartDestroyedServer( player, part_name, action_id, destroyed_by_connected_part );
135 if ( DamageSystem.GetDamageZoneFromComponentName(GetParent(),part_name,damage_zone) && GetParent().GetHealth(damage_zone,
"Health") > 0 )
137 GetParent().SetHealth(damage_zone,
"Health",0);
147 for (
int i = 0; i < parts.Count(); i++)
149 if (
LogManager.IsBaseBuildingLogEnable())
bsbDebugPrint(
"[bsb] Construction DestroyConnectedParts | " + parts.Get(i));
181 if ( value.IsBuilt() )
195 if ( value.IsBuilt() )
215 if ( value.IsBuilt() )
239 string construction_path =
"cfgVehicles" +
" " + GetParent().GetType() +
" " +
"Construction";
241 if (
GetGame().ConfigIsExisting( construction_path ) )
244 for (
int i = 0; i <
GetGame().ConfigGetChildrenCount( construction_path ); ++i )
246 string main_part_name;
247 GetGame().ConfigGetChildName( construction_path, i, main_part_name );
248 string part_path = construction_path +
" " + main_part_name;
251 for (
int j = 0; j <
GetGame().ConfigGetChildrenCount( part_path ); ++j )
254 GetGame().ConfigGetChildName( part_path, j, part_name );
257 GetGame().ConfigGetTextRaw( part_path +
" " + part_name +
" " +
"name",
name );
259 bool show_on_init =
GetGame().ConfigGetInt( part_path +
" " + part_name +
" " +
"show_on_init" );
260 int id =
GetGame().ConfigGetInt( part_path +
" " + part_name +
" " +
"id" );
261 bool is_base =
GetGame().ConfigGetInt( part_path +
" " + part_name +
" " +
"is_base" );
262 bool is_gate =
GetGame().ConfigGetInt( part_path +
" " + part_name +
" " +
"is_gate" );
266 if (
LogManager.IsBaseBuildingLogEnable())
bsbDebugPrint(
"[bsb] Construction name=" +
name +
" part_name=" + part_name +
" show=" + show_on_init +
" base=" + is_base +
" gate=" + is_gate);
309 string cfg_path =
"cfgVehicles" +
" " + GetParent().GetType() +
" "+
"Construction" +
" " + main_part_name +
" " + part_name +
" " +
"Materials";
311 if (
GetGame().ConfigIsExisting( cfg_path ) )
313 int child_count =
GetGame().ConfigGetChildrenCount( cfg_path );
315 for (
int i = 0; i < child_count; i++ )
318 GetGame().ConfigGetChildName( cfg_path, i, child_name );
323 config_path = cfg_path +
" " + child_name +
" " +
"slot_name";
324 GetGame().ConfigGetText( config_path, slot_name );
325 config_path = cfg_path +
" " + child_name +
" " +
"quantity";
326 float quantity =
GetGame().ConfigGetFloat( config_path );
327 config_path = cfg_path +
" " + child_name +
" " +
"lockable";
328 bool lockable =
GetGame().ConfigGetInt( config_path );
330 ItemBase attachment =
ItemBase.Cast( GetParent().FindAttachmentBySlotName( slot_name ) );
331 if (attachment.IsRuined())
341 construction_parts.Clear();
351 if ( main_part_name == value.GetMainPartName() &&
CanBuildPart( value.GetPartName(), tool, use_tool ) )
353 construction_parts.Insert( value );
356 if ( main_part_name == value.GetPartName() )
358 part_name = value.GetMainPartName();
362 if( construction_parts.Count() == 0 && part_name )
369 if ( part_name == value.GetMainPartName() &&
CanBuildPart( value.GetPartName(), tool, use_tool ) )
371 construction_parts.Insert( value );
385 if ( value.IsBase() )
402 if ( value.IsGate() )
415 string cfg_path =
"cfgVehicles" +
" " + GetParent().GetType() +
" "+
"Construction" +
" " + main_part_name +
" " + part_name +
" " +
"required_parts";
418 GetGame().ConfigGetTextArray( cfg_path, required_parts );
421 for (
int i = 0; i < required_parts.Count(); ++i )
441 string cfg_path =
"cfgVehicles" +
" " + GetParent().GetType() +
" "+
"Construction" +
" " + main_part_name +
" " + part_name +
" " +
"conflicted_parts";
443 GetGame().ConfigGetTextArray( cfg_path, conflict_parts );
446 for (
int i = 0; i < conflict_parts.Count(); i++ )
486 if ( construction_part.IsBuilt() )
488 if ( construction_part.GetRequiredParts().Find( part_name ) > -1 )
510 if ( construction_part.IsBuilt() && construction_part.GetRequiredParts() && construction_part.GetRequiredParts().Find( part_name ) > -1 )
512 if ( !dependent_parts )
517 if ( !recurs || (recurs.Find(
name) == -1 ) )
519 dependent_parts.Insert(
name);
542 return dependent_parts;
548 string cfg_path =
"cfgVehicles" +
" " + GetParent().GetType() +
" " +
"Construction" +
" " + main_part_name +
" " + part_name +
" " +
"required_parts";
550 GetGame().ConfigGetTextArray( cfg_path, required_parts );
552 return required_parts;
580 if (
LogManager.IsBaseBuildingLogEnable())
bsbDebugPrint(
"[bsb] Construction ShowConstructionPart - " + part_name);
581 GetParent().SetAnimationPhase( part_name, 0 );
586 if (
LogManager.IsBaseBuildingLogEnable())
bsbDebugPrint(
"[bsb] Construction HideConstructionPart - " + part_name);
587 GetParent().SetAnimationPhase( part_name, 1 );
593 GetParent().AddProxyPhysics( part_name );
598 GetParent().RemoveProxyPhysics( part_name );
605 if ( construction_part && construction_part.IsBuilt() )
620 string cfg_path =
"cfgVehicles" +
" " + GetParent().GetType() +
" "+
"Construction" +
" " + main_part_name +
" " + part_name +
" " +
"Materials";
622 if (
GetGame().ConfigIsExisting( cfg_path ) )
624 int child_count =
GetGame().ConfigGetChildrenCount( cfg_path );
626 for (
int i = 0; i < child_count; i++ )
629 GetGame().ConfigGetChildName( cfg_path, i, child_name );
632 string material_path;
635 material_path = cfg_path +
" " + child_name +
" " +
"slot_name";
636 GetGame().ConfigGetText( material_path, slot_name );
637 material_path = cfg_path +
" " + child_name +
" " +
"quantity";
638 quantity =
GetGame().ConfigGetFloat( material_path );
643 quantity =
Math.Max(
Math.Floor(quantity),1);
660 ItemBase attachment =
ItemBase.Cast( GetParent().FindAttachmentBySlotName( slot_name ) );
662 if ( attachment && attachment.GetQuantity() >= quantity )
674 string cfg_path =
"cfgVehicles" +
" " + GetParent().GetType() +
" "+
"Construction" +
" " + main_part_name +
" " + part_name +
" " +
"Materials";
676 if (
GetGame().ConfigIsExisting( cfg_path ) )
678 int child_count =
GetGame().ConfigGetChildrenCount( cfg_path );
680 for (
int i = 0; i < child_count; i++ )
683 GetGame().ConfigGetChildName( cfg_path, i, child_name );
688 config_path = cfg_path +
" " + child_name +
" " +
"slot_name";
689 GetGame().ConfigGetText( config_path, slot_name );
690 config_path = cfg_path +
" " + child_name +
" " +
"quantity";
691 float quantity =
GetGame().ConfigGetFloat( config_path );
692 config_path = cfg_path +
" " + child_name +
" " +
"lockable";
693 bool lockable =
GetGame().ConfigGetInt( config_path );
695 ItemBase attachment =
ItemBase.Cast( GetParent().FindAttachmentBySlotName( slot_name ) );
700 attachment.GetInventory().GetCurrentInventoryLocation( inventory_location );
702 GetParent().GetInventory().SetSlotLock( inventory_location.GetSlot(),
true );
711 quantity =
Math.Max(
Math.Floor(quantity),1);
714 attachment.AddQuantity( -quantity );
718 GetGame().ObjectDelete( attachment );
729 bool is_base = construction_part.IsBase();
730 string main_part_name = construction_part.GetMainPartName();
731 string cfg_path =
"cfgVehicles" +
" " + GetParent().GetType() +
" "+
"Construction" +
" " + main_part_name +
" " + part_name +
" " +
"Materials";
733 if (
GetGame().ConfigIsExisting( cfg_path ) )
743 string main_part_name = cPart.GetMainPartName();
744 string cfg_path =
"cfgVehicles" +
" " + GetParent().GetType() +
" "+
"Construction" +
" " + main_part_name +
" " + part_name +
" " +
"Materials";
746 if (
GetGame().ConfigIsExisting( cfg_path ) )
748 int child_count =
GetGame().ConfigGetChildrenCount( cfg_path );
750 for (
int i = 0; i < child_count; i++ )
753 GetGame().ConfigGetChildName( cfg_path, i, child_name );
759 config_path = cfg_path +
" " + child_name +
" " +
"type";
760 GetGame().ConfigGetText( config_path, type );
761 config_path = cfg_path +
" " + child_name +
" " +
"slot_name";
762 GetGame().ConfigGetText( config_path, slot_name );
763 config_path = cfg_path +
" " + child_name +
" " +
"quantity";
764 float quantity =
GetGame().ConfigGetFloat( config_path );
765 config_path = cfg_path +
" " + child_name +
" " +
"lockable";
766 bool lockable =
GetGame().ConfigGetInt( config_path );
769 ItemBase attachment =
ItemBase.Cast( GetParent().FindAttachmentBySlotName( slot_name ) );
777 attachment.GetInventory().GetCurrentInventoryLocation( inventory_location );
778 if (
LogManager.IsBaseBuildingLogEnable())
bsbDebugPrint(
"[bsb] " +
Object.GetDebugName(GetParent()) +
" DestroyMaterialsServer unlock slot=" + inventory_location.GetSlot());
780 GetParent().GetInventory().SetSlotLock( inventory_location.GetSlot() ,
false );
781 GetGame().ObjectDelete( attachment );
792 string cfg_path =
"cfgVehicles" +
" " + GetParent().GetType() +
" " +
"Construction" +
" " + construction_part.GetMainPartName() +
" " + construction_part.GetPartName() +
" " +
"platform_support";
793 string platform_support;
795 if (
GetGame().ConfigIsExisting( cfg_path ) )
797 GetGame().ConfigGetText( cfg_path, platform_support );
800 if ( platform_support.Length() > 0 || construction_part.IsBase() )
802 string at_cfg_path =
"cfgVehicles" +
" " + GetParent().GetType() +
" "+
"GUIInventoryAttachmentsProps";
804 if (
GetGame().ConfigIsExisting( at_cfg_path ) )
806 int child_count =
GetGame().ConfigGetChildrenCount( at_cfg_path );
808 for (
int i = 0; i < child_count; i++ )
811 GetGame().ConfigGetChildName( at_cfg_path, i, child_name );
812 child_name.ToLower();
814 if ( child_name.Contains( platform_support ) )
817 GetGame().ConfigGetTextArray( at_cfg_path +
" " + child_name +
" " +
"attachmentSlots", attachment_slots );
819 for (
int j = 0; j < attachment_slots.Count(); ++j )
822 ItemBase attachment =
ItemBase.Cast( GetParent().FindAttachmentBySlotName( attachment_slots.Get( j ) ) );
828 attachment.GetInventory().GetCurrentInventoryLocation( inventory_location );
829 if (
LogManager.IsBaseBuildingLogEnable())
bsbDebugPrint(
"[bsb] " +
Object.GetDebugName(GetParent()) +
" DropNonUsableMaterials UNlocking slot=" + inventory_location.GetSlot());
832 GetParent().GetInventory().SetSlotLock( inventory_location.GetSlot() ,
false );
838 int quantity_max = attachment.GetTargetQuantityMax(-1);
841 attachment.GetTransform(mat);
843 if ( parent.MemoryPointExists(
"" + part_name +
"_materials") )
845 vector destination = parent.GetMemoryPointPos(
"" + part_name +
"_materials");
846 destination =
GetGame().ObjectModelToWorld(parent,destination);
847 float health = attachment.GetHealth(
"",
"Health");
848 float quantity = attachment.GetQuantity() - 1;
852 inventory_location.GetDir(dir);
853 dst.SetGroundEx(attachment,destination,dir);
858 MiscGameplayFunctions.GetHeadBonePos(
PlayerBase.Cast(player),posHead);
859 MiscGameplayFunctions.CreateItemBasePilesDispersed(attachment.GetType(),posHead,destination,
UAItemsSpreadRadius.NARROW,quantity,health,player);
863 MiscGameplayFunctions.CreateItemBasePiles(attachment.GetType(),destination,quantity,health,
true);
865 attachment.AddQuantity( -quantity );
869 dst.SetGround(attachment,mat);
871 for (
int k = attachment.GetQuantity(); k > quantity_max; )
878 MiscGameplayFunctions.TransferItemProperties( attachment, new_item );
879 attachment.AddQuantity( -quantity_max );
880 new_item.SetQuantity( quantity_max );
887 if (attachment.GetQuantity() > 0)
889 if (
GetGame().IsMultiplayer() )
914 string cfg_path =
"cfgVehicles" +
" " + GetParent().GetType() +
" "+
"Construction" +
" " + main_part_name +
" " + part_name +
" " +
"Materials";
916 if (
GetGame().ConfigIsExisting( cfg_path ) )
918 int child_count =
GetGame().ConfigGetChildrenCount( cfg_path );
920 for (
int i = 0; i < child_count; i++ )
923 GetGame().ConfigGetChildName( cfg_path, i, child_name );
929 config_path = cfg_path +
" " + child_name +
" " +
"type";
930 GetGame().ConfigGetText( config_path, type );
931 config_path = cfg_path +
" " + child_name +
" " +
"slot_name";
932 GetGame().ConfigGetText( config_path, slot_name );
933 config_path = cfg_path +
" " + child_name +
" " +
"quantity";
934 float quantity =
GetGame().ConfigGetFloat( config_path );
935 config_path = cfg_path +
" " + child_name +
" " +
"lockable";
936 bool lockable =
GetGame().ConfigGetInt( config_path );
939 ItemBase attachment =
ItemBase.Cast( GetParent().FindAttachmentBySlotName( slot_name ) );
947 attachment.GetInventory().GetCurrentInventoryLocation( inventory_location );
948 if (
LogManager.IsBaseBuildingLogEnable())
bsbDebugPrint(
"[bsb] " +
Object.GetDebugName(GetParent()) +
" SetLockOnAttachedMaterials lock=" + lock_slot +
" slot=" + inventory_location.GetSlot());
949 GetParent().GetInventory().SetSlotLock( inventory_location.GetSlot(), lock_slot );
962 string part_cfg_path =
"cfgVehicles" +
" " + GetParent().GetType() +
" "+
"Construction" +
" " + construction_part.GetMainPartName() +
" " + construction_part.GetPartName() +
" " +
"build_action_type";
963 if (
GetGame().ConfigIsExisting( part_cfg_path ) )
965 int part_build_action_type =
GetGame().ConfigGetInt( part_cfg_path );
966 string tool_cfg_path =
"cfgVehicles" +
" " + tool.GetType() +
" " +
"build_action_type";
968 if (
GetGame().ConfigIsExisting( tool_cfg_path ) )
970 int tool_build_action_type =
GetGame().ConfigGetInt( tool_cfg_path );
972 if ( ( part_build_action_type & tool_build_action_type ) > 0 )
985 string part_cfg_path =
"cfgVehicles" +
" " + GetParent().GetType() +
" "+
"Construction" +
" " + construction_part.GetMainPartName() +
" " + construction_part.GetPartName() +
" " +
"dismantle_action_type";
986 if (
GetGame().ConfigIsExisting( part_cfg_path ) )
988 int part_dismantle_action_type =
GetGame().ConfigGetInt( part_cfg_path );
989 string tool_cfg_path =
"cfgVehicles" +
" " + tool.GetType() +
" " +
"dismantle_action_type";
991 if (
GetGame().ConfigIsExisting( tool_cfg_path ) )
993 int tool_dismantle_action_type =
GetGame().ConfigGetInt( tool_cfg_path );
995 if ( ( part_dismantle_action_type & tool_dismantle_action_type ) > 0 )
1008 string part_cfg_path =
"cfgVehicles" +
" " + GetParent().GetType() +
" "+
"Construction" +
" " + construction_part.GetMainPartName() +
" " + construction_part.GetPartName() +
" " +
"material_type";
1009 if (
GetGame().ConfigIsExisting( part_cfg_path ) )
1011 return GetGame().ConfigGetInt( part_cfg_path );
1027 if ( construction_part )
1030 float absolute_ofset = 0.05;
1036 excluded_objects.Insert( GetParent() );
1042 center = GetParent().ModelToWorld( center );
1050 if (
GetGame().IsBoxCollidingGeometry(
Vector( center[0], center[1] + absolute_ofset, center[2] ), GetParent().
GetOrientation(), edge_length, ObjIntersectView, ObjIntersectGeom, excluded_objects, collided_objects ) )
1055 for (
int i = 0; i < collided_objects.Count(); i++)
1076 if ( construction_part )
1079 float absolute_ofset = 0.05;
1085 excluded_objects.Insert( GetParent() );
1086 if (check_data.m_AdditionalExcludes.Count() > 0)
1088 excluded_objects.InsertAll(check_data.m_AdditionalExcludes);
1093 center = GetParent().ModelToWorld( center );
1096 if (
GetGame().IsBoxCollidingGeometry(
Vector( center[0], center[1] + absolute_ofset, center[2] ), GetParent().
GetOrientation(), edge_length, check_data.m_PrimaryGeometry, check_data.m_SecondaryGeometry, excluded_objects, collided_objects ) )
1100 for (
int i = 0; i < collided_objects.Count(); i++)
1117 box_size[0] =
Math.AbsFloat( min_max[1][0] - min_max[0][0] );
1118 box_size[1] =
Math.AbsFloat( min_max[1][1] - min_max[0][1] );
1119 box_size[2] =
Math.AbsFloat( min_max[1][2] - min_max[0][2] );
1128 string cfg_path =
"cfgVehicles" +
" " + GetParent().GetType() +
" "+
"Construction" +
" " + main_part_name +
" " + part_name +
" " +
"collision_data";
1130 GetGame().ConfigGetTextArray( cfg_path, collision_data );
1132 if ( collision_data.Count() > 0 )
1134 if ( GetParent().MemoryPointExists( collision_data[0] ) )
1136 min_max[0] = GetParent().GetMemoryPointPos( collision_data[0] );
1138 if ( GetParent().MemoryPointExists( collision_data[1] ) )
1140 min_max[1] = GetParent().GetMemoryPointPos( collision_data[1] );
1150 center[0] = ( min_max[1][0] - min_max[0][0] ) / 2;
1151 center[1] = ( min_max[1][1] - min_max[0][1] ) / 2;
1152 center[2] = ( min_max[1][2] - min_max[0][2] ) / 2;
1153 center =
Vector( min_max[1][0] - center[0], min_max[1][1] - center[1], min_max[1][2] - center[2] );
1161 extents[0][0] = -egde_length[0] / 2;
1162 extents[0][1] = -egde_length[1] / 2;
1163 extents[0][2] = -egde_length[2] / 2;
1164 extents[1][0] = egde_length[0] / 2;
1165 extents[1][1] = egde_length[1] / 2;
1166 extents[1][2] = egde_length[2] / 2;
1175 GetParent().GetTransform( mat );
1233 static void SpawnConstructionMaterialPiles(notnull
EntityAI entity, Man player,
string cfg_path,
string main_part_name,
string damagezone_name =
"",
bool is_base =
false )
1235 int child_count =
GetGame().ConfigGetChildrenCount( cfg_path );
1237 for (
int i = 0; i < child_count; i++ )
1240 GetGame().ConfigGetChildName( cfg_path, i, child_name );
1246 config_path = cfg_path +
" " + child_name +
" " +
"type";
1247 GetGame().ConfigGetText( config_path, type );
1248 config_path = cfg_path +
" " + child_name +
" " +
"slot_name";
1249 GetGame().ConfigGetText( config_path, slot_name );
1250 config_path = cfg_path +
" " + child_name +
" " +
"quantity";
1251 float quantity =
GetGame().ConfigGetFloat( config_path );
1252 config_path = cfg_path +
" " + child_name +
" " +
"lockable";
1253 bool lockable =
GetGame().ConfigGetInt( config_path );
1256 ItemBase attachment =
ItemBase.Cast( entity.FindAttachmentBySlotName( slot_name ) );
1265 attachment.GetInventory().GetCurrentInventoryLocation( src );
1266 if (
LogManager.IsBaseBuildingLogEnable())
bsbDebugPrint(
"[bsb] " +
Object.GetDebugName( entity) +
" DropNonUsableMaterials UNlocking slot=" + src.GetSlot() );
1267 entity.GetInventory().SetSlotLock( src.GetSlot() ,
false );
1272 if (
GetGame().IsMultiplayer() && player )
1276 player.ServerTakeToDst( src, dst );
1280 entity.GetInventory().DropEntity(
InventoryMode.PREDICTIVE, entity, attachment );
1289 vector destination = entity.GetPosition();
1291 if ( entity.MemoryPointExists(
"" + main_part_name +
"_materials") )
1293 destination = entity.GetMemoryPointPos(
"" + main_part_name +
"_materials");
1294 destination =
GetGame().ObjectModelToWorld(entity,destination);
1296 else if ( entity.MemoryPointExists(main_part_name) )
1298 destination = entity.GetMemoryPointPos(main_part_name);
1299 destination =
GetGame().ObjectModelToWorld(entity,destination);
1301 pile_health = entity.GetHealth01(damagezone_name,
"Health") * MiscGameplayFunctions.GetTypeMaxGlobalHealth(type);
1302 qty_coef = 1 - (entity.GetHealthLevel(damagezone_name) *
Construction.DECONSTURCT_MATERIAL_LOSS) -
Construction.DECONSTURCT_MATERIAL_LOSS;
1303 quantity *= qty_coef;
1304 quantity =
Math.Max(
Math.Floor(quantity),1);
1309 MiscGameplayFunctions.GetHeadBonePos(
PlayerBase.Cast(player),posHead);
1310 MiscGameplayFunctions.CreateItemBasePilesDispersed(type,posHead,destination,
UAItemsSpreadRadius.NARROW,quantity,pile_health,player);
1314 MiscGameplayFunctions.CreateItemBasePiles(type,destination,quantity,pile_health,
true);
1342 void SetPartName(
string part_name )
1347 string GetPartName()
1354 super.UpdateInsiders( 20 );
1359 if ( GetInsiders().
Count() > 0 )
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
const int AT_DESTROY_PART
override string GetInvulnerabilityTypeString()
class BaseBuildingBase extends ItemBase bsbDebugPrint(string s)
const int ECE_PLACE_ON_SURFACE
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
void UpdateInsiders(int timeout)
override bool LocalTakeToDst(notnull InventoryLocation src, notnull InventoryLocation dst)
override bool ServerTakeToDst(notnull InventoryLocation src, notnull InventoryLocation dst)
override bool IsIgnoredByConstruction()
script counterpart to engine's class Inventory
static bool SetGroundPosByOwner(EntityAI owner, notnull EntityAI item, out InventoryLocation ground)
Trigger only accepting Object which IsMan()
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
void DropNonUsableMaterialsServer(Man player, string part_name)
void HideConstructionPartPhysics(string part_name)
bool CanDestroyPart(string part_name)
vector GetBoxCenter(vector min_max[2])
bool CanBuildPart(string part_name, ItemBase tool, bool use_tool)
void DrawDebugCollisionBox(vector min_max[2], int color)
void BuildPartServer(notnull Man player, string part_name, int action_id)
bool IsCollidingEx(CollisionCheckData check_data)
Collision check for building part.
ConstructionPart GetBaseConstructionPart()
ConstructionPart GetConstructionPartToDestroy(string part_name)
bool HasMaterials(string part_name, bool repairing=false)
vector GetCollisionBoxSize(vector min_max[2])
void GetCollisionBoxData(string part_name, out vector min_max[2])
array< string > GetRequiredParts(string part_name, string main_part_name)
class StaticConstructionMethods m_AdditionalExcludes
Data structure for passing parameters (extendable, modable)
bool MaterialIsRuined(string part_name)
bool HasConflictPart(string part_name)
ConstructionPart GetConstructionPartToDismantle(string part_name, ItemBase tool)
ConstructionPart GetConstructionPart(string part_name)
void GetTriggerExtents(vector min_max[2], out vector extents[2])
void ReceiveMaterialsServer(notnull Man player, string part_name, string damagezone_name)
void GetConstructionPartsToBuild(string main_part_name, out array< ConstructionPart > construction_parts, ItemBase tool, out string real_constructionTarget, bool use_tool)
void ShowConstructionPart(string part_name)
bool IsTriggerColliding()
void UpdateConstructionParts()
ConstructionMaterialType GetMaterialType(string part_name)
bool IsPartConstructed(string part_name)
void DestroyConnectedParts(string part_name)
void DestroyDebugCollisionBox()
bool CanUseToolToBuildPart(string part_name, ItemBase tool)
map< string, ref ConstructionPart > GetConstructionParts()
enum ConstructionMaterialType REPAIR_MATERIAL_PERCENTAGE
ConstructionBoxTrigger m_ConstructionBoxTrigger
bool HasDependentPart(string part_name)
void CollisionCheckData()
bool HasRequiredPart(string part_name)
void DestroyPartServer(Man player, string part_name, int action_id, bool destroyed_by_connected_part=false)
void DismantlePartServer(notnull Man player, string part_name, int action_id)
ConstructionPart GetGateConstructionPart()
void CreateCollisionTrigger(string part_name, vector min_max[2], vector center)
void AddToConstructedParts(string part_name)
array< string > GetValidDepenentPartsArray(string part_name, array< string > recurs=null)
void Construction(BaseBuildingBase parent)
void RemoveFromConstructedParts(string part_name)
void TakeMaterialsServer(string part_name, bool repairing=false)
bool CanUseToolToDismantlePart(string part_name, ItemBase tool)
bool ExceptionCheck(string part_name)
Exceptions from 'dependent parts' hierarchy are handled here.
ref map< string, ref ConstructionPart > m_ConstructionParts
bool IsColliding(string part_name)
void DestroyMaterialsServer(Man player, string part_name)
bool HasMaterialWithQuantityAttached(string slot_name, float quantity)
void SetLockOnAttachedMaterials(string part_name, bool lock_slot)
void DestroyCollisionTrigger()
void ShowConstructionPartPhysics(string part_name)
void HideConstructionPart(string part_name)
bool CanDismantlePart(string part_name, ItemBase tool)
void SetParent(Object parent_obj, int pivot)
Set parent of the Effect.
proto native CGame GetGame()
proto native vector Vector(float x, float y, float z)
Vector constructor from components.