145 for (
int i = 0;
i <
parts.Count();
i++)
751 string at_cfg_path =
"cfgVehicles" +
" " +
GetParent().GetType() +
" " +
"GUIInventoryAttachmentsProps";
792 if (parent.MemoryPointExists(
"" +
part_name +
"_materials"))
900 string tool_cfg_path =
"cfgVehicles" +
" " +
tool.GetType() +
" " +
"build_action_type";
921 string tool_cfg_path =
"cfgVehicles" +
" " +
tool.GetType() +
" " +
"dismantle_action_type";
1014 if (
check_data.m_AdditionalExcludes.Count() > 0)
1185 entity.GetInventory().SetSlotLock(
src.GetSlot(),
false);
1261 super.UpdateInsiders(20);
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 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)
static const float DECONSTURCT_MATERIAL_LOSS
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)
Set parent of the Effect.
static bool GetDisableIsCollidingCheck()
void UpdateInsiders(int timeout)
void SetPartName(string part_name)
static Shape DrawBox(vector pos1, vector pos2, int color=0x1fff7f7f)
override bool LocalTakeToDst(notnull InventoryLocation src, notnull InventoryLocation dst)
override bool ServerTakeToDst(notnull InventoryLocation src, notnull InventoryLocation dst)
script counterpart to engine's class Inventory
static bool SetGroundPosByOwner(EntityAI owner, notnull EntityAI item, out InventoryLocation ground)
static bool IsBaseBuildingLogEnable()
Trigger only accepting Object which IsMan()
static void SpawnConstructionMaterialPiles(notnull EntityAI entity, Man player, string cfg_path, string main_part_name, string damagezone_name="", bool is_base=false)
spawns material from any construction; 'player' parameter optional
void SetExtents(vector mins, vector maxs)
Set the size of the Trigger, avoid using SetCollisionBox directly.
array< ref TriggerInsider > GetInsiders()
Get the current TriggerInsider array, left for backwards compatibility, moved down from ManTrigger.
proto native CGame GetGame()
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto float Max(float x, float y)
Returns bigger of two given values.
static proto float Floor(float f)
Returns floor of value.
static proto float AbsFloat(float f)
Returns absolute value.