47class UnderSlugLauncher
extends Weapon
61 super.OnInventoryEnter(player);
66 pb.MapNavigationItemInPossession(
this);
72 super.OnInventoryExit(player);
77 pb.MapNavigationItemNotInPossession(
this);
83 super.OnWasAttached(parent, slot_id);
86 if ( parent.GetHierarchyRoot() )
88 player =
PlayerBase.Cast(parent.GetHierarchyRoot());
93 player.MapNavigationItemInPossession(
this);
99 super.OnWasDetached(parent, slot_id);
102 if ( parent.GetHierarchyRoot() )
104 player =
PlayerBase.Cast(parent.GetHierarchyRoot());
109 player.MapNavigationItemNotInPossession(
this);
119 super.OnInventoryEnter(player);
129 pb.MapNavigationItemInPossession(
this);
135 super.OnInventoryExit(player);
145 pb.MapNavigationItemNotInPossession(
this);
151 super.OnWasAttached(parent, slot_id);
159 if ( parent.GetHierarchyParent() )
161 player =
PlayerBase.Cast(parent.GetHierarchyParent());
166 player.MapNavigationItemInPossession(
this);
172 super.OnWasDetached(parent, slot_id);
180 if ( parent.GetHierarchyParent() )
182 player =
PlayerBase.Cast(parent.GetHierarchyParent());
187 player.MapNavigationItemNotInPossession(
this);
216 string newWheel =
"";
219 case "HatchbackWheel":
220 newWheel =
"HatchbackWheel_Ruined";
223 case "CivSedanWheel":
224 newWheel =
"CivSedanWheel_Ruined";
227 case "Hatchback_02_Wheel":
228 newWheel =
"Hatchback_02_Wheel_Ruined";
231 case "Sedan_02_Wheel":
232 newWheel =
"Sedan_02_Wheel_Ruined";
235 case "Truck_01_Wheel":
236 newWheel =
"Truck_01_Wheel_Ruined";
239 case "Truck_01_WheelDouble":
240 newWheel =
"Truck_01_WheelDouble_Ruined";
243 case "Offroad_02_Wheel":
244 newWheel =
"Offroad_02_Wheel_Ruined";
252 super.EEHealthLevelChanged(oldLevel, newLevel, zone);
261 if (IsLockedInSlot())
269 GetTransform(matrix);
275 lambda.SetTransferParams(
true,
true,
true);
276 GetInventory().ReplaceItemWithNew(
InventoryMode.SERVER, lambda);
295 super.OnWasAttached(parent, slot_id);
305 super.OnWasDetached(parent, slot_id);
319 if (parent.IsInherited(
Transport) && parent.IsRuined())
322 if (GetInventory().GetCurrentInventoryLocation(loc))
330 if (!super.CanPutAsAttachment(parent))
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";
374 super.EEHealthLevelChanged( oldLevel, newLevel, zone );
384 if (IsLockedInSlot())
388 lambda.SetTransferParams(
true,
true,
true);
389 GetInventory().ReplaceItemWithNew(
InventoryMode.SERVER, lambda);
406 return m_OldItem != null;
411 super.CopyOldPropertiesToNew(old_item, new_item);
412 m_oldOri = old_item.GetOrientation();
417 super.OnSuccess(new_item);
427class Sedan_02_Wheel
extends CarWheel {};
430class HatchbackWheel
extends CarWheel {};
433class CivSedanWheel
extends CarWheel {};
436class Truck_01_Wheel
extends CarWheel {};
439class Truck_01_WheelDouble
extends CarWheel {};
442class Offroad_02_Wheel
extends CarWheel {};
452 bool isPresent = GetInventory().GetCurrentInventoryLocation( loc );
454 if ( !isPresent || loc.
GetSlot() == -1 )
472 super.EEHealthLevelChanged(oldLevel,newLevel,zone);
480 PlaySoundSet( sound_plug,
"offroad_hit_window_small_SoundSet", 0, 0 );
536class Sedan_02_Door_1_1_YellowRust
extends CarDoor {};
537class Sedan_02_Door_1_2_YellowRust
extends CarDoor {};
538class Sedan_02_Door_2_1_YellowRust
extends CarDoor {};
539class Sedan_02_Door_2_2_YellowRust
extends CarDoor {};
540class Sedan_02_Hood_YellowRust
extends CarDoor {};
541class Sedan_02_Trunk_YellowRust
extends CarDoor {};
674class Offroad_02_Door_1_1
extends CarDoor {};
675class Offroad_02_Door_1_2
extends CarDoor {};
676class Offroad_02_Door_2_1
extends CarDoor {};
677class Offroad_02_Door_2_2
extends CarDoor {};
678class Offroad_02_Trunk
extends CarDoor {};
680class Offroad_02_Hood
extends CarDoor
691class Offroad_02_Door_1_1_Rust
extends CarDoor {};
692class Offroad_02_Door_1_2_Rust
extends CarDoor {};
693class Offroad_02_Door_2_1_Rust
extends CarDoor {};
694class Offroad_02_Door_2_2_Rust
extends CarDoor {};
695class Offroad_02_Trunk_Rust
extends CarDoor {};
715 EntityAI parent = GetHierarchyParent();
722 float amount = car.GetFluidFraction(
CarFluid.COOLANT );
725 car.Leak(
CarFluid.COOLANT, newAmount );
761class BrakeFluid
extends ItemBase {};
801class WindscreenBox
extends ItemBase {};
864 for (
int i = 0; i < GetInventory().GetAttachmentSlotsCount(); ++i)
871 if (player && hasNVGSlot)
873 NVGoggles nvgAttachment;
874 nvgAttachment = NVGoggles.Cast(FindAttachmentBySlotName(
"NVG"));
879 if (nvgAttachment.m_Strap && nvgAttachment.m_IsLowered)
881 nvgAttachment.SetPlayer(player);
882 player.SetNVGLowered(
true);
884 if (player.IsControlledPlayer())
886 player.RemoveActiveNV(
NVTypes.NV_GOGGLES);
887 player.RemoveActiveNV(
NVTypes.NV_GOGGLES_2D);
888 player.RemoveActiveNV(
NVTypes.NV_GOGGLES_OFF);
890 player.AddActiveNV(nvgAttachment.GetCurrentNVType());
894 else if (force_disable)
896 nvgAttachment.SetPlayer(null);
897 player.SetNVGLowered(
false);
899 if (player.IsControlledPlayer())
901 player.RemoveActiveNV(
NVTypes.NV_GOGGLES);
902 player.RemoveActiveNV(
NVTypes.NV_GOGGLES_2D);
903 player.RemoveActiveNV(
NVTypes.NV_GOGGLES_OFF);
908 if (nvgAttachment.m_Strap && nvgAttachment.m_IsLowered)
910 nvgAttachment.SetPlayer(player);
911 player.SetNVGLowered(
true);
913 if (player.IsControlledPlayer())
915 player.RemoveActiveNV(
NVTypes.NV_GOGGLES);
916 player.RemoveActiveNV(
NVTypes.NV_GOGGLES_2D);
917 player.RemoveActiveNV(
NVTypes.NV_GOGGLES_OFF);
919 player.AddActiveNV(nvgAttachment.GetCurrentNVType());
924 player.SetNVGLowered(
false);
925 if (player.IsControlledPlayer())
927 player.RemoveActiveNV(
NVTypes.NV_GOGGLES);
928 player.RemoveActiveNV(
NVTypes.NV_GOGGLES_2D);
929 player.RemoveActiveNV(
NVTypes.NV_GOGGLES_OFF);
936 player.SetNVGLowered(
false);
938 if (player.IsControlledPlayer())
940 player.RemoveActiveNV(
NVTypes.NV_GOGGLES);
941 player.RemoveActiveNV(
NVTypes.NV_GOGGLES_2D);
942 player.RemoveActiveNV(
NVTypes.NV_GOGGLES_OFF);
950 super.OnWasAttached(parent, slot_id);
958 super.OnWasDetached(parent, slot_id);
974 if (
g_Game && player.GetIdentity() != null)
1060 string path =
"CfgWorlds " +
g_Game.GetWorldName();
1082 super.OnItemLocationChanged(old_owner,new_owner);
1092 player.SetMapOpen(state);
1094 player.OnItemInHandsChanged();
1099 ShowSelection(
"map_opened");
1100 HideSelection(
"map_closed");
1104 ShowSelection(
"map_closed");
1105 HideSelection(
"map_opened");
1111 if (GetAnimationPhase(
"map_opened") == 0)
1123 Param1<ref array<ref MapMarker>> params =
new Param1<ref array<ref MapMarker>>(
m_MapMarkerArray );
1125 if (
g_Game.IsServer() && GetHierarchyRootPlayer())
1127 pid = GetHierarchyRootPlayer().GetIdentity();
1128 RPCSingleParam(
ERPCs.RPC_SEND_MAP_MARKERS,params,
true,pid);
1132 RPCSingleParam(
ERPCs.RPC_SEND_MAP_MARKERS,params,
true);
1138 super.OnRPC(sender, rpc_type, ctx);
1142 Param1<ref array<ref MapMarker>> params =
new Param1<ref array<ref MapMarker>>(
m_MapMarkerArray );
1144 if (rpc_type ==
ERPCs.RPC_SEND_MAP_MARKERS)
1146 if (ctx.
Read(params))
1155 if ( !super.OnStoreLoad(ctx, version) )
1167 super.OnStoreSave(ctx);
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
eBleedingSourceType GetType()
void ReplaceWheelLambda(EntityAI old_item, string new_item_type, PlayerBase player)
class ItemBarrel extends InventoryItemSuper TuneNext
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).
PlayerSpawnPreset slotName
override void SetActions()
Base script class for cars.
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.
Internal ancestor of all Entity implementations.
string GetRuinedReplacement()
proto native void EnableReceive(bool state)
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)
override void OnStoreSave(ParamsWriteContext ctx)
override bool ShowZonesHealth()
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 SetUnpinned()
sets grenade to state GR_UNPINNED (if the state transition is possible)
proto native bool IsReceiving()
bool GetMapStateAnimation()
override int GetMeleeTargetType()
proto native bool IsPinned()
proto native bool IsActivated()
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 SetPinned()
sets grenade to state GR_PINNED (if the state transition is possible)
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)
proto native bool SetIgnited()
sets grenade to state GR_TRIGGERED (if the state transition is possible)
override bool DisplayNameRuinAttach()
override bool CanDetachAttachment(EntityAI parent)
proto native int GetTunedFrequencyIndex()
proto native void SetNextChannel()
proto native bool IsBroadcasting()
override void SetActions()
ref array< ref MapMarker > m_MapMarkerArray
proto native int GetSlot()
returns slot id if current type is Attachment
proto native int GetType()
returns type of InventoryLocation
provides access to slot configuration
static proto native owned string GetSlotName(int id)
static proto native int GetSlotIdFromString(string slot_name)
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)
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.
proto bool Write(void value_out)
proto bool Read(void value_in)
Native class for boats - handles physics simulation.
override void OnSuccess(EntityAI new_item)
script counterpart to engine's class Weapon
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Serializer ParamsReadContext
Serializer ParamsWriteContext
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static proto float RandomFloat(float min, float max)
Returns a random float number between and min[inclusive] and max[exclusive].
vector GetPosition()
Get the world position of the Effect.
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)