5 static int REFLECTOR_ID = 1;
6 static int GLASS_ID = 2;
8 static string LIGHT_OFF_GLASS =
"dz\\gear\\tools\\data\\flashlight_glass.rvmat";
9 static string LIGHT_OFF_REFLECTOR =
"dz\\weapons\\attachments\\data\\m4_flashlight.rvmat";
10 static string LIGHT_ON_GLASS =
"dz\\gear\\tools\\data\\flashlight_glass_on.rvmat";
11 static string LIGHT_ON_REFLECTOR =
"dz\\weapons\\attachments\\data\\m4_flashlight_on.rvmat";
27 if (!
super.CanPutAsAttachment(parent))
return false;
33 for (
int i = 0;
i < parent.GetInventory().GetAttachmentSlotsCount();
i++)
35 slot_id = parent.GetInventory().GetAttachmentSlotId(
i);
36 if (m_AttachmentSlotsCheck.Find(
slot_id) != -1)
52 m_Light.AttachOnMemoryPoint(
this,
"beamStart",
"beamEnd");
53 SetObjectMaterial(GLASS_ID, LIGHT_ON_GLASS);
54 SetObjectMaterial(REFLECTOR_ID, LIGHT_ON_REFLECTOR);
85 SetObjectMaterial(GLASS_ID, LIGHT_OFF_GLASS);
86 SetObjectMaterial(REFLECTOR_ID, LIGHT_OFF_REFLECTOR);
95 if (GetCompEM().IsWorking())
void AddAction(typename actionName)
ExplosiveLight m_Light
light
provides access to slot configuration
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id
void SetIntensity(float coef, float time)
override void OnWork(float consumed_energy)
UniversallightLight m_Light
override void OnInventoryExit(Man player)
override ScriptedLightBase GetLight()
override void OnWorkStart()
override void SetActions()
override void OnWorkStop()
void InitAttachmentsSlotsToCheck(out array< int > AttSlots)
Enter att slot types to check on attach.
override bool CanPutAsAttachment(EntityAI parent)
override bool IsLightSource()
ref array< int > m_AttachmentSlotsCheck
proto native CGame GetGame()
proto native vector Vector(float x, float y, float z)
Vector constructor from components.