5 static int REFLECTOR_ID = 1;
6 static int GLASS_ID = 0;
8 static string LIGHT_OFF_GLASS =
"dz\\gear\\tools\\data\\flashlight_glass.rvmat";
9 static string LIGHT_OFF_REFLECTOR =
"dz\\weapons\\attachments\\data\\TLS3.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\\TLS3_on.rvmat";
20 if(!super.CanPutAsAttachment(parent)) {
return false;}
21 if ( !parent.IsKindOf(
"PlateCarrierHolster") && !parent.IsKindOf(
"PlateCarrierComplete") && !parent.IsKindOf(
"CarrierHolsterSolo") && !parent.IsKindOf(
"ChestHolster") )
34 m_Light.AttachOnMemoryPoint(
this,
"beamStart",
"beamEnd");
35 SetObjectMaterial(GLASS_ID, LIGHT_ON_GLASS);
36 SetObjectMaterial(REFLECTOR_ID, LIGHT_ON_REFLECTOR);
40 override void OnWork(
float consumed_energy )
48 float efficiency = battery.GetEfficiency0To1();
52 m_Light.SetIntensity( efficiency, GetCompEM().GetUpdateInterval() );
71 SetObjectMaterial(GLASS_ID, LIGHT_OFF_GLASS);
72 SetObjectMaterial(REFLECTOR_ID, LIGHT_OFF_REFLECTOR);
79 super.OnInventoryExit(player);
81 if ( GetCompEM().IsWorking() )
85 vector ori_rotate = player.GetOrientation();
86 ori_rotate = ori_rotate +
Vector(270,0,0);
87 SetOrientation(ori_rotate);