29 static string LIGHT_OFF_GLASS =
"dz\\gear\\camping\\Data\\spotlight_glass.rvmat";
31 static string LIGHT_ON_GLASS =
"dz\\gear\\camping\\Data\\spotlight_glass_on.rvmat";
32 static string LIGHT_ON_REFLECTOR =
"dz\\gear\\camping\\Data\\spotlight_glass_on.rvmat";
46 RegisterNetSyncVariableBool(
"m_IsFolded");
56 if (GetCompEM().IsPlugged())
58 if (!GetHierarchyRoot())
126 super.OnItemLocationChanged(old_owner, new_owner);
144 if (player && player.GetItemInHands() ==
this)
146 Fold(GetCompEM().IsPlugged());
158 bool isPlugged = GetCompEM().IsPlugged();
160 bool isInHands = player && player.GetItemInHands() ==
this;
184 if (GetCompEM().IsWorking())
218 if (GetCompEM().IsWorking())
238 void Fold(
bool keep_connected =
false)
243 GetCompEM().SwitchOff();
244 GetCompEM().UnplugThis();
260 super.OnStoreSave(ctx);
268 if (!super.OnStoreLoad(ctx, version))
272 bool b_is_folded =
false;
273 if (!ctx.
Read(b_is_folded))
290 if (!super.CanPutInCargo(parent))
293 return !GetCompEM().IsPlugged();
298 if (!super.CanPutIntoHands(parent))
329 super.OnPlacementStarted(player);
337 foreach (
string selection : selections)
340 playerPB.GetHologramServer().SetSelectionToRefresh(selection);
342 playerPB.GetHologramLocal().SetSelectionToRefresh(selection);
348 super.OnPlacementComplete(player, position, orientation);
356 super.OnPlacementCancelled(player);
368 return "placeSpotlight_SoundSet";
373 return "spotlight_deploy_SoundSet";
378 if (MemoryPointExists(
"invView2") && !
m_IsFolded)
PlaceObjectActionReciveData ActionReciveData ActionDeployObject()
void AddAction(typename actionName)
void RemoveAction(typename actionName)
override bool IsHologram()
override bool IsBeingPlaced()
ref EffectSound m_DeployLoopSound
DEPRECATED.
Wrapper class for managing sound through SEffectManager.
override void OnSwitchOn()
static const int ID_REFLECTOR_FOLDED
EffectSound m_SoundTurnOn
override void OnIsPlugged(EntityAI source_device)
static const string SEL_REFLECTOR_COMP_U
override bool OnStoreLoad(ParamsReadContext ctx, int version)
EffectSound m_SoundTurnOff
override void OnWorkStart()
override int GetViewIndex()
override void OnPlacementStarted(Man player)
override void OnItemLocationChanged(EntityAI old_owner, EntityAI new_owner)
override bool CanPutIntoHands(EntityAI parent)
override bool IsElectricAppliance()
void PlayDeployLoopSound()
override void SetActions()
override void OnInitEnergy()
static const string SEL_CORD_PLUGGED_U
static string LIGHT_OFF_REFLECTOR
static const string SEL_CORD_FOLDED_F
static const string SEL_GLASS_F
static const int ID_REFLECTOR_UNFOLDED
static const string SEL_PLACING
override string GetDeploySoundset()
static const string SEL_GLASS_U
override void OnWorkStop()
static const int ID_GLASS_UNFOLDED
static vector m_LightLocalPosition
const string SOUND_TURN_OFF
override void OnStoreSave(ParamsWriteContext ctx)
const string SOUND_TURN_ON
override void OnPlacementCancelled(Man player)
static const string SEL_REFLECTOR_U
bool m_EvaluateDeployment
override void OnIsUnplugged(EntityAI last_energy_source)
static const string SEL_REFLECTOR_F
override void OnSwitchOff()
override bool CanPutInCargo(EntityAI parent)
static const int ID_GLASS_FOLDED
void UpdateAllSelections()
override string GetLoopDeploySoundset()
override void OnPlacementComplete(Man player, vector position="0 0 0", vector orientation="0 0 0")
static string LIGHT_ON_GLASS
static const string SEL_CORD_PLUGGED_F
void Fold(bool keep_connected=false)
static vector m_LightLocalOrientation
void StopDeployLoopSound()
DEPRECATED.
static const string SEL_INVENTORY
override bool IsDeployable()
override void EOnInit(IEntity other, int extra)
static string LIGHT_ON_REFLECTOR
static const string SEL_CORD_FOLDED_U
static string LIGHT_OFF_GLASS
proto bool Write(void value_out)
proto bool Read(void value_in)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Serializer ParamsReadContext
proto native CGame GetGame()
Serializer ParamsWriteContext