47 RegisterNetSyncVariableInt(
"m_State");
48 RegisterNetSyncVariableBool(
"m_IsEntrance");
49 RegisterNetSyncVariableBool(
"m_IsWindow");
50 RegisterNetSyncVariableBool(
"m_IsToggle");
51 RegisterNetSyncVariableInt(
"m_OpeningMask");
52 RegisterNetSyncVariableBool(
"m_IsBeingPacked");
67 return "disableContainerDamage";
98 super.OnStoreSave(ctx);
106 if (!super.OnStoreLoad(ctx, version))
113 Print(
"ERROR: no opening mask found! Default openinng settings initialized.");
141 super.RefreshPhysics();
155 super.OnItemLocationChanged(old_owner, new_owner);
157 if (new_owner || old_owner)
159 if (GetInventory().CountInventory() == 1)
166 super.OnVariablesSynchronized();
192 super.EEHealthLevelChanged(oldLevel,newLevel,zone);
198 MiscGameplayFunctions.DropAllItemsInInventoryInBounds(
this,
m_HalfExtents);
200 if (zone !=
"Body" && zone !=
"Inventory" && zone !=
"")
205 DamageSystem.GetComponentNamesFromDamageZone(
this,zone,selections);
206 for (
int j = 0; j < selections.Count(); j++)
208 if (selections.Get(j) !=
"")
210 RemoveProxyPhysics(selections.Get(j));
228 string cfg_path =
"cfgVehicles " +
GetType() +
" AnimationSources";
230 if (
GetGame().ConfigIsExisting(cfg_path))
233 string proxy_selection_name;
235 for (
int i = 0; i < selections; i++)
237 string selection_name;
241 SetAnimationPhase(selection_name, 1);
244 proxy_selection_name = selection_name;
245 proxy_selection_name.
ToLower();
248 RemoveProxyPhysics(proxy_selection_name);
261 if (!super.IsTakeable())
269 if (!super.CanPutIntoHands(parent))
279 if (!super.CanPutInCargo(parent))
289 if (!super.CanRemoveFromCargo(parent))
297 if (!super.CanRemoveFromHands(parent))
320 m_CamoNet = CamoNet.Cast(GetInventory().FindAttachment(slot_id_camo));
323 eai_xlights = GetInventory().FindAttachment(slot_id_xlights);
330 if (!IsKindOf(
"MediumTent"))
332 AddProxyPhysics(
"camonet");
338 SetAnimationPhase(
"Xlights", 0);
339 SetAnimationPhase(
"Xlights_glass_r", 0);
340 SetAnimationPhase(
"Xlights_glass_g", 0);
341 SetAnimationPhase(
"Xlights_glass_b", 0);
342 SetAnimationPhase(
"Xlights_glass_y", 0);
348 super.EEItemAttached(item, slot_name);
350 if (item.IsKindOf (
"CamoNet"))
356 if (!IsKindOf (
"MediumTent"))
358 AddProxyPhysics(
"camonet");
362 if (item.IsKindOf (
"XmasLights"))
364 SetAnimationPhase(
"Xlights", 0);
365 SetAnimationPhase(
"Xlights_glass_r", 0);
366 SetAnimationPhase(
"Xlights_glass_g", 0);
367 SetAnimationPhase(
"Xlights_glass_b", 0);
368 SetAnimationPhase(
"Xlights_glass_y", 0);
370 XmasLights xlights = XmasLights.Cast(item);
371 xlights.AttachToObject(
this);
377 super.EEItemDetached(item, slot_name);
379 if (item.IsKindOf (
"CamoNet"))
385 if (!IsKindOf (
"MediumTent"))
387 RemoveProxyPhysics(
"camonet");
391 if (item.IsKindOf (
"XmasLights"))
393 SetAnimationPhase(
"Xlights", 1);
394 SetAnimationPhase(
"Xlights_glass_r", 1);
395 SetAnimationPhase(
"Xlights_glass_g", 1);
396 SetAnimationPhase(
"Xlights_glass_b", 1);
397 SetAnimationPhase(
"Xlights_glass_y", 1);
399 XmasLights xlights = XmasLights.Cast(item);
400 xlights.DetachFromObject(
this);
406 if (MemoryPointExists(
"invView2"))
409 GetInventory().GetCurrentInventoryLocation(il);
452 if (GetInventory().GetCargo().GetItemCount() == 0 && GetInventory().AttachmentCount() == 0)
499 GetInventory().LockInventory(HIDE_INV_FROM_SCRIPT);
509 MiscGameplayFunctions.DropAllItemsInInventoryInBounds(
this,
m_HalfExtents);
515 GetOnViewIndexChanged().Invoke();
530 GetInventory().UnlockInventory(HIDE_INV_FROM_SCRIPT);
541 GetOnViewIndexChanged().Invoke();
547 if (GetHierarchyRootPlayer())
549 if (
GetGame().IsDedicatedServer())
562 string proxy_selection_name;
563 string animation_name;
571 SetAnimationPhase(animation_name, 0);
582 SetAnimationPhase(animation_name, 0);
589 string proxy_selection_name;
590 string animation_name;
598 proxy_selection_name = animation_name;
599 proxy_selection_name.
ToLower();
600 AddProxyPhysics(proxy_selection_name);
611 proxy_selection_name = animation_name;
612 proxy_selection_name.
ToLower();
613 AddProxyPhysics(proxy_selection_name);
635 if (toggle_off == selection || toggle_on == selection)
638 DamageSystem.GetDamageZoneFromComponentName(
this,selection,zone);
693 if (toggle_off == selection || toggle_on == selection)
755 SetAnimationPhase(
"CamoNet", hide);
772 SetAffectPathgraph(
true,
false);
802 super.OnPlacementComplete(player, position, orientation);
812 super.InitItemSounds();
817 handler.AddSound(SoundConstants.ITEM_TENT_OPEN,
GetSoundOpen());
820 handler.AddSound(SoundConstants.ITEM_TENT_CLOSE,
GetSoundClose());
853 DamageSystem.GetDamageZoneFromComponentName(
this,
component,zone);
887 DamageSystem.GetDamageZoneFromComponentName(
this,
component,zone);
918 return super.CanReceiveItemIntoCargo(item);
923 if (!super.CanLoadItemIntoCargo(item))
936 return super.CanReceiveAttachment(attachment, slotId);
944 return super.CanLoadAttachment(attachment);
949 vector playerpos = player.GetPosition();
950 float delta1 = playerpos[1] - position[1];
eBleedingSourceType GetType()
PlaceObjectActionReciveData ActionReciveData ActionDeployObject()
ActionPackTentCB ActionContinuousBaseCB ActionPackTent()
void AddAction(typename actionName)
override string GetInvulnerabilityTypeString()
const int ECE_PLACE_ON_SURFACE
InventoryLocationType
types of Inventory Location
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
void StartItemSoundServer(int id)
ItemSoundHandler GetItemSoundHandler()
override bool IsHologram()
bool m_FixDamageSystemInit
void ItemSoundHandler(ItemBase parent)
enum MagnumStableStateID init
ref EffectSound m_DeployLoopSound
DEPRECATED.
proto bool ConfigGetChildName(string path, int index, out string name)
Get name of subclass in config class on path.
override ScriptCallQueue GetCallQueue(int call_category)
proto native Object CreateObjectEx(string type, vector pos, int iFlags, int iRotation=RF_DEFAULT)
Creates object of certain type.
proto native int ConfigGetChildrenCount(string path)
Get count of subclasses in config class on path.
proto native void ObjectDelete(Object obj)
Wrapper class for managing sound through SEffectManager.
proto native int GetType()
returns type of InventoryLocation
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id
provides access to slot configuration
override int GetMeleeTargetType()
override void EEItemAttached(EntityAI item, string slot_name)
bool CanToggleAnimations(string selection)
bool IsManipulatedWindow()
bool CanAttach(ItemBase item)
void HandleOpeningsPhysics()
void SoundTentClosePlay()
override bool CanReceiveItemIntoCargo(EntityAI item)
override bool OnStoreLoad(ParamsReadContext ctx, int version)
void HandleOpeningsVisuals()
bool IsManipulatedEntrance()
void SoundTentOpenPlay()
DEPRECATED.
override int GetViewIndex()
override bool CanProxyObstructSelf()
prevents showing cargo when outside the tent geometry
override bool HasProxyParts()
override bool CanBeRepairedByCrafting()
bool ConditionOutOfHands(EntityAI player)
override void OnItemLocationChanged(EntityAI old_owner, EntityAI new_owner)
string GetSoundCloseWindow()
override bool CanPutIntoHands(EntityAI parent)
void PlayDeployLoopSound()
override bool IsItemTent()
override void SetActions()
void HideAllAnimationsAndProxyPhysics(bool hide_animations=true, bool hide_physics=true)
override string GetInvulnerabilityTypeString()
override bool CanLoadAttachment(EntityAI attachment)
string GetClutterCutter()
override int GetDamageSystemVersionChange()
ref array< string > m_ShowAnimationsWhenPacked
string GetSoundOpenWindow()
override bool CanRemoveFromHands(EntityAI parent)
void Pack(bool update_navmesh, bool init=false)
override void EEHealthLevelChanged(int oldLevel, int newLevel, string zone)
override void OnStoreSave(ParamsWriteContext ctx)
void Pitch(bool update_navmesh, bool init=false)
void SoundTentOpenWindowPlay()
override bool CanLoadItemIntoCargo(EntityAI item)
void ManipulateEntrance()
void HandleCamoNetAttachment(bool hide)
override void EEItemDetached(EntityAI item, string slot_name)
void AnimateCamonetToggle(ToggleAnimations toggle)
override void OnVariablesSynchronized()
override void RefreshPhysics()
override bool CanRemoveFromCargo(EntityAI parent)
void SetIsBeingPacked(bool isBeingPacked)
override bool CanReceiveAttachment(EntityAI attachment, int slotId)
override bool CanPutInCargo(EntityAI parent)
void RefreshAttachements()
ref array< string > m_ShowAnimationsWhenPitched
const float MAX_PLACEMENT_HEIGHT_DIFF
void TryPitch(bool update_navmesh, bool init=false)
override void OnPlacementComplete(Man player, vector position="0 0 0", vector orientation="0 0 0")
override bool IsTakeable()
void SoundTentCloseWindowPlay()
override bool IsIgnoredByConstruction()
override void InitItemSounds()
ref map< ref ToggleAnimations, bool > m_ToggleAnimations
void StopDeployLoopSound()
DEPRECATED.
bool ConditionIntoInventory(EntityAI player)
override bool CanBePlaced(Man player, vector position)
void AnimateCamonetByOpeningSelection(string opening_selection)
override bool CanBeRepairedToPristine()
override bool IsDeployable()
void DestroyClutterCutter()
void ToggleAnimation(string selection)
proto void Call(func fn, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
proto void CallLater(func fn, int delay=0, bool repeat=false, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
proto bool Write(void value_out)
proto bool Read(void value_in)
override string GetSoundClose()
override void AnimateCamonetToggle(ToggleAnimations toggle)
override string GetClutterCutter()
override string GetSoundOpen()
override string GetSoundCloseWindow()
override void AnimateCamonetByOpeningSelection(string opening_selection)
override void HandleCamoNetAttachment(bool hide)
override bool HasClutterCutter()
override string GetSoundOpenWindow()
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Serializer ParamsReadContext
proto native CGame GetGame()
Serializer ParamsWriteContext
proto void Print(void var)
Prints content of variable to console/log.
class JsonUndergroundAreaTriggerData GetPosition
bool Contains(string sample)
Returns true if sample is substring of string.
proto int ToLower()
Changes string to lowercase. Returns length.
proto native int GetState()
returns one of STATE_...