48class UnderSlugLauncher
extends Weapon
62 super.OnInventoryEnter(player);
67 pb.MapNavigationItemInPossession(
this);
73 super.OnInventoryExit(player);
78 pb.MapNavigationItemNotInPossession(
this);
84 super.OnWasAttached(parent, slot_id);
87 if ( parent.GetHierarchyRoot() )
89 player =
PlayerBase.Cast(parent.GetHierarchyRoot());
94 player.MapNavigationItemInPossession(
this);
100 super.OnWasDetached(parent, slot_id);
103 if ( parent.GetHierarchyRoot() )
105 player =
PlayerBase.Cast(parent.GetHierarchyRoot());
110 player.MapNavigationItemNotInPossession(
this);
120 super.OnInventoryEnter(player);
130 pb.MapNavigationItemInPossession(
this);
136 super.OnInventoryExit(player);
146 pb.MapNavigationItemNotInPossession(
this);
152 super.OnWasAttached(parent, slot_id);
160 if ( parent.GetHierarchyParent() )
162 player =
PlayerBase.Cast(parent.GetHierarchyParent());
167 player.MapNavigationItemInPossession(
this);
173 super.OnWasDetached(parent, slot_id);
181 if ( parent.GetHierarchyParent() )
183 player =
PlayerBase.Cast(parent.GetHierarchyParent());
188 player.MapNavigationItemNotInPossession(
this);
196 protected string m_AttachSound =
"Offroad_Wheel_Attach_SoundSet";
197 protected string m_DetachSound =
"Offroad_Wheel_Remove_SoundSet";
217 super.EEHealthLevelChanged(oldLevel, newLevel, zone);
221 string newWheel =
"";
224 case "HatchbackWheel":
225 newWheel =
"HatchbackWheel_Ruined";
228 case "CivSedanWheel":
229 newWheel =
"CivSedanWheel_Ruined";
232 case "Hatchback_02_Wheel":
233 newWheel =
"Hatchback_02_Wheel_Ruined";
236 case "Sedan_02_Wheel":
237 newWheel =
"Sedan_02_Wheel_Ruined";
240 case "Truck_01_Wheel":
241 newWheel =
"Truck_01_Wheel_Ruined";
244 case "Truck_01_WheelDouble":
245 newWheel =
"Truck_01_WheelDouble_Ruined";
248 case "Offroad_02_Wheel":
249 newWheel =
"Offroad_02_Wheel_Ruined";
256 if (IsLockedInSlot())
264 GetTransform(matrix);
270 lambda.SetTransferParams(
true,
true,
true);
271 GetInventory().ReplaceItemWithNew(
InventoryMode.SERVER, lambda);
290 super.OnWasAttached(parent, slot_id);
300 super.OnWasDetached(parent, slot_id);
314 if (parent.IsInherited(
Transport) && parent.IsRuined())
317 if (GetInventory().GetCurrentInventoryLocation(loc))
325 if (!super.CanPutAsAttachment(parent))
333 super.EEHealthLevelChanged( oldLevel, newLevel, zone );
338 string newWheel =
"";
341 case "HatchbackWheel_Ruined":
342 newWheel =
"HatchbackWheel";
345 case "CivSedanWheel_Ruined":
346 newWheel =
"CivSedanWheel";
349 case "Hatchback_02_Wheel_Ruined":
350 newWheel =
"Hatchback_02_Wheel";
353 case "Sedan_02_Wheel_Ruined":
354 newWheel =
"Sedan_02_Wheel";
357 case "Truck_01_Wheel_Ruined":
358 newWheel =
"Truck_01_Wheel";
361 case "Truck_01_WheelDouble_Ruined":
362 newWheel =
"Truck_01_WheelDouble";
365 case "Offroad_02_Wheel_Ruined":
366 newWheel =
"Offroad_02_Wheel";
373 if (IsLockedInSlot())
377 lambda.SetTransferParams(
true,
true,
true);
378 GetInventory().ReplaceItemWithNew(
InventoryMode.SERVER, lambda);
395 return m_OldItem != null;
400 super.CopyOldPropertiesToNew(old_item, new_item);
401 m_oldOri = old_item.GetOrientation();
406 super.OnSuccess(new_item);
416class Sedan_02_Wheel
extends CarWheel {};
419class HatchbackWheel
extends CarWheel {};
422class CivSedanWheel
extends CarWheel {};
425class Truck_01_Wheel
extends CarWheel {};
428class Truck_01_WheelDouble
extends CarWheel {};
431class Offroad_02_Wheel
extends CarWheel {};
442 bool isPresent = GetInventory().GetCurrentInventoryLocation( loc );
444 if ( !isPresent || loc.
GetSlot() == -1 )
462 super.EEHealthLevelChanged(oldLevel,newLevel,zone);
470 PlaySoundSet( sound_plug,
"offroad_hit_window_small_SoundSet", 0, 0 );
526class Sedan_02_Door_1_1_YellowRust
extends CarDoor {};
527class Sedan_02_Door_1_2_YellowRust
extends CarDoor {};
528class Sedan_02_Door_2_1_YellowRust
extends CarDoor {};
529class Sedan_02_Door_2_2_YellowRust
extends CarDoor {};
530class Sedan_02_Hood_YellowRust
extends CarDoor {};
531class Sedan_02_Trunk_YellowRust
extends CarDoor {};
664class Offroad_02_Door_1_1
extends CarDoor {};
665class Offroad_02_Door_1_2
extends CarDoor {};
666class Offroad_02_Door_2_1
extends CarDoor {};
667class Offroad_02_Door_2_2
extends CarDoor {};
668class Offroad_02_Trunk
extends CarDoor {};
670class Offroad_02_Hood
extends CarDoor
681class Offroad_02_Door_1_1_Rust
extends CarDoor {};
682class Offroad_02_Door_1_2_Rust
extends CarDoor {};
683class Offroad_02_Door_2_1_Rust
extends CarDoor {};
684class Offroad_02_Door_2_2_Rust
extends CarDoor {};
685class Offroad_02_Trunk_Rust
extends CarDoor {};
705 EntityAI parent = GetHierarchyParent();
712 float amount = car.GetFluidFraction(
CarFluid.COOLANT );
715 car.Leak(
CarFluid.COOLANT, newAmount );
751class BrakeFluid
extends ItemBase {};
763class TireRepairKit
extends ItemBase {};
784class WindscreenBox
extends ItemBase {};
828 m_ItemVisibilityModifier = ConfigGetFloat(
"visibilityModifier");
833 HandleVoiceEffect(
false,
PlayerBase.Cast(GetHierarchyRootPlayer()));
843 return m_ItemVisibilityModifier;
848 NVGoggles NVGAttachment;
849 NVGAttachment = NVGoggles.Cast(FindAttachmentBySlotName(
"NVG"));
851 for (
int i = 0; i < GetInventory().GetAttachmentSlotsCount(); i++)
858 if ( player && has_nvg_slot )
862 NVGAttachment.LoweredCheck();
864 if ( attaching && NVGAttachment.m_Strap && NVGAttachment.m_IsLowered )
866 NVGAttachment.SetPlayer(player);
867 player.SetNVGLowered(
true);
869 if ( player.IsControlledPlayer() )
871 if ( NVGAttachment.IsWorking() )
873 player.AddActiveNV(
NVTypes.NV_GOGGLES);
879 player.RemoveActiveNV(
NVTypes.NV_GOGGLES);
885 NVGAttachment.SetPlayer(null);
886 player.SetNVGLowered(
false);
888 if ( player.IsControlledPlayer() )
890 player.RemoveActiveNV(
NVTypes.NV_GOGGLES);
895 else if ( player.IsNVGWorking() && force_disable )
897 player.SetNVGLowered(
false);
899 if ( player.IsControlledPlayer() )
901 player.RemoveActiveNV(
NVTypes.NV_GOGGLES);
910 super.OnWasAttached(parent, slot_id);
913 HandleVoiceEffect(
true,
PlayerBase.Cast(GetHierarchyRootPlayer()));
918 super.OnWasDetached(parent, slot_id);
920 HandleVoiceEffect(
false,
PlayerBase.Cast(parent));
945 if ( IsObstructingVoice() && player )
946 MutePlayer(player, enable);
1029 SetObjectTexture(0,m_TextureClosed);
1030 SetObjectTexture(1,m_TextureOpened);
1031 SetObjectTexture(2,m_TextureLegend);
1043 super.OnItemLocationChanged(old_owner,new_owner);
1045 SetMapStateOpen(
false,
PlayerBase.Cast(old_owner));
1053 player.SetMapOpen(state);
1055 player.OnItemInHandsChanged();
1060 ShowSelection(
"map_opened");
1061 HideSelection(
"map_closed");
1065 ShowSelection(
"map_closed");
1066 HideSelection(
"map_opened");
1072 if (GetAnimationPhase(
"map_opened") == 0)
1079 if (m_MapMarkerArray.Count() <= 0)
1084 Param1<ref array<ref MapMarker>> params =
new Param1<ref array<ref MapMarker>>( m_MapMarkerArray );
1088 pid = GetHierarchyRootPlayer().GetIdentity();
1089 RPCSingleParam(
ERPCs.RPC_SEND_MAP_MARKERS,params,
true,pid);
1093 RPCSingleParam(
ERPCs.RPC_SEND_MAP_MARKERS,params,
true);
1099 super.OnRPC(sender, rpc_type, ctx);
1103 Param1<ref array<ref MapMarker>> params =
new Param1<ref array<ref MapMarker>>( m_MapMarkerArray );
1105 if (rpc_type ==
ERPCs.RPC_SEND_MAP_MARKERS)
1107 if (ctx.
Read(params))
1116 if ( !super.OnStoreLoad(ctx, version) )
1119 if (version >= 108 && !ctx.
Read(m_MapMarkerArray))
1128 super.OnStoreSave(ctx);
1130 ctx.
Write(m_MapMarkerArray);
1135 output = m_DisplayName;
1155 m_MapMarkerArray.Insert(marker);
1160 return m_MapMarkerArray;
eBleedingSourceType GetType()
void ReplaceWheelLambda(EntityAI old_item, string new_item_type, PlayerBase player)
class ItemBarrel extends InventoryItemSuper TuneNext
ItemSuppressor SuppressorBase
override protected bool CanExecuteLambda()
proto native void TunePrev()
AttachActionData ActionData ActionAttach()
void AddAction(typename actionName)
void RemoveAction(typename actionName)
CarFluid
Type of vehicle's fluid. (native, do not change or extend)
InventoryLocationType
types of Inventory Location
void UnlockFromParent()
Unlocks this item from its attachment slot of its parent.
override void CopyOldPropertiesToNew(notnull EntityAI old_item, EntityAI new_item)
protected bool m_Initialized
class JsonUndergroundAreaTriggerData GetPosition
proto native void SetVoiceEffect(Object player, int effect, bool enable)
Enable/disable VoN effect (only on server)
proto void GetWorldName(out string world_name)
proto bool ConfigGetText(string path, out string value)
Get string value from config on path.
proto native bool IsServer()
override void SetActions()
override int GetCarDoorsState(string slotType)
override void EEHealthLevelChanged(int oldLevel, int newLevel, string zone)
override bool CanPutAsAttachment(EntityAI parent)
Super root of all classes in Enforce script.
Wrapper class for managing sound through SEffectManager.
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
proto native void EnableReceive(bool state)
proto native bool SetUnpinned()
sets grenade to state GR_UNPINNED (if the state transition is possible)
override void OnItemLocationChanged(EntityAI old_owner, EntityAI new_owner)
proto native void SetCanSpeak(bool onOff)
override void OnInventoryExit(Man player)
override void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
proto native bool SetIgnited()
sets grenade to state GR_TRIGGERED (if the state transition is possible)
override void OnStoreSave(ParamsWriteContext ctx)
override bool ShowZonesHealth()
proto native bool IsActivated()
proto native void SetFrequencyByIndex(int index)
override void EEKilled(Object killer)
void SetMapStateOpen(bool state, PlayerBase player)
displays open/closed selections; 1 == opened
proto native void SetPrevChannel()
override void EEHealthLevelChanged(int oldLevel, int newLevel, string zone)
proto native bool IsReceiving()
bool GetMapStateAnimation()
override int GetMeleeTargetType()
protected ref array< ref MapMarker > m_MapMarkerArray
proto native void EnableBroadcast(bool state)
override void OnWasDetached(EntityAI parent, int slot_id)
override bool NameOverride(out string output)
void InsertMarker(vector pos, string text, int color, int idx)
proto native bool CanSpeak()
override bool OnStoreLoad(ParamsReadContext ctx, int version)
override void OnWasAttached(EntityAI parent, int slot_id)
array< ref MapMarker > GetMarkerArray()
proto native float GetWidth()
Returns wheel width.
proto native float GetTunedFrequency()
proto native float GetRadius()
Returns current wheel radius.
override void OnInventoryEnter(Man player)
override bool DescriptionOverride(out string output)
override bool DisplayNameRuinAttach()
override bool CanDetachAttachment(EntityAI parent)
proto native int GetTunedFrequencyIndex()
proto native void SetNextChannel()
proto native bool IsBroadcasting()
proto native bool IsPinned()
proto native bool SetPinned()
sets grenade to state GR_PINNED (if the state transition is possible)
override void SetActions()
proto native int GetType()
returns type of InventoryLocation
proto native int GetSlot()
returns slot id if current type is Attachment
provides access to slot configuration
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id
static proto native owned string GetSlotName(int id)
converts slot_id to string
void UpdateNVGStatus(PlayerBase player, bool attaching=false, bool force_disable=false)
override bool ShowZonesHealth()
int GetVoiceEffect()
The voice effect this item uses, default is 0 (none)
void MutePlayer(PlayerBase player, bool state)
This items has effect on player's voice.
float GetItemVisibility()
bool IsObstructingVoice()
Returns if this entity obsructs player's voice.
override void OnWasDetached(EntityAI parent, int slot_id)
float m_ItemVisibilityModifier
override bool IsClothing()
override void OnWasAttached(EntityAI parent, int slot_id)
override bool DisplayNameRuinAttach()
void HandleVoiceEffect(bool enable, PlayerBase player)
override void SetActions()
void MapMarker(vector pos, string text, int color, int idx)
protected vector m_Position
The class that will be instanced (moddable)
Manager class for managing Effect (EffectParticle, EffectSound)
static EffectSound PlaySound(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.
Serialization general interface. Serializer API works with:
proto bool Write(void value_out)
proto bool Read(void value_in)
Base native class for all motorized wheeled vehicles.
override void OnSuccess(EntityAI new_item)
script counterpart to engine's class Weapon
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
string m_Description
class purpose description
static proto float RandomFloat(float min, float max)
Returns a random float number between and min[inclusive] and max[exclusive].