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";
119 super.OnStoreSave(ctx);
127 if (!super.OnStoreLoad(ctx, version))
134 Print(
"ERROR: no opening mask found! Default openinng settings initialized.");
162 super.RefreshPhysics();
176 super.OnItemLocationChanged(old_owner, new_owner);
178 if (new_owner || old_owner)
180 if (GetInventory().CountInventory() == 1)
187 super.OnVariablesSynchronized();
213 super.EEHealthLevelChanged(oldLevel,newLevel,zone);
219 MiscGameplayFunctions.DropAllItemsInInventoryInBounds(
this,
m_HalfExtents);
221 if (zone !=
"Body" && zone !=
"Inventory" && zone !=
"")
226 DamageSystem.GetComponentNamesFromDamageZone(
this,zone,selections);
227 for (
int j = 0; j < selections.Count(); j++)
229 if (selections.Get(j) !=
"")
231 RemoveProxyPhysics(selections.Get(j));
249 string cfg_path =
"cfgVehicles " +
GetType() +
" AnimationSources";
251 if (
g_Game.ConfigIsExisting(cfg_path))
253 int selections =
g_Game.ConfigGetChildrenCount(cfg_path);
254 string proxy_selection_name;
256 for (
int i = 0; i < selections; i++)
258 string selection_name;
259 g_Game.ConfigGetChildName(cfg_path, i, selection_name);
262 SetAnimationPhase(selection_name, 1);
265 proxy_selection_name = selection_name;
266 proxy_selection_name.
ToLower();
269 RemoveProxyPhysics(proxy_selection_name);
282 if (!super.IsTakeable())
290 if (!super.CanPutIntoHands(parent))
300 if (!super.CanPutInCargo(parent))
310 if (!super.CanRemoveFromCargo(parent))
318 if (!super.CanRemoveFromHands(parent))
341 m_CamoNet = CamoNet.Cast(GetInventory().FindAttachment(slot_id_camo));
344 eai_xlights = GetInventory().FindAttachment(slot_id_xlights);
351 if (!IsKindOf(
"MediumTent"))
353 AddProxyPhysics(
"camonet");
359 SetAnimationPhase(
"Xlights", 0);
360 SetAnimationPhase(
"Xlights_glass_r", 0);
361 SetAnimationPhase(
"Xlights_glass_g", 0);
362 SetAnimationPhase(
"Xlights_glass_b", 0);
363 SetAnimationPhase(
"Xlights_glass_y", 0);
369 super.EEItemAttached(item, slot_name);
371 if (item.IsKindOf (
"CamoNet"))
377 if (!IsKindOf (
"MediumTent"))
379 AddProxyPhysics(
"camonet");
383 if (item.IsKindOf (
"XmasLights"))
385 SetAnimationPhase(
"Xlights", 0);
386 SetAnimationPhase(
"Xlights_glass_r", 0);
387 SetAnimationPhase(
"Xlights_glass_g", 0);
388 SetAnimationPhase(
"Xlights_glass_b", 0);
389 SetAnimationPhase(
"Xlights_glass_y", 0);
391 XmasLights xlights = XmasLights.Cast(item);
392 xlights.AttachToObject(
this);
398 super.EEItemDetached(item, slot_name);
400 if (item.IsKindOf (
"CamoNet"))
406 if (!IsKindOf (
"MediumTent"))
408 RemoveProxyPhysics(
"camonet");
412 if (item.IsKindOf (
"XmasLights"))
414 SetAnimationPhase(
"Xlights", 1);
415 SetAnimationPhase(
"Xlights_glass_r", 1);
416 SetAnimationPhase(
"Xlights_glass_g", 1);
417 SetAnimationPhase(
"Xlights_glass_b", 1);
418 SetAnimationPhase(
"Xlights_glass_y", 1);
420 XmasLights xlights = XmasLights.Cast(item);
421 xlights.DetachFromObject(
this);
427 if (MemoryPointExists(
"invView2"))
430 GetInventory().GetCurrentInventoryLocation(il);
473 if (GetInventory().GetCargo().GetItemCount() == 0 && GetInventory().AttachmentCount() == 0)
520 GetInventory().LockInventory(HIDE_INV_FROM_SCRIPT);
530 MiscGameplayFunctions.DropAllItemsInInventoryInBounds(
this,
m_HalfExtents);
536 GetOnViewIndexChanged().Invoke();
551 GetInventory().UnlockInventory(HIDE_INV_FROM_SCRIPT);
562 GetOnViewIndexChanged().Invoke();
568 if (GetHierarchyRootPlayer())
570 if (
g_Game.IsDedicatedServer())
583 string proxy_selection_name;
584 string animation_name;
592 SetAnimationPhase(animation_name, 0);
603 SetAnimationPhase(animation_name, 0);
610 string proxy_selection_name;
611 string animation_name;
619 proxy_selection_name = animation_name;
620 proxy_selection_name.
ToLower();
621 AddProxyPhysics(proxy_selection_name);
632 proxy_selection_name = animation_name;
633 proxy_selection_name.
ToLower();
634 AddProxyPhysics(proxy_selection_name);
656 if (toggle_off == selection || toggle_on == selection)
659 DamageSystem.GetDamageZoneFromComponentName(
this,selection,zone);
714 if (toggle_off == selection || toggle_on == selection)
776 SetAnimationPhase(
"CamoNet", hide);
793 SetAffectPathgraph(
true,
false);
823 super.OnPlacementComplete(player, position, orientation);
833 super.InitItemSounds();
838 handler.AddSound(SoundConstants.ITEM_TENT_OPEN,
GetSoundOpen());
841 handler.AddSound(SoundConstants.ITEM_TENT_CLOSE,
GetSoundClose());
874 DamageSystem.GetDamageZoneFromComponentName(
this,
component,zone);
908 DamageSystem.GetDamageZoneFromComponentName(
this,
component,zone);
939 return super.CanReceiveItemIntoCargo(item);
944 if (!super.CanLoadItemIntoCargo(item))
957 return super.CanReceiveAttachment(attachment, slotId);
965 return super.CanLoadAttachment(attachment);
970 vector playerpos = player.GetPosition();
971 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
Wrapper class for managing sound through SEffectManager.
proto native int GetType()
returns type of InventoryLocation
provides access to slot configuration
static proto native int GetSlotIdFromString(string slot_name)
const float MAX_PLACEMENT_HEIGHT_DIFF
override bool CanDisplayAttachmentCategory(string category_name)
override void OnItemLocationChanged(EntityAI old_owner, EntityAI new_owner)
ref array< string > m_ShowAnimationsWhenPacked
override bool CanDisplayCargo()
override void OnStoreSave(ParamsWriteContext ctx)
void AnimateCamonetByOpeningSelection(string opening_selection)
void HideAllAnimationsAndProxyPhysics(bool hide_animations=true, bool hide_physics=true)
override bool CanReceiveItemIntoCargo(EntityAI item)
override bool CanBeRepairedToPristine()
void HandleCamoNetAttachment(bool hide)
override bool CanLoadItemIntoCargo(EntityAI item)
void RefreshAttachements()
void SetIsBeingPacked(bool isBeingPacked)
override int GetViewIndex()
override void EEHealthLevelChanged(int oldLevel, int newLevel, string zone)
void PlayDeployLoopSound()
void StopDeployLoopSound()
DEPRECATED.
void Pack(bool update_navmesh, bool init=false)
void DestroyClutterCutter()
override void RefreshPhysics()
override bool CanPutInCargo(EntityAI parent)
override bool CanBePlaced(Man player, vector position)
void SoundTentClosePlay()
override void OnPlacementComplete(Man player, vector position="0 0 0", vector orientation="0 0 0")
void TryPitch(bool update_navmesh, bool init=false)
override int GetMeleeTargetType()
string GetSoundOpenWindow()
string GetSoundCloseWindow()
override bool CanDisplayAttachmentSlot(int slot_id)
void HandleOpeningsPhysics()
override void EEItemDetached(EntityAI item, string slot_name)
override int GetDamageSystemVersionChange()
string GetClutterCutter()
void Pitch(bool update_navmesh, bool init=false)
void SoundTentOpenPlay()
DEPRECATED.
override bool HasProxyParts()
override bool CanPutIntoHands(EntityAI parent)
override bool IsIgnoredByConstruction()
override bool IsItemTent()
bool ConditionIntoInventory(EntityAI player)
bool IsManipulatedWindow()
override bool CanRemoveFromCargo(EntityAI parent)
override bool IsDeployable()
override bool OnStoreLoad(ParamsReadContext ctx, int version)
void SoundTentCloseWindowPlay()
bool CanToggleAnimations(string selection)
override bool IsTakeable()
override void EEItemAttached(EntityAI item, string slot_name)
ref array< string > m_ShowAnimationsWhenPitched
void SoundTentOpenWindowPlay()
bool IsManipulatedEntrance()
override void OnVariablesSynchronized()
void HandleOpeningsVisuals()
bool CanAttach(ItemBase item)
void ToggleAnimation(string selection)
bool ConditionOutOfHands(EntityAI player)
void AnimateCamonetToggle(ToggleAnimations toggle)
override bool CanReceiveAttachment(EntityAI attachment, int slotId)
override bool CanRemoveFromHands(EntityAI parent)
override bool CanBeRepairedByCrafting()
void ManipulateEntrance()
override bool CanLoadAttachment(EntityAI attachment)
override string GetInvulnerabilityTypeString()
override bool CanProxyObstructSelf()
prevents showing cargo when outside the tent geometry
override void InitItemSounds()
override void SetActions()
ref map< ref ToggleAnimations, bool > m_ToggleAnimations
proto bool Write(void value_out)
proto bool Read(void value_in)
override void AnimateCamonetByOpeningSelection(string opening_selection)
override bool HasClutterCutter()
override string GetSoundClose()
override string GetClutterCutter()
override void HandleCamoNetAttachment(bool hide)
override string GetSoundOpen()
override string GetSoundCloseWindow()
override void AnimateCamonetToggle(ToggleAnimations toggle)
override string GetSoundOpenWindow()
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Serializer ParamsReadContext
Serializer ParamsWriteContext
proto void Print(void var)
Prints content of variable to console/log.
vector GetPosition()
Get the world position of the Effect.
bool Contains(string sample)
Returns true if sample is substring of string.
proto int ToLower()
Changes string to lowercase.
proto native int GetState()
returns one of STATE_...
InventoryLocationType
types of Inventory Location
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
override bool IsHologram()
ItemSoundHandler GetItemSoundHandler()
void StartItemSoundServer(int id, int slotId)
bool m_FixDamageSystemInit
void ItemSoundHandler(ItemBase parent)
enum MagnumStableStateID init
ref EffectSound m_DeployLoopSound
DEPRECATED.