17 proto native
void SetNextChannel();
18 proto native
void SetPrevChannel();
19 proto native
float GetTunedFrequency();
20 proto native
void EnableBroadcast(
bool state);
21 proto native
void EnableReceive(
bool state);
22 proto native
bool IsBroadcasting();
23 proto native
bool IsReceiving();
24 proto native
int GetTunedFrequencyIndex();
25 proto native
void SetFrequencyByIndex(
int index);
48class UnderSlugLauncher
extends Weapon
62 super.OnInventoryEnter(player);
65 if ( pb && IsTurnedOn() )
67 pb.MapNavigationItemInPossession(
this);
73 super.OnInventoryExit(player);
78 pb.MapNavigationItemNotInPossession(
this);
82 override void OnWasAttached(
EntityAI parent,
int slot_id)
84 super.OnWasAttached(parent, slot_id);
87 if ( parent.GetHierarchyRoot() )
89 player =
PlayerBase.Cast(parent.GetHierarchyRoot());
92 if ( player && IsTurnedOn() )
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);
150 override void OnWasAttached(
EntityAI parent,
int slot_id)
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())
262 RemoveChild(child,
false);
264 GetTransform(matrix);
266 child = GetSibling();
270 lambda.SetTransferParams(
true,
true,
true);
271 GetInventory().ReplaceItemWithNew(
InventoryMode.SERVER, lambda);
290 super.OnWasAttached(parent, slot_id);
300 super.OnWasDetached(parent, slot_id);
311 override bool CanPutAsAttachment(
EntityAI parent)
314 if (parent.IsInherited(
Transport) && parent.IsRuined())
317 if (GetInventory().GetCurrentInventoryLocation(loc))
325 if (!super.CanPutAsAttachment(parent))
331 override void EEHealthLevelChanged(
int oldLevel,
int newLevel,
string zone)
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 {};
437 override bool CanDetachAttachment(
EntityAI parent)
441 bool isPresent = GetInventory().GetCurrentInventoryLocation( loc );
443 if ( !isPresent || loc.GetSlot() == -1 )
454 override int GetMeleeTargetType()
461 super.EEHealthLevelChanged(oldLevel,newLevel,zone);
469 PlaySoundSet( sound_plug,
"offroad_hit_window_small_SoundSet", 0, 0 );
475 override bool DisplayNameRuinAttach()
485 override void SetActions()
525class Sedan_02_Door_1_1_YellowRust
extends CarDoor {};
526class Sedan_02_Door_1_2_YellowRust
extends CarDoor {};
527class Sedan_02_Door_2_1_YellowRust
extends CarDoor {};
528class Sedan_02_Door_2_2_YellowRust
extends CarDoor {};
529class Sedan_02_Hood_YellowRust
extends CarDoor {};
530class Sedan_02_Trunk_YellowRust
extends CarDoor {};
663class Offroad_02_Door_1_1
extends CarDoor {};
664class Offroad_02_Door_1_2
extends CarDoor {};
665class Offroad_02_Door_2_1
extends CarDoor {};
666class Offroad_02_Door_2_2
extends CarDoor {};
667class Offroad_02_Trunk
extends CarDoor {};
669class Offroad_02_Hood
extends CarDoor
680class Offroad_02_Door_1_1_Rust
extends CarDoor {};
681class Offroad_02_Door_1_2_Rust
extends CarDoor {};
682class Offroad_02_Door_2_1_Rust
extends CarDoor {};
683class Offroad_02_Door_2_2_Rust
extends CarDoor {};
684class Offroad_02_Trunk_Rust
extends CarDoor {};
689 override bool DisplayNameRuinAttach()
704 EntityAI parent = GetHierarchyParent();
706 Class.CastTo( car, parent );
711 float amount = car.GetFluidFraction(
CarFluid.COOLANT );
712 float newAmount =
Math.RandomFloat( amount * 0.2, amount * 0.75 );
714 car.Leak(
CarFluid.COOLANT, newAmount );
750class BrakeFluid
extends ItemBase {};
774 override bool DisplayNameRuinAttach()
790class WindscreenBox
extends ItemBase {};
805 override bool DisplayNameRuinAttach()
828 float m_ItemVisibilityModifier;
832 m_ItemVisibilityModifier = ConfigGetFloat(
"visibilityModifier");
837 HandleVoiceEffect(
false,
PlayerBase.Cast(GetHierarchyRootPlayer()));
840 override bool IsClothing()
845 float GetItemVisibility()
847 return m_ItemVisibilityModifier;
850 void UpdateNVGStatus(
PlayerBase player,
bool attaching =
false,
bool force_disable =
false)
853 for (
int i = 0; i < GetInventory().GetAttachmentSlotsCount(); ++i)
855 hasNVGSlot = GetInventory().GetAttachmentSlotId(i) ==
InventorySlots.GetSlotIdFromString(
"NVG");
860 if (player && hasNVGSlot)
862 NVGoggles nvgAttachment;
863 nvgAttachment = NVGoggles.Cast(FindAttachmentBySlotName(
"NVG"));
868 if (nvgAttachment.m_Strap && nvgAttachment.m_IsLowered)
870 nvgAttachment.SetPlayer(player);
871 player.SetNVGLowered(
true);
873 if (player.IsControlledPlayer())
875 player.RemoveActiveNV(
NVTypes.NV_GOGGLES);
876 player.RemoveActiveNV(
NVTypes.NV_GOGGLES_2D);
877 player.RemoveActiveNV(
NVTypes.NV_GOGGLES_OFF);
879 player.AddActiveNV(nvgAttachment.GetCurrentNVType());
883 else if (force_disable)
885 nvgAttachment.SetPlayer(null);
886 player.SetNVGLowered(
false);
888 if (player.IsControlledPlayer())
890 player.RemoveActiveNV(
NVTypes.NV_GOGGLES);
891 player.RemoveActiveNV(
NVTypes.NV_GOGGLES_2D);
892 player.RemoveActiveNV(
NVTypes.NV_GOGGLES_OFF);
897 if (nvgAttachment.m_Strap && nvgAttachment.m_IsLowered)
899 nvgAttachment.SetPlayer(player);
900 player.SetNVGLowered(
true);
902 if (player.IsControlledPlayer())
904 player.RemoveActiveNV(
NVTypes.NV_GOGGLES);
905 player.RemoveActiveNV(
NVTypes.NV_GOGGLES_2D);
906 player.RemoveActiveNV(
NVTypes.NV_GOGGLES_OFF);
908 player.AddActiveNV(nvgAttachment.GetCurrentNVType());
913 player.SetNVGLowered(
false);
914 if (player.IsControlledPlayer())
916 player.RemoveActiveNV(
NVTypes.NV_GOGGLES);
917 player.RemoveActiveNV(
NVTypes.NV_GOGGLES_2D);
918 player.RemoveActiveNV(
NVTypes.NV_GOGGLES_OFF);
925 player.SetNVGLowered(
false);
927 if (player.IsControlledPlayer())
929 player.RemoveActiveNV(
NVTypes.NV_GOGGLES);
930 player.RemoveActiveNV(
NVTypes.NV_GOGGLES_2D);
931 player.RemoveActiveNV(
NVTypes.NV_GOGGLES_OFF);
937 override void OnWasAttached(
EntityAI parent,
int slot_id)
939 super.OnWasAttached(parent, slot_id);
942 HandleVoiceEffect(
true,
PlayerBase.Cast(GetHierarchyRootPlayer()));
947 super.OnWasDetached(parent, slot_id);
949 HandleVoiceEffect(
false,
PlayerBase.Cast(parent));
953 bool IsObstructingVoice()
960 void MutePlayer(
PlayerBase player,
bool state)
963 if (
GetGame() && player.GetIdentity() != null)
965 GetGame().SetVoiceEffect(player, GetVoiceEffect(), state);
971 void HandleVoiceEffect(
bool enable,
PlayerBase player)
973 if ( IsObstructingVoice() && player )
974 MutePlayer(player, enable);
1007 proto native
bool SetPinned ();
1012 proto native
bool SetUnpinned ();
1017 proto native
bool SetIgnited ();
1021 proto native
bool IsPinned ();
1025 proto native
bool IsActivated ();
1049 string path =
"CfgWorlds " +
GetGame().GetWorldName();
1051 GetGame().ConfigGetText(
path +
" mapDisplayNameKey",m_DisplayName);
1053 GetGame().ConfigGetText(
path +
" mapTextureClosed",m_TextureClosed);
1054 GetGame().ConfigGetText(
path +
" mapTextureOpened",m_TextureOpened);
1055 GetGame().ConfigGetText(
path +
" mapTextureLegend",m_TextureLegend);
1057 SetObjectTexture(0,m_TextureClosed);
1058 SetObjectTexture(1,m_TextureOpened);
1059 SetObjectTexture(2,m_TextureLegend);
1071 super.OnItemLocationChanged(old_owner,new_owner);
1073 SetMapStateOpen(
false,
PlayerBase.Cast(old_owner));
1081 player.SetMapOpen(state);
1083 player.OnItemInHandsChanged();
1088 ShowSelection(
"map_opened");
1089 HideSelection(
"map_closed");
1093 ShowSelection(
"map_closed");
1094 HideSelection(
"map_opened");
1100 if (GetAnimationPhase(
"map_opened") == 0)
1107 if (m_MapMarkerArray.Count() <= 0)
1112 Param1<ref array<ref MapMarker>> params =
new Param1<ref array<ref MapMarker>>( m_MapMarkerArray );
1114 if (
GetGame().IsServer() && GetHierarchyRootPlayer())
1116 pid = GetHierarchyRootPlayer().GetIdentity();
1117 RPCSingleParam(
ERPCs.RPC_SEND_MAP_MARKERS,params,
true,pid);
1121 RPCSingleParam(
ERPCs.RPC_SEND_MAP_MARKERS,params,
true);
1127 super.OnRPC(sender, rpc_type, ctx);
1131 Param1<ref array<ref MapMarker>> params =
new Param1<ref array<ref MapMarker>>( m_MapMarkerArray );
1133 if (rpc_type ==
ERPCs.RPC_SEND_MAP_MARKERS)
1135 if (ctx.Read(params))
1144 if ( !super.OnStoreLoad(ctx, version) )
1147 if (version >= 108 && !ctx.Read(m_MapMarkerArray))
1156 super.OnStoreSave(ctx);
1158 ctx.Write(m_MapMarkerArray);
1163 output = m_DisplayName;
1178 m_MapMarkerArray.Insert(marker);
1183 return m_MapMarkerArray;
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
eBleedingSourceType GetType()
proto native void SetCanSpeak(bool onOff)
void ReplaceWheelLambda(EntityAI old_item, string new_item_type, PlayerBase player)
class ItemBarrel extends InventoryItemSuper TuneNext
proto native bool CanSpeak()
ItemSuppressor SuppressorBase
proto native void TunePrev()
override void OnSuccess(EntityAI new_item)
void AddAction(typename actionName)
void RemoveAction(typename actionName)
override bool ShowZonesHealth()
CarFluid
Type of vehicle's fluid. (native, do not change or extend)
PlayerSpawnPreset slotName
override int GetCarDoorsState(string slotType)
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.
array< ref MapMarker > GetMarkerArray()
bool GetMapStateAnimation()
override void OnWasAttached(EntityAI parent, int slot_id)
proto native float GetWidth()
Returns wheel width.
override int GetMeleeTargetType()
override void OnWasDetached(EntityAI parent, int slot_id)
override void OnStoreSave(ParamsWriteContext ctx)
ref array< ref MapMarker > m_MapMarkerArray
void InsertMarker(vector pos, string text, int color, int idx)
override void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
void SetMapStateOpen(bool state, PlayerBase player)
displays open/closed selections; 1 == opened
override bool DisplayNameRuinAttach()
override bool OnStoreLoad(ParamsReadContext ctx, int version)
override bool DescriptionOverride(out string output)
override bool NameOverride(out string output)
override void OnItemLocationChanged(EntityAI old_owner, EntityAI new_owner)
override bool ShowZonesHealth()
override void SetActions()
proto native float GetRadius()
Returns current wheel radius.
override void EEHealthLevelChanged(int oldLevel, int newLevel, string zone)
provides access to slot configuration
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.
Serialization general interface. Serializer API works with:
Native class for boats - handles physics simulation.
script counterpart to engine's class Weapon
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
override void EEKilled(Object killer)
proto native CGame GetGame()
string m_Description
class purpose description
class JsonUndergroundAreaTriggerData GetPosition
InventoryLocationType
types of Inventory Location
void OnInventoryEnter(Man player)
Event called on item when it is placed in the player(Man) inventory, passes the owner as a parameter.
void OnInventoryExit(Man player)
Event called on item when it is removed from the player(Man) inventory, passes the old owner as a par...
override void EEHealthLevelChanged(int oldLevel, int newLevel, string zone)
override void CopyOldPropertiesToNew(notnull EntityAI old_item, EntityAI new_item)
override void OnWasDetached(EntityAI parent, int slot_id)