Dayz 1.25
Dayz Code Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс InventoryItemSuper

Защищенные члены

proto native float GetRadius ()
 Returns current wheel radius.
 
proto native float GetWidth ()
 Returns wheel width.
 
override bool DisplayNameRuinAttach ()
 
override bool ShowZonesHealth ()
 
override void EEHealthLevelChanged (int oldLevel, int newLevel, string zone)
 
override int GetMeleeTargetType ()
 
override void SetActions ()
 
override void OnWasAttached (EntityAI parent, int slot_id)
 
override void OnWasDetached (EntityAI parent, int slot_id)
 
void ItemMap ()
 
void InitMapState ()
 
override void OnItemLocationChanged (EntityAI old_owner, EntityAI new_owner)
 
void SetMapStateOpen (bool state, PlayerBase player)
 displays open/closed selections; 1 == opened
 
bool GetMapStateAnimation ()
 
void SyncMapMarkers ()
 
override void OnRPC (PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
 
override bool OnStoreLoad (ParamsReadContext ctx, int version)
 
override void OnStoreSave (ParamsWriteContext ctx)
 
override bool NameOverride (out string output)
 
override bool DescriptionOverride (out string output)
 
void InsertMarker (vector pos, string text, int color, int idx)
 
array< ref MapMarkerGetMarkerArray ()
 

Защищенные данные

string m_AttachSound = "Offroad_Wheel_Attach_SoundSet"
 
string m_DetachSound = "Offroad_Wheel_Remove_SoundSet"
 
ref array< ref MapMarkerm_MapMarkerArray
 
string m_TextureClosed
 
string m_TextureOpened
 
string m_TextureLegend
 
string m_DisplayName
 
string m_Description
 

Закрытые члены

proto native void SetNextChannel ()
 
proto native void SetPrevChannel ()
 
proto native float GetTunedFrequency ()
 
proto native void EnableBroadcast (bool state)
 
proto native void EnableReceive (bool state)
 
proto native bool IsBroadcasting ()
 
proto native bool IsReceiving ()
 
proto native int GetTunedFrequencyIndex ()
 
proto native void SetFrequencyByIndex (int index)
 
proto native bool CanSpeak ()
 
proto native void SetCanSpeak (bool onOff)
 
bool IsTurnedOn ()
 
override void OnInventoryEnter (Man player)
 
override void OnInventoryExit (Man player)
 
override void OnWasAttached (EntityAI parent, int slot_id)
 
override void OnWasDetached (EntityAI parent, int slot_id)
 
override void OnInventoryEnter (Man player)
 
override void OnInventoryExit (Man player)
 
override void OnWasAttached (EntityAI parent, int slot_id)
 
override void OnWasDetached (EntityAI parent, int slot_id)
 
override bool CanDetachAttachment (EntityAI parent)
 
override int GetMeleeTargetType ()
 
override void EEHealthLevelChanged (int oldLevel, int newLevel, string zone)
 
override bool DisplayNameRuinAttach ()
 
override bool ShowZonesHealth ()
 
override void SetActions ()
 
override bool DisplayNameRuinAttach ()
 
override bool ShowZonesHealth ()
 
override void EEKilled (Object killer)
 
override void SetActions ()
 
override void SetActions ()
 
proto native bool SetPinned ()
 sets grenade to state GR_PINNED (if the state transition is possible)
 
proto native bool SetUnpinned ()
 sets grenade to state GR_UNPINNED (if the state transition is possible)
 
proto native bool SetIgnited ()
 sets grenade to state GR_TRIGGERED (if the state transition is possible)
 
proto native bool IsPinned ()
 
proto native bool IsActivated ()
 
override bool IsWeapon ()
 
proto native void Synchronize ()
 Force synchronizes the weapon state from Server to Client. Use with caution.
 
proto native int GetMuzzleCount ()
 
proto native int GetSlotFromMuzzleIndex (int muzzleIndex)
 conversion muzzleIndex -> slotId
 
proto native int GetCurrentMuzzle ()
 
proto native void SetCurrentMuzzle (int muzzleIndex)
 sets index of active muzzle
 
proto native int GetMuzzleModeCount (int muzzleIndex)
 
proto native void SetMuzzleMode (int muzzleIndex, int modeIndex)
 
proto native void SetNextMuzzleMode (int muzzleIndex)
 
proto native int GetCurrentModeBurstSize (int muzzleIndex)
 
proto native bool GetCurrentModeAutoFire (int muzzleIndex)
 
proto native int GetCurrentMode (int muzzleIndex)
 
proto native void SetCurrentMode (int muzzleIndex, int mode)
 
proto native owned string GetCurrentModeName (int muzzleIndex)
 
proto native bool CanFire (int muzzleIndex)
 query whether the weapon can be fired or not
 
proto native bool Fire (int muzzleIndex, vector pos, vector dir, vector speed)
 
proto native bool DryFire (int muzzleIndex)
 
proto native bool DryDryFire (int muzzleIndex)
 
proto native bool EjectCasing (int muzzleIndex)
 ejects casing from chamber
 
proto native bool CreateRound (int muzzleIndex)
 
proto native bool IsChamberEmpty (int muzzleIndex)
 detects empty chamber
 
proto native bool IsChamberFiredOut (int muzzleIndex)
 detects presence of fired out casing in chamber
 
proto native bool IsChamberJammed (int muzzleIndex)
 detects presence of damaged cartridge in chamber
 
proto native bool IsChamberEjectable (int muzzleIndex)
 detects presence of ejectable cartridge in muzzle's chamber
 
proto native bool IsChamberFull (int muzzleIndex)
 maximum number of cartridges in chamber
 
bool IsChamberFullEx (int muzzleIndex)
 
proto native bool HasInternalMagazine (int muzzleIndex)
 
proto native int GetInternalMagazineCartridgeCount (int muzzleIndex)
 
proto native int GetInternalMagazineMaxCartridgeCount (int muzzleIndex)
 
bool IsInternalMagazineFull (int muzzleIndex)
 maximum number of cartridges in internal magazine
 
proto native int GetTotalCartridgeCount (int muzzleIndex)
 
proto native int GetTotalMaxCartridgeCount (int muzzleIndex)
 
proto native owned string GetRandomChamberableAmmoTypeName (int muzzleIndex)
 
proto native owned string GetChamberAmmoTypeName (int muzzleIndex)
 
proto bool GetCartridgeInfo (int muzzleIndex, out float ammoDamage, out string ammoTypeName)
 get info about the cartridge in the chamber of a muzzle
 
proto bool GetInternalMagazineCartridgeInfo (int muzzleIndex, int cartridgeIndex, out float ammoDamage, out string ammoTypeName)
 get info about the cartridge in the internal magazine of a muzzle
 
proto bool PopCartridgeFromChamber (int muzzleIndex, out float ammoDamage, out string ammoTypeName)
 removes cartridge from chamber
 
proto native bool PushCartridgeToChamber (int muzzleIndex, float ammoDamage, string ammoTypeName)
 push cartridge to chamber
 
proto native void EffectBulletShow (int muzzleIndex, float dmg, string type)
 push effect cartridge to Weapon
 
proto native void EffectBulletHide (int muzzleIndex)
 reset effect cartridge in weapon
 
proto native void SetGroundAnimFrameIndex (int groundAnimFrameIndex)
 sets animation frame for ground state when animation is specified in config
 
proto bool PopCartridgeFromInternalMagazine (int muzzleIndex, out float ammoDamage, out string ammoTypeName)
 removes top-most cartridge from internal magazine
 
proto native bool PushCartridgeToInternalMagazine (int muzzleIndex, float ammoDamage, string ammoTypeName)
 push cartridge into internal magazine
 
proto native bool CanAttachMagazine (int muzzleIndex, Magazine mag)
 query if a magazine can be attached to weapon
 
proto native bool TestAttachMagazine (int muzzleIndex, Magazine mag, bool do_occupancy_test, bool do_script_check)
 query if a magazine can be attached to weapon
 
proto native bool AttachMagazine (int muzzleIndex, Magazine mag)
 perform attachment of a magazine to weapon
 
proto native Magazine GetMagazine (int muzzleIndex)
 
proto native float GetReloadTime (int muzzleIndex)
 defines time from one shot to another
 
proto native bool CanChamberFromMag (int muzzleIndex, Magazine mag)
 query if a bullet from magazine can be loaded into chamber
 
proto native owned string GetChamberedCartridgeMagazineTypeName (int muzzleIndex)
 query the type of magazine the cartridge can be unloaded to
 
proto native owned string GetRandomMagazineTypeName (int muzzleIndex)
 
proto native owned string GetMaxMagazineTypeName (int muzzleIndex)
 
proto native int GetMagazineTypeCount (int muzzleIndex)
 
proto native bool EnterOptics ()
 switches to optics mode if possible
 
proto native bool IsInOptics ()
 is weapon in optics mode or not
 
proto native bool ExitOptics ()
 switches out of optics mode (if possible)
 
proto native float GetZoom ()
 returns current percentage of zoom
 
proto native bool SetZoom (float percent)
 sets current zoom (in %)
 
proto native bool ZoomIn ()
 moves current zoom by 1% up
 
proto native bool ZoomOut ()
 moves current zoom by 1% down
 
proto native int GetStepZoom ()
 returns position of currently used value in zoom config array
 
proto native bool SetStepZoom (int step)
 sets zoom to fov value defined at given position in zoom fov config array
 
proto native bool StepZoomIn ()
 sets zoom to next defined (respective to current) value in zoom fov config array
 
proto native bool StepZoomOut ()
 sets zoom to previous (respective to current) defined value in zoom fov config array
 
proto native int GetStepZeroing (int muzzleIndex=0)
 returns position of currently used value in zeroing config array
 
proto native bool SetStepZeroing (int muzzleIndex, int step)
 
proto native bool StepZeroingUp (int muzzleIndex=0)
 sets zeroing to next defined (respective to current) value in zeroing config array
 
proto native bool StepZeroingDown (int muzzleIndex=0)
 sets zeroing to previous (respective to current) defined value in zeroing config array
 
proto native float GetCurrentZeroing (int muzzleIndex=0)
 returns currently used value of zeroing in config array of weapon or attached optics
 
proto native float GetZeroingClamp (int muzzleIndex=0)
 returns maximum allowed discrete distance for the muzzle. Limits attached optics zeroing only! '0' if unclamped
 
proto native bool FlashlightOn ()
 attempt to turn on flashlight
 
proto native bool FlashlightOff ()
 attempt to turn off flashlight
 
proto native bool IsFlashlightOn ()
 query state of flashlight
 
proto native UnderSlugLauncher GetAttachedLauncher ()
 
proto native ItemOptics GetAttachedOptics ()
 
proto native ItemSuppressor GetAttachedSuppressor ()
 
proto native void GetCameraPoint (int muzzleIndex, out vector pos, out vector dir)
 gets camera position & direction in model space of weapon entity
 
proto native float GetZoomInit (int muzzleIndex)
 gets FOV value, when entering optics
 
proto native float GetZoomMin (int muzzleIndex)
 gets FOV minimum
 
proto native float GetZoomMax (int muzzleIndex)
 gets FOV maximum
 
proto native float GetZeroingDistanceZoomMin (int muzzleIndex)
 Gets Zeroing distance at opticsZoomMin.
 
proto native float GetZeroingDistanceZoomMax (int muzzleIndex)
 Gets Zeroing distance at opticsZoomMax.
 
proto native void SelectionBulletShow ()
 
proto native void SelectionBulletHide ()
 
proto native void SelectionMagazineShow ()
 
proto native void SelectionMagazineHide ()
 
void StepZeroingUpAllMuzzles ()
 
void StepZeroingDownAllMuzzles ()
 
override event bool OnUseFromInventory (Man owner)
 
override bool HasFlammableMaterial ()
 
override bool CanBeIgnitedBy (EntityAI igniter=NULL)
 
override bool CanIgniteItem (EntityAI ignite_target=NULL)
 
override void OnIgnitedTarget (EntityAI ignited_item)
 
override void OnIgnitedThis (EntityAI fire_source)
 
override bool IsThisIgnitionSuccessful (EntityAI item_source=NULL)
 

Подробное описание

Методы

◆ AttachMagazine()

AttachMagazine ( int muzzleIndex,
Magazine mag )
private

perform attachment of a magazine to weapon

Аргументы
[in]muzzleIndex
[in]magmagazine to attach
Возвращает
true if magazine was attached

◆ CanAttachMagazine()

CanAttachMagazine ( int muzzleIndex,
Magazine mag )
private

query if a magazine can be attached to weapon

Аргументы
[in]muzzleIndex
[in]magmagazine to attach
Возвращает
true if magazine can be attached

◆ CanBeIgnitedBy()

override bool CanBeIgnitedBy ( EntityAI igniter = NULL)
inlineprivate
17 {
18 if ( GetHierarchyParent() ) return false;
19
20 return true;
21 }

◆ CanChamberFromMag()

CanChamberFromMag ( int muzzleIndex,
Magazine mag )
private

query if a bullet from magazine can be loaded into chamber

Аргументы
[in]muzzleIndex
[in]magmagazine to load from
Возвращает
true if cartidge from mag can be put into chamber

◆ CanDetachAttachment()

override bool CanDetachAttachment ( EntityAI parent)
inlineprivate
438 {
440
441 bool isPresent = GetInventory().GetCurrentInventoryLocation( loc );
442
443 if ( !isPresent || loc.GetSlot() == -1 )
444 return false;
445
446 string slotName = InventorySlots.GetSlotName( loc.GetSlot() );
447
448 if ( slotName && CarScript.Cast( parent ).GetCarDoorsState( slotName ) == CarDoorState.DOORS_OPEN )
449 return true;
450
451 return false;
452 }
CarDoorState
Definition CarScript.c:2
PlayerSpawnPreset slotName
Definition CivilianSedan.c:2
override int GetCarDoorsState(string slotType)
Definition CivilianSedan.c:164
InventoryLocation.
Definition InventoryLocation.c:28
provides access to slot configuration
Definition InventorySlots.c:6
static proto native owned string GetSlotName(int id)
converts slot_id to string
Definition EntityAI.c:95

Перекрестные ссылки CarScript::GetCarDoorsState(), InventorySlots::GetSlotName() и slotName.

◆ CanFire()

CanFire ( int muzzleIndex)
private

query whether the weapon can be fired or not

Возвращает
true if fire possible

◆ CanIgniteItem()

override bool CanIgniteItem ( EntityAI ignite_target = NULL)
inlineprivate
24 {
25 return false;
26 }

◆ CanSpeak()

proto native bool CanSpeak ( )
private

◆ CreateRound()

proto native bool CreateRound ( int muzzleIndex)
private

◆ DescriptionOverride()

override bool DescriptionOverride ( out string output)
inlineprotected
1136 {
1138
1139 return true;
1140 }
string m_Description
Definition InventoryItem.c:1007

Перекрестные ссылки m_Description.

◆ DisplayNameRuinAttach() [1/3]

override bool DisplayNameRuinAttach ( )
inlineprotected
206 {
207 return true;
208 }

◆ DisplayNameRuinAttach() [2/3]

override bool DisplayNameRuinAttach ( )
inlineprivate
476 {
477 return true;
478 }

◆ DisplayNameRuinAttach() [3/3]

override bool DisplayNameRuinAttach ( )
inlineprivate
690 {
691 return true;
692 }

◆ DryDryFire()

proto native bool DryDryFire ( int muzzleIndex)
private

◆ DryFire()

proto native bool DryFire ( int muzzleIndex)
private

◆ EEHealthLevelChanged() [1/2]

override void EEHealthLevelChanged ( int oldLevel,
int newLevel,
string zone )
inlineprotected
216 {
217 super.EEHealthLevelChanged(oldLevel, newLevel, zone);
218
220 {
221 string newWheel = "";
222 switch (GetType())
223 {
224 case "HatchbackWheel":
225 newWheel = "HatchbackWheel_Ruined";
226 break;
227
228 case "CivSedanWheel":
229 newWheel = "CivSedanWheel_Ruined";
230 break;
231
232 case "Hatchback_02_Wheel":
233 newWheel = "Hatchback_02_Wheel_Ruined";
234 break;
235
236 case "Sedan_02_Wheel":
237 newWheel = "Sedan_02_Wheel_Ruined";
238 break;
239
240 case "Truck_01_Wheel":
241 newWheel = "Truck_01_Wheel_Ruined";
242 break;
243
244 case "Truck_01_WheelDouble":
245 newWheel = "Truck_01_WheelDouble_Ruined";
246 break;
247
248 case "Offroad_02_Wheel":
249 newWheel = "Offroad_02_Wheel_Ruined";
250 break;
251 }
252
253 if (newWheel != "")
254 {
255 //Unlock to allow creating a new item
256 if (IsLockedInSlot())
258
260 while (child)
261 {
262 RemoveChild(child, false);
263 vector matrix[4];
264 GetTransform(matrix);
265 GetInventory().DropEntityWithTransform(InventoryMode.SERVER, this, EntityAI.Cast(child), matrix);
266 child = GetSibling();
267 }
268
270 lambda.SetTransferParams(true, true, true);
271 GetInventory().ReplaceItemWithNew(InventoryMode.SERVER, lambda);
272 }
273 }
274 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
Definition Inventory.c:22
eBleedingSourceType GetType()
Definition BleedingSource.c:63
void ReplaceWheelLambda(EntityAI old_item, string new_item_type, PlayerBase player)
void UnlockFromParent()
Unlocks this item from its attachment slot of its parent.
Definition ItemBase.c:5549
Definition Building.c:6
Definition constants.c:615
Definition EnEntity.c:165
Definition EnConvert.c:106
const int STATE_RUINED
Definition constants.c:760
proto native Widget GetSibling()
proto native void RemoveChild(Widget child)
proto native Widget GetChildren()

Перекрестные ссылки GetChildren(), GetSibling(), GetType(), RemoveChild(), ReplaceWheelLambda(), GameConstants::STATE_RUINED и UnlockFromParent().

◆ EEHealthLevelChanged() [2/2]

override void EEHealthLevelChanged ( int oldLevel,
int newLevel,
string zone )
inlineprivate
460 {
461 super.EEHealthLevelChanged(oldLevel,newLevel,zone);
462
464 {
466 switch ( zone )
467 {
468 case "Window":
469 PlaySoundSet( sound_plug, "offroad_hit_window_small_SoundSet", 0, 0 );
470 break;
471 }
472 }
473 }
bool m_Initialized
Definition UiHintPanel.c:317
Wrapper class for managing sound through SEffectManager.
Definition EffectSound.c:5

Перекрестные ссылки m_Initialized и GameConstants::STATE_RUINED.

◆ EEKilled()

override void EEKilled ( Object killer)
inlineprivate
700 {
701 if ( GetGame().IsServer() )
702 {
703 Car car;
704 EntityAI parent = GetHierarchyParent();
705
706 Class.CastTo( car, parent );
707
708
709 if ( car )
710 {
711 float amount = car.GetFluidFraction( CarFluid.COOLANT );
712 float newAmount = Math.RandomFloat( amount * 0.2, amount * 0.75 );
713
714 car.Leak( CarFluid.COOLANT, newAmount );
715 }
716 }
717 }
CarFluid
Type of vehicle's fluid. (native, do not change or extend)
Definition Car.c:19
Super root of all classes in Enforce script.
Definition EnScript.c:11
Definition EnMath.c:7
proto native CGame GetGame()
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].

Перекрестные ссылки Class::CastTo(), GetGame() и Math::RandomFloat().

◆ EffectBulletHide()

EffectBulletHide ( int muzzleIndex)
private

reset effect cartridge in weapon

Аргументы
[in]muzzleIndex

◆ EffectBulletShow()

EffectBulletShow ( int muzzleIndex,
float dmg,
string type )
private

push effect cartridge to Weapon

Аргументы
[in]muzzleIndex
[in]ammoDamagedamage of the ammo
[in]ammoTypeNametype name of the ammo

◆ EjectCasing()

EjectCasing ( int muzzleIndex)
private

ejects casing from chamber

◆ EnableBroadcast()

proto native void EnableBroadcast ( bool state)
private

◆ EnableReceive()

proto native void EnableReceive ( bool state)
private

◆ EnterOptics()

EnterOptics ( )
private

switches to optics mode if possible

Возвращает
true if success, false otherwise

◆ ExitOptics()

ExitOptics ( )
private

switches out of optics mode (if possible)

Возвращает
true if success, false otherwise

◆ Fire()

proto native bool Fire ( int muzzleIndex,
vector pos,
vector dir,
vector speed )
private

◆ FlashlightOff()

FlashlightOff ( )
private

attempt to turn off flashlight

Возвращает
true if on -> off, false otherwise (no flashlight, no power, etc, already off)

◆ FlashlightOn()

FlashlightOn ( )
private

attempt to turn on flashlight

Возвращает
true if set on, false otherwise (no flashlight, no power, etc)

◆ GetAttachedLauncher()

GetAttachedLauncher ( )
private
Возвращает
returns attached launcher or null

◆ GetAttachedOptics()

GetAttachedOptics ( )
private
Возвращает
returns attached optics or null

◆ GetAttachedSuppressor()

GetAttachedSuppressor ( )
private
Возвращает
returns attached suppressor or null

◆ GetCameraPoint()

GetCameraPoint ( int muzzleIndex,
out vector pos,
out vector dir )
private

gets camera position & direction in model space of weapon entity

◆ GetCartridgeInfo()

GetCartridgeInfo ( int muzzleIndex,
out float ammoDamage,
out string ammoTypeName )
private

get info about the cartridge in the chamber of a muzzle

Аргументы
[in]muzzleIndex
[out]ammoDamagedamage of the ammo
[out]ammoTypeNametype name of the ejected ammo
Возвращает
true if info retrieved

◆ GetChamberAmmoTypeName()

GetChamberAmmoTypeName ( int muzzleIndex)
private
Аргументы
[in]

return returns name of i-th ammo type for chambering

◆ GetChamberedCartridgeMagazineTypeName()

GetChamberedCartridgeMagazineTypeName ( int muzzleIndex)
private

query the type of magazine the cartridge can be unloaded to

Аргументы
[in]muzzleIndex
Возвращает
entity type name

◆ GetCurrentMode()

proto native int GetCurrentMode ( int muzzleIndex)
private

◆ GetCurrentModeAutoFire()

proto native bool GetCurrentModeAutoFire ( int muzzleIndex)
private

◆ GetCurrentModeBurstSize()

proto native int GetCurrentModeBurstSize ( int muzzleIndex)
private

◆ GetCurrentModeName()

proto native owned string GetCurrentModeName ( int muzzleIndex)
private

◆ GetCurrentMuzzle()

GetCurrentMuzzle ( )
private
Возвращает
returns index of current muzzle

◆ GetCurrentZeroing()

GetCurrentZeroing ( int muzzleIndex = 0)
private

returns currently used value of zeroing in config array of weapon or attached optics

Возвращает
currently used value in zeroing

◆ GetInternalMagazineCartridgeCount()

proto native int GetInternalMagazineCartridgeCount ( int muzzleIndex)
private

◆ GetInternalMagazineCartridgeInfo()

GetInternalMagazineCartridgeInfo ( int muzzleIndex,
int cartridgeIndex,
out float ammoDamage,
out string ammoTypeName )
private

get info about the cartridge in the internal magazine of a muzzle

Аргументы
[in]muzzleIndex
[in]cartridgeIndexhas to be 0 <= cartridgeIndex < GetInternalMagazineCartridgeCount()
[out]ammoDamagedamage of the ammo
[out]ammoTypeNametype name of the ejected ammo
Возвращает
true if info retrieved

◆ GetInternalMagazineMaxCartridgeCount()

proto native int GetInternalMagazineMaxCartridgeCount ( int muzzleIndex)
private

◆ GetMagazine()

GetMagazine ( int muzzleIndex)
private
Аргументы
[in]muzzleIndex
Возвращает
attached magazine

◆ GetMagazineTypeCount()

GetMagazineTypeCount ( int muzzleIndex)
private
Аргументы
[in]

return returns the number of magazines in 'magazines' in config

◆ GetMapStateAnimation()

bool GetMapStateAnimation ( )
inlineprotected
1066 {
1067 if (GetAnimationPhase("map_opened") == 0)
1068 return true;
1069 return false;
1070 }

◆ GetMarkerArray()

array< ref MapMarker > GetMarkerArray ( )
inlineprotected
1149 {
1150 return m_MapMarkerArray;
1151 }
ref array< ref MapMarker > m_MapMarkerArray
Definition InventoryItem.c:1001

◆ GetMaxMagazineTypeName()

GetMaxMagazineTypeName ( int muzzleIndex)
private
Аргументы
[in]

return returns the typename of the magazine in 'magazines' in config with highest capacity

◆ GetMeleeTargetType() [1/2]

override int GetMeleeTargetType ( )
inlineprotected
277 {
278 return EMeleeTargetType.NONALIGNABLE;
279 }
EMeleeTargetType
Definition EMeleeTargetType.c:2

◆ GetMeleeTargetType() [2/2]

override int GetMeleeTargetType ( )
inlineprivate
455 {
456 return EMeleeTargetType.NONALIGNABLE;
457 }

◆ GetMuzzleCount()

GetMuzzleCount ( )
private
Возвращает
number of muzzles

◆ GetMuzzleModeCount()

proto native int GetMuzzleModeCount ( int muzzleIndex)
private

◆ GetRadius()

proto native float GetRadius ( )
protected

Returns current wheel radius.

◆ GetRandomChamberableAmmoTypeName()

GetRandomChamberableAmmoTypeName ( int muzzleIndex)
private
Аргументы
[in]

return returns the typename of a random ammo registered in 'chamberableFrom' in config

◆ GetRandomMagazineTypeName()

GetRandomMagazineTypeName ( int muzzleIndex)
private
Аргументы
[in]

return returns the typename of a random magazine in 'magazines' in config

◆ GetReloadTime()

GetReloadTime ( int muzzleIndex)
private

defines time from one shot to another

Аргументы
[in]muzzleIndex
Возвращает
reload time in seconds

◆ GetSlotFromMuzzleIndex()

GetSlotFromMuzzleIndex ( int muzzleIndex)
private

conversion muzzleIndex -> slotId

Аргументы
[in]muzzleIndexmuzzle index
Возвращает
slotId on success, -1 otherwise

◆ GetStepZeroing()

GetStepZeroing ( int muzzleIndex = 0)
private

returns position of currently used value in zeroing config array

Возвращает
position of currently used value in zeroing config array

◆ GetStepZoom()

GetStepZoom ( )
private

returns position of currently used value in zoom config array

Возвращает
position of currently used value in zoom config array

◆ GetTotalCartridgeCount()

GetTotalCartridgeCount ( int muzzleIndex)
private
Возвращает
returns number of available cartridges in chamber + internal magazine

◆ GetTotalMaxCartridgeCount()

GetTotalMaxCartridgeCount ( int muzzleIndex)
private
Возвращает
returns number of max cartridges in chamber + internal magazine

◆ GetTunedFrequency()

proto native float GetTunedFrequency ( )
private

◆ GetTunedFrequencyIndex()

proto native int GetTunedFrequencyIndex ( )
private

◆ GetWidth()

proto native float GetWidth ( )
protected

Returns wheel width.

◆ GetZeroingClamp()

GetZeroingClamp ( int muzzleIndex = 0)
private

returns maximum allowed discrete distance for the muzzle. Limits attached optics zeroing only! '0' if unclamped

Возвращает
maximum allowed discrete distance for the muzzle

◆ GetZeroingDistanceZoomMax()

GetZeroingDistanceZoomMax ( int muzzleIndex)
private

Gets Zeroing distance at opticsZoomMax.

◆ GetZeroingDistanceZoomMin()

GetZeroingDistanceZoomMin ( int muzzleIndex)
private

Gets Zeroing distance at opticsZoomMin.

◆ GetZoom()

GetZoom ( )
private

returns current percentage of zoom

Возвращает
current percentage of zoom

◆ GetZoomInit()

GetZoomInit ( int muzzleIndex)
private

gets FOV value, when entering optics

◆ GetZoomMax()

GetZoomMax ( int muzzleIndex)
private

gets FOV maximum

◆ GetZoomMin()

GetZoomMin ( int muzzleIndex)
private

gets FOV minimum

◆ HasFlammableMaterial()

override bool HasFlammableMaterial ( )
inlineprivate
12 {
13 return true;
14 }

◆ HasInternalMagazine()

HasInternalMagazine ( int muzzleIndex)
private
Заметки
passing in -1 will check all muzzles
Возвращает
true if weapon has an internal magazine

◆ InitMapState()

void InitMapState ( )
inlineprotected
1015 {
1016 string path = "CfgWorlds " + GetGame().GetWorldName();
1017
1018 GetGame().ConfigGetText(path + " mapDisplayNameKey",m_DisplayName);
1019 GetGame().ConfigGetText(path + " mapDescriptionKey",m_Description);
1020 GetGame().ConfigGetText(path + " mapTextureClosed",m_TextureClosed);
1021 GetGame().ConfigGetText(path + " mapTextureOpened",m_TextureOpened);
1022 GetGame().ConfigGetText(path + " mapTextureLegend",m_TextureLegend);
1023
1024 SetObjectTexture(0,m_TextureClosed);
1025 SetObjectTexture(1,m_TextureOpened);
1026 SetObjectTexture(2,m_TextureLegend);
1027
1028 //m_MarkerArray = new ref array<vector,int,int,string>;
1030 if (GetGame().IsMultiplayer() && GetGame().IsServer())
1031 {
1033 }
1034 }
string path
Definition OptionSelectorMultistate.c:135
string m_TextureLegend
Definition InventoryItem.c:1005
string m_TextureOpened
Definition InventoryItem.c:1004
string m_DisplayName
Definition InventoryItem.c:1006
string m_TextureClosed
Definition InventoryItem.c:1003
void SyncMapMarkers()
Definition InventoryItem.c:1072

Перекрестные ссылки GetGame(), m_Description и path.

◆ InsertMarker()

void InsertMarker ( vector pos,
string text,
int color,
int idx )
inlineprotected
1143 {
1145 m_MapMarkerArray.Insert(marker);
1146 }
Definition InventoryItem.c:1155

◆ IsActivated()

IsActivated ( )
private
Возвращает
true if grenade is GR_TRIGGERED or GR_EXPLODED

◆ IsBroadcasting()

proto native bool IsBroadcasting ( )
private

◆ IsChamberEjectable()

IsChamberEjectable ( int muzzleIndex)
private

detects presence of ejectable cartridge in muzzle's chamber

Возвращает
true if eject-able

◆ IsChamberEmpty()

IsChamberEmpty ( int muzzleIndex)
private

detects empty chamber

Возвращает
true if no cartridge in chamber

◆ IsChamberFiredOut()

IsChamberFiredOut ( int muzzleIndex)
private

detects presence of fired out casing in chamber

Возвращает
true if casing in chamber

◆ IsChamberFull()

IsChamberFull ( int muzzleIndex)
private

maximum number of cartridges in chamber

Возвращает
true if full

◆ IsChamberFullEx()

bool IsChamberFullEx ( int muzzleIndex)
inlineprivate
98 {
100 }
proto native bool IsChamberFull(int muzzleIndex)
maximum number of cartridges in chamber

Перекрестные ссылки IsChamberFull().

◆ IsChamberJammed()

IsChamberJammed ( int muzzleIndex)
private

detects presence of damaged cartridge in chamber

Возвращает
true if jammed

◆ IsFlashlightOn()

IsFlashlightOn ( )
private

query state of flashlight

Возвращает
true if set on

◆ IsInOptics()

IsInOptics ( )
private

is weapon in optics mode or not

Возвращает
true if in optics mode, false otherwise

◆ IsInternalMagazineFull()

IsInternalMagazineFull ( int muzzleIndex)
inlineprivate

maximum number of cartridges in internal magazine

Возвращает
true if full
proto native int GetInternalMagazineMaxCartridgeCount(int muzzleIndex)
proto native int GetInternalMagazineCartridgeCount(int muzzleIndex)

◆ IsPinned()

IsPinned ( )
private
Возвращает
true if grenade is pinned

◆ IsReceiving()

proto native bool IsReceiving ( )
private

◆ IsThisIgnitionSuccessful()

override bool IsThisIgnitionSuccessful ( EntityAI item_source = NULL)
inlineprivate
38 {
39 return Fireplace.CanIgniteEntityAsFireplace( this );
40 }

◆ IsTurnedOn()

bool IsTurnedOn ( )
inlineprivate
56 {
57 return true;
58 }

◆ IsWeapon()

override bool IsWeapon ( )
inlineprivate
6{ return true; }

◆ ItemMap()

void ItemMap ( )
inlineprotected
1010 {
1011 InitMapState();
1012 }
void InitMapState()
Definition InventoryItem.c:1014

◆ NameOverride()

override bool NameOverride ( out string output)
inlineprotected
1129 {
1131
1132 return true;
1133 }

◆ OnIgnitedTarget()

override void OnIgnitedTarget ( EntityAI ignited_item)
inlineprivate
29 {
30 }

◆ OnIgnitedThis()

override void OnIgnitedThis ( EntityAI fire_source)
inlineprivate
33 {
34 Fireplace.IgniteEntityAsFireplace( this, fire_source );
35 }

◆ OnInventoryEnter() [1/2]

override void OnInventoryEnter ( Man player)
inlineprivate
61 {
62 super.OnInventoryEnter(player);
63
65 if ( pb && IsTurnedOn() )
66 {
67 pb.MapNavigationItemInPossession(this);
68 }
69 }
bool IsTurnedOn()
Definition InventoryItem.c:55
Definition PlayerBaseClient.c:2

◆ OnInventoryEnter() [2/2]

override void OnInventoryEnter ( Man player)
inlineprivate
119 {
120 super.OnInventoryEnter(player);
121
122 if ( IsRuined() )
123 {
124 return;
125 }
126
128 if ( pb )
129 {
130 pb.MapNavigationItemInPossession(this);
131 }
132 }

◆ OnInventoryExit() [1/2]

override void OnInventoryExit ( Man player)
inlineprivate
72 {
73 super.OnInventoryExit(player);
74
76 if ( pb )
77 {
78 pb.MapNavigationItemNotInPossession(this);
79 }
80 }

◆ OnInventoryExit() [2/2]

override void OnInventoryExit ( Man player)
inlineprivate
135 {
136 super.OnInventoryExit(player);
137
138 if ( IsRuined() )
139 {
140 return;
141 }
142
144 if ( pb )
145 {
146 pb.MapNavigationItemNotInPossession(this);
147 }
148 }

◆ OnItemLocationChanged()

override void OnItemLocationChanged ( EntityAI old_owner,
EntityAI new_owner )
inlineprotected
1037 {
1038 super.OnItemLocationChanged(old_owner,new_owner);
1039
1040 SetMapStateOpen(false, PlayerBase.Cast(old_owner));
1041 }
void SetMapStateOpen(bool state, PlayerBase player)
displays open/closed selections; 1 == opened
Definition InventoryItem.c:1044

◆ OnRPC()

override void OnRPC ( PlayerIdentity sender,
int rpc_type,
ParamsReadContext ctx )
inlineprotected
1093 {
1094 super.OnRPC(sender, rpc_type, ctx);
1095
1096 //array<vector,int,int,string> tmp_array = new array<vector,int,int,string>;
1097 //Param1<ref array<vector,int,int,string>> param = new Param1<ref array<vector,int,int,string>>(m_MarkerArray);
1099
1100 if (rpc_type == ERPCs.RPC_SEND_MAP_MARKERS)
1101 {
1102 if (ctx.Read(params))
1103 {
1104 //Print("Map | OnRPC | m_MapMarkerArray_new count: " + m_MapMarkerArray_new.Count());
1105 }
1106 }
1107 }
ERPCs
Definition ERPCs.c:2

◆ OnStoreLoad()

override bool OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprotected
1110 {
1111 if ( !super.OnStoreLoad(ctx, version) )
1112 return false;
1113
1114 if (version >= 108 && !ctx.Read(m_MapMarkerArray))
1115 {
1116 return false;
1117 }
1118 return true;
1119 }

◆ OnStoreSave()

override void OnStoreSave ( ParamsWriteContext ctx)
inlineprotected
1122 {
1123 super.OnStoreSave(ctx);
1124
1125 ctx.Write(m_MapMarkerArray);
1126 }

◆ OnUseFromInventory()

override event bool OnUseFromInventory ( Man owner)
inlineprivate
4 {
5 return false;
6 }

◆ OnWasAttached() [1/3]

override void OnWasAttached ( EntityAI parent,
int slot_id )
inlineprivate
83 {
84 super.OnWasAttached(parent, slot_id);
85
86 PlayerBase player = PlayerBase.Cast(parent);
87 if ( parent.GetHierarchyRoot() )
88 {
89 player = PlayerBase.Cast(parent.GetHierarchyRoot());
90 }
91
92 if ( player && IsTurnedOn() )
93 {
94 player.MapNavigationItemInPossession(this);
95 }
96 }

◆ OnWasAttached() [2/3]

override void OnWasAttached ( EntityAI parent,
int slot_id )
inlineprivate
151 {
152 super.OnWasAttached(parent, slot_id);
153
154 if ( IsRuined() )
155 {
156 return;
157 }
158
159 PlayerBase player = PlayerBase.Cast(parent);
160 if ( parent.GetHierarchyParent() )
161 {
162 player = PlayerBase.Cast(parent.GetHierarchyParent());
163 }
164
165 if ( player )
166 {
167 player.MapNavigationItemInPossession(this);
168 }
169 }

◆ OnWasAttached() [3/3]

override void OnWasAttached ( EntityAI parent,
int slot_id )
inlineprotected
289 {
290 super.OnWasAttached(parent, slot_id);
291
292 #ifndef SERVER
294 effect.SetAutodestroy(true);
295 #endif
296 }
class JsonUndergroundAreaTriggerData GetPosition
Definition UndergroundAreaLoader.c:9
string m_AttachSound
Definition InventoryItem.c:196
Manager class for managing Effect (EffectParticle, EffectSound)
Definition EffectManager.c:6
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.
Definition EffectManager.c:165

Перекрестные ссылки GetPosition и SEffectManager::PlaySound().

◆ OnWasDetached() [1/3]

override void OnWasDetached ( EntityAI parent,
int slot_id )
inlineprivate
99 {
100 super.OnWasDetached(parent, slot_id);
101
102 PlayerBase player = PlayerBase.Cast(parent);
103 if ( parent.GetHierarchyRoot() )
104 {
105 player = PlayerBase.Cast(parent.GetHierarchyRoot());
106 }
107
108 if ( player )
109 {
110 player.MapNavigationItemNotInPossession(this);
111 }
112 }

◆ OnWasDetached() [2/3]

override void OnWasDetached ( EntityAI parent,
int slot_id )
inlineprivate
172 {
173 super.OnWasDetached(parent, slot_id);
174
175 if ( IsRuined() )
176 {
177 return;
178 }
179
180 PlayerBase player = PlayerBase.Cast(parent);
181 if ( parent.GetHierarchyParent() )
182 {
183 player = PlayerBase.Cast(parent.GetHierarchyParent());
184 }
185
186 if ( player )
187 {
188 player.MapNavigationItemNotInPossession(this);
189 }
190 }

◆ OnWasDetached() [3/3]

override void OnWasDetached ( EntityAI parent,
int slot_id )
inlineprotected
299 {
300 super.OnWasDetached(parent, slot_id);
301
302 #ifndef SERVER
304 effect.SetAutodestroy(true);
305 #endif
306 }
string m_DetachSound
Definition InventoryItem.c:197

Перекрестные ссылки GetPosition и SEffectManager::PlaySound().

◆ PopCartridgeFromChamber()

PopCartridgeFromChamber ( int muzzleIndex,
out float ammoDamage,
out string ammoTypeName )
private

removes cartridge from chamber

◆ PopCartridgeFromInternalMagazine()

PopCartridgeFromInternalMagazine ( int muzzleIndex,
out float ammoDamage,
out string ammoTypeName )
private

removes top-most cartridge from internal magazine

◆ PushCartridgeToChamber()

PushCartridgeToChamber ( int muzzleIndex,
float ammoDamage,
string ammoTypeName )
private

push cartridge to chamber

◆ PushCartridgeToInternalMagazine()

PushCartridgeToInternalMagazine ( int muzzleIndex,
float ammoDamage,
string ammoTypeName )
private

push cartridge into internal magazine

◆ SelectionBulletHide()

proto native void SelectionBulletHide ( )
private

◆ SelectionBulletShow()

proto native void SelectionBulletShow ( )
private

◆ SelectionMagazineHide()

proto native void SelectionMagazineHide ( )
private

◆ SelectionMagazineShow()

proto native void SelectionMagazineShow ( )
private

◆ SetActions() [1/4]

override void SetActions ( )
inlineprotected
282 {
283 super.SetActions();
286 }
void ActionDetach()
Definition ActionDetach.c:10
void AddAction(typename actionName)
Definition AdvancedCommunication.c:220
Definition ActionAttachOnSelection.c:2

Перекрестные ссылки ActionDetach() и AddAction().

◆ SetActions() [2/4]

override void SetActions ( )
inlineprivate
486 {
487 super.SetActions();
488
491 }

Перекрестные ссылки ActionDetach() и AddAction().

◆ SetActions() [3/4]

override void SetActions ( )
inlineprivate
720 {
721 super.SetActions();
722
725 }

Перекрестные ссылки ActionDetach() и AddAction().

◆ SetActions() [4/4]

override void SetActions ( )
inlineprivate
961 {
962 super.SetActions();
964 }
Definition ActionUnpackBox.c:10

Перекрестные ссылки AddAction().

◆ SetCanSpeak()

proto native void SetCanSpeak ( bool onOff)
private

◆ SetCurrentMode()

proto native void SetCurrentMode ( int muzzleIndex,
int mode )
private

◆ SetCurrentMuzzle()

SetCurrentMuzzle ( int muzzleIndex)
private

sets index of active muzzle

Аргументы
[in]muzzleIndex

◆ SetFrequencyByIndex()

proto native void SetFrequencyByIndex ( int index)
private

◆ SetGroundAnimFrameIndex()

SetGroundAnimFrameIndex ( int groundAnimFrameIndex)
private

sets animation frame for ground state when animation is specified in config

◆ SetIgnited()

SetIgnited ( )
private

sets grenade to state GR_TRIGGERED (if the state transition is possible)

Возвращает
true if state already set or if state transition performed, false otherwise

◆ SetMapStateOpen()

void SetMapStateOpen ( bool state,
PlayerBase player )
inlineprotected

displays open/closed selections; 1 == opened

1045 {
1046 if (player)
1047 {
1048 player.SetMapOpen(state);
1049 if (state)
1050 player.OnItemInHandsChanged();
1051 }
1052
1053 if (state)
1054 {
1055 ShowSelection("map_opened");
1056 HideSelection("map_closed");
1057 }
1058 else
1059 {
1060 ShowSelection("map_closed");
1061 HideSelection("map_opened");
1062 }
1063 }

◆ SetMuzzleMode()

proto native void SetMuzzleMode ( int muzzleIndex,
int modeIndex )
private

◆ SetNextChannel()

proto native void SetNextChannel ( )
private

◆ SetNextMuzzleMode()

proto native void SetNextMuzzleMode ( int muzzleIndex)
private

◆ SetPinned()

SetPinned ( )
private

sets grenade to state GR_PINNED (if the state transition is possible)

Возвращает
true if state already set or if state transition performed, false otherwise

◆ SetPrevChannel()

proto native void SetPrevChannel ( )
private

◆ SetStepZeroing()

proto native bool SetStepZeroing ( int muzzleIndex,
int step )
private

◆ SetStepZoom()

SetStepZoom ( int step)
private

sets zoom to fov value defined at given position in zoom fov config array

Аргументы
[in]indexof configured step, range [0..cfg_max]
Возвращает
true if zoom set

◆ SetUnpinned()

SetUnpinned ( )
private

sets grenade to state GR_UNPINNED (if the state transition is possible)

Возвращает
true if state already set or if state transition performed, false otherwise

◆ SetZoom()

SetZoom ( float percent)
private

sets current zoom (in %)

Аргументы
[in]percentzoom to set in range [0.0f .. 100.0f]
Возвращает
true if zoom set

◆ ShowZonesHealth() [1/3]

override bool ShowZonesHealth ( )
inlineprotected
211 {
212 return true;
213 }

◆ ShowZonesHealth() [2/3]

override bool ShowZonesHealth ( )
inlineprivate
481 {
482 return true;
483 }

◆ ShowZonesHealth() [3/3]

override bool ShowZonesHealth ( )
inlineprivate
695 {
696 return true;
697 }

◆ StepZeroingDown()

StepZeroingDown ( int muzzleIndex = 0)
private

sets zeroing to previous (respective to current) defined value in zeroing config array

Возвращает
true if zeroing set

◆ StepZeroingDownAllMuzzles()

void StepZeroingDownAllMuzzles ( )
inlineprivate
459 {
460 for (int i = 0; i < GetMuzzleCount(); i++)
461 {
463 }
464 }
proto native bool StepZeroingDown(int muzzleIndex=0)
sets zeroing to previous (respective to current) defined value in zeroing config array
proto native int GetMuzzleCount()

◆ StepZeroingUp()

StepZeroingUp ( int muzzleIndex = 0)
private

sets zeroing to next defined (respective to current) value in zeroing config array

Возвращает
true if zeroing set

◆ StepZeroingUpAllMuzzles()

void StepZeroingUpAllMuzzles ( )
inlineprivate
451 {
452 for (int i = 0; i < GetMuzzleCount(); i++)
453 {
455 }
456 }
proto native bool StepZeroingUp(int muzzleIndex=0)
sets zeroing to next defined (respective to current) value in zeroing config array

◆ StepZoomIn()

StepZoomIn ( )
private

sets zoom to next defined (respective to current) value in zoom fov config array

Возвращает
true if zoom set

◆ StepZoomOut()

StepZoomOut ( )
private

sets zoom to previous (respective to current) defined value in zoom fov config array

Возвращает
true if zoom set

◆ Synchronize()

Synchronize ( )
private

Force synchronizes the weapon state from Server to Client. Use with caution.

◆ SyncMapMarkers()

void SyncMapMarkers ( )
inlineprotected
1073 {
1074 if (m_MapMarkerArray.Count() <= 0)
1075 return;
1076
1078 //Param1<ref array<vector,int,int,string>> params = new Param1<ref array<vector,int,int,string>>( m_MarkerArray );
1080
1081 if (GetGame().IsServer() && GetHierarchyRootPlayer()) //TODO do we need PlayerIdentity here?
1082 {
1083 pid = GetHierarchyRootPlayer().GetIdentity();
1084 RPCSingleParam(ERPCs.RPC_SEND_MAP_MARKERS,params,true,pid);
1085 }
1086 else
1087 {
1088 RPCSingleParam(ERPCs.RPC_SEND_MAP_MARKERS,params,true);
1089 }
1090 }
The class that will be instanced (moddable)
Definition gameplay.c:388

Перекрестные ссылки GetGame().

◆ TestAttachMagazine()

TestAttachMagazine ( int muzzleIndex,
Magazine mag,
bool do_occupancy_test,
bool do_script_check )
private

query if a magazine can be attached to weapon

Аргументы
[in]muzzleIndex
[in]magmagazine to attach
[in]do_occupancy_testif false, skips test for presence of another magazine in weapon
[in]do_script_checkif false, skips script conditions
Возвращает
true if magazine can be attached

◆ ZoomIn()

ZoomIn ( )
private

moves current zoom by 1% up

Возвращает
true if zoom set

◆ ZoomOut()

ZoomOut ( )
private

moves current zoom by 1% down

Возвращает
true if zoom set

Поля

◆ m_AttachSound

string m_AttachSound = "Offroad_Wheel_Attach_SoundSet"
protected

◆ m_Description

string m_Description
protected

◆ m_DetachSound

string m_DetachSound = "Offroad_Wheel_Remove_SoundSet"
protected

◆ m_DisplayName

string m_DisplayName
protected

◆ m_MapMarkerArray

ref array<ref MapMarker> m_MapMarkerArray
protected

◆ m_TextureClosed

string m_TextureClosed
protected

◆ m_TextureLegend

string m_TextureLegend
protected

◆ m_TextureOpened

string m_TextureOpened
protected

Объявления и описания членов классов находятся в файлах: