DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
MouthRag.c
См. документацию.
1class MouthRag extends Mask_Base
2{
4
5 void MouthRag()
6 {
8 }
9
10 override bool CanDetachAttachment(EntityAI parent)
11 {
13 }
14
15 override bool IsObstructingVoice()
16 {
17 return true;
18 }
19
20 override int GetVoiceEffect()
21 {
22 return VoiceEffectObstruction;
23 }
24
25 override void EEItemLocationChanged(notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
26 {
27 super.EEItemLocationChanged(oldLoc,newLoc);
28
29 if (GetGame().IsDedicatedServer())
30 {
31 PlayerBase playerOld;
32 PlayerBase playerNew;
33 if (oldLoc.GetParent())
34 Class.CastTo(playerOld,oldLoc.GetParent().GetHierarchyRootPlayer());
35 if (newLoc.GetParent())
36 Class.CastTo(playerNew,newLoc.GetParent().GetHierarchyRootPlayer());
37
38 if (newLoc.GetType() == InventoryLocationType.GROUND)
39 {
40 ItemBase newItem;
41 if (Class.CastTo(newItem,GetGame().CreateObjectEx("Rag",newLoc.GetPos(),ECE_PLACE_ON_SURFACE,RF_DEFAULT)))
42 {
43 MiscGameplayFunctions.TransferItemProperties(this,newItem);
44 newItem.SetQuantity(1);
45 DeleteSafe();
46 }
47 }
48 }
49 }
50
51 override void OnWasAttached(EntityAI parent, int slot_id)
52 {
53 super.OnWasAttached(parent, slot_id);
54
55 if (parent.IsPlayer())
56 {
57 PlayerBase.Cast(parent).CheckForGag(); //gag removal action does check, since 'OnWasDetached' is not called on item destruction.
58 }
59 }
60
61 void SetIncomingLambaBool(bool state)
62 {
64 }
65
67 {
69 }
70};
const int ECE_PLACE_ON_SURFACE
Определения CentralEconomy.c:37
const int RF_DEFAULT
Определения CentralEconomy.c:65
InventoryLocationType
types of Inventory Location
Определения InventoryLocation.c:4
Super root of all classes in Enforce script.
Определения EnScript.c:11
Определения Building.c:6
InventoryLocation.
Определения InventoryLocation.c:29
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)
Определения PileOfWoodenPlanks.c:88
Определения InventoryItem.c:731
override int GetVoiceEffect()
Определения MouthRag.c:20
override void OnWasAttached(EntityAI parent, int slot_id)
Определения MouthRag.c:51
bool m_IncomingLambdaChange
Определения MouthRag.c:3
void MouthRag()
Определения MouthRag.c:5
void SetIncomingLambaBool(bool state)
Определения MouthRag.c:61
bool GetIncomingLambdaBool()
Определения MouthRag.c:66
override void EEItemLocationChanged(notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
Определения MouthRag.c:25
override bool CanDetachAttachment(EntityAI parent)
Определения MouthRag.c:10
override bool IsObstructingVoice()
Определения MouthRag.c:15
gas mask base
Определения Balaclava3Holes_ColorBase.c:2
Определения PlayerBaseClient.c:2
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.