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
InventoryLocationType
types of Inventory Location
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
void StartItemSoundServer(int id, int slotId)
ItemSoundHandler GetItemSoundHandler()
override bool IsHologram()
bool m_FixDamageSystemInit
void ItemSoundHandler(ItemBase parent)
enum MagnumStableStateID init
ref EffectSound m_DeployLoopSound
DEPRECATED.
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)
override bool CanDisplayCargo()
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 CanDisplayAttachmentSlot(int slot_id)
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 CanDisplayAttachmentCategory(string category_name)
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 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
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. Returns length.
proto native int GetState()
returns one of STATE_...