1class Headtorch_ColorBase 
extends Clothing 
    8    static string   LIGHT_OFF_GLASS      = 
"dz\\characters\\headgear\\data\\HeadTorchGlass.rvmat";
 
   10    static string   LIGHT_ON_GLASS            = 
"dz\\characters\\headgear\\data\\HeadTorchGlass_on.rvmat";
 
   11    static string   LIGHT_ON_GLASS_RED        = 
"dz\\characters\\headgear\\data\\HeadTorchGlass_on_red.rvmat";
 
   29            m_Timer.Run(1 , 
this, 
"CheckParent", NULL, 
false);
 
 
   35        super.InitGlobalExclusionValues();
 
   36        AddSingleExclusionValueGlobal(EAttExclusions.EXCLUSION_HEADSTRAP_0);
 
 
   41        EntityAI owner = GetHierarchyParent();
 
   44        if (owner  &&  owner.IsZombie())
 
   46            GetInventory().CreateAttachment(
"Battery9V");
 
   47            GetCompEM().SwitchOn();
 
 
   93    override void OnWork(
float consumed_energy)
 
   95        super.OnWork(consumed_energy);
 
  107                    m_Light.SetIntensity(efficiency, GetCompEM().GetUpdateInterval());
 
 
  129        m_Light.PerformVisibilityCheck(
this);
 
  131        EntityAI owner = GetHierarchyParent();
 
  135            if (owner.IsPlayer())
 
  138                ItemBase att_item = owner_PB.GetItemOnSlot(
"Eyewear");
 
  140                if (att_item == 
this)
 
  149            else if (owner.IsZombie())
 
  152                EntityAI item_EAI = owner.GetInventory().FindAttachment(slot_id);
 
 
  169        if (person.IsPlayer())
 
  172            int boneIdx = player.GetBoneIndexByName(
"Head");
 
  182                player.AddChild(
m_Light, boneIdx);
 
  185        else if (person.IsZombie())
 
 
  199        super.OnWasAttached(parent, slot_id);
 
 
  214        super.OnWasDetached(parent, slot_id);
 
  216        if (parent && (parent.IsPlayer() || parent.IsZombie()))
 
 
  249            m_Light.SetEnabled(!invisible);
 
 
void AddAction(typename actionName)
 
float GetEfficiency0To1()
Returns efficiency of this battery. The value is synchronized from server to all clients and is accur...
 
static string LIGHT_ON_GLASS
 
static string m_OffHeadLightTarget
 
static string LIGHT_OFF_REFLECTOR
 
void AttachLightOnHead(EntityAI person)
 
void InitGlobalExclusionValues()
 
static string LIGHT_ON_REFLECTOR_RED
 
override void OnWork(float consumed_energy)
 
override void OnWorkStart()
 
override void OnInvisibleSet(bool invisible)
 
static string LIGHT_ON_REFLECTOR
 
void CreateHeadtorchLight()
 
void Headtorch_ColorBase()
 
override void OnWorkStop()
 
override void OnWasAttached(EntityAI parent, int slot_id)
 
override ItemBase GetLightSourceItem()
 
static vector m_OnHeadLocalOri
 
static string LIGHT_OFF_GLASS
 
override bool IsLightSource()
 
static string m_OffHeadLightPoint
 
override void SetActions()
 
static vector m_OnHeadLocalPos
 
override void OnWasDetached(EntityAI parent, int slot_id)
 
static string LIGHT_ON_GLASS_RED
 
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id
 
provides access to slot configuration
 
proto native CGame GetGame()
 
proto native vector Vector(float x, float y, float z)
Vector constructor from components.