36 [
Attribute(
"0 0 -0.03",
UIWidgets.EditBox,
desc:
"When strapped light entity is being aligned with weapon to adjust light angle, this entity is offset to avoid it visibly floating",
category:
"Flashlight")]
131 if (m_iMode == EGadgetMode.IN_SLOT)
133 else if (m_iMode == EGadgetMode.IN_HAND)
168 else if (m_bActivated)
179 m_Light.SetNearPlane(nearPlane);
186 if (inventoryItemComp)
190 if (slot && animAttr)
193 animAttr.GetAdditiveTransformLS(matLS);
194 matLS[3] = matLS[3] + m_vEquipmentSlotOffset + offset;
195 slot.SetAdditiveTransformLS(matLS);
218 IEntity occupant = compSlot.GetOccupant();
236 IEntity occupant = compSlot.GetOccupant();
254 super.ModeSwitch(mode, charOwner);
257 if (!inventoryItemComp)
276 inventoryItemComp.SetTraceable(mode != EGadgetMode.IN_SLOT);
278 if (m_bActivated && (mode == EGadgetMode.IN_STORAGE || mode == EGadgetMode.ON_GROUND))
283 else if (mode == EGadgetMode.IN_SLOT || mode == EGadgetMode.IN_HAND)
291 if (mode == EGadgetMode.IN_SLOT)
294 if (parentSlot && parentSlot.IsOccluded())
312 if (mode == EGadgetMode.IN_SLOT)
324 super.ModeClear(mode);
330 if (m_iMode == EGadgetMode.IN_STORAGE && !m_bActivated)
337 super.ToggleActive(state, context);
352 super.ActivateGadgetUpdate();
360 super.DeactivateGadgetUpdate();
362 if (m_iMode == EGadgetMode.IN_SLOT)
369 return EGadgetType.FLASHLIGHT;
381 if (!super.RplSave(writer))
384 writer.WriteBool(m_bActivated);
393 if (!super.RplLoad(reader))
396 reader.ReadBool(m_bActivated);
442 defColor.m_sDescription =
"CONFIGURE ME";
SCR_RplTestComponentClass m_CharacterOwner
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
class SCR_LenseColor EntityEditorProps(category:"GameScripted/Gadgets", description:"Flashlight", color:"0 0 255 255")
void ToggleActive()
Toggle map light.
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
proto external Managed FindComponent(typename typeName)
proto external IEntity GetChildren()
SCR_CompartmentAccessComponent m_CompartmentComp
override bool RplSave(ScriptBitWriter writer)
void DisableLight()
Remove light.
override void OnSlotOccludedStateChanged(bool occluded)
float m_fLightNearPlaneHand
void SwitchLenses(int filter)
void OnCompartmentEntered(IEntity targetEntity, BaseCompartmentManagerComponent manager, int mgrID, int slotID, bool move)
SCR_CompartmentAccessComponent event.
override bool IsVisibleEquipped()
override bool OnTicksOnRemoteProxy()
float m_fLightNearPlaneVehicle
float m_fLightNearPlaneStrapped
void ModeClear(EGadgetMode mode)
ParametricMaterialInstanceComponent m_EmissiveMaterial
void UpdateLightState()
Update state of light ON/OFF.
void EnableLight()
Spawn light entity.
override void ActivateAction()
override void Update(float timeSlice)
ref array< ref SCR_LenseColor > m_aLenseArray
void DeactivateGadgetUpdate()
SCR_CharacterControllerComponent m_CharController
vector m_vFlashlightAdjustOffset
override EGadgetType GetType()
void SetShadowNearPlane(bool state, bool isLeavingVehicle=false)
override bool RplLoad(ScriptBitReader reader)
int GetNumberOfAvailableLenses()
override void OnToggleActive(bool state)
void OnCompartmentLeft(IEntity targetEntity, BaseCompartmentManagerComponent manager, int mgrID, int slotID, bool move)
SCR_CompartmentAccessComponent event.
void AdjustTransform(vector offset=vector.Zero)
void ToggleActive(bool state, SCR_EUseContext context)
void ActivateGadgetUpdate()
void OnOwnerLifeStateChanged(ECharacterLifeState previousLifeState, ECharacterLifeState newLifeState)
SCR_CompartmentAccessComponent event.
void CycleThroughLenses(bool direction)
float m_fEmissiveIntensity
override void EOnInit(IEntity owner)
void ModeSwitch(EGadgetMode mode, IEntity charOwner)
static float FixAngle(float angle, float units=Math.PI)
IEntity GetOwner()
Owner entity of the fuel tank.
SCR_FieldOfViewSettings Attribute