5 [
Attribute(
"0", UIWidgets.ComboBox,
"Set wristwatch type",
"", ParamEnumArray.FromEnum(EWristwatchType),
category:
"Wristwatch")]
8 [
Attribute(
"{6ECDF523E1035A0F}Prefabs/Items/Equipment/Watches/Watch_SandY184A_Map.et",
desc:
"Wristwatch prefab used for display within 2D map",
category:
"Wristwatch")]
9 ResourceName m_sMapResource;
11 bool m_bSignalInit =
false;
12 int m_iSignalHour = -1;
13 int m_iSignalMinute = -1;
14 int m_iSignalSecond = -1;
15 int m_iSignalDay = -1;
19 void InitSignals(IEntity owner)
21 SignalsManagerComponent signalMgr = SignalsManagerComponent.Cast( owner.FindComponent( SignalsManagerComponent ) );
26 m_iSignalHour = signalMgr.FindSignal(
"Hour");
27 m_iSignalMinute = signalMgr.FindSignal(
"Minute");
28 m_iSignalSecond = signalMgr.FindSignal(
"Second");
30 if (m_iWristwatchType == EWristwatchType.VOSTOK)
31 m_iSignalDay = signalMgr.FindSignal(
"Day");
33 if (m_iSignalHour != -1 && m_iSignalMinute != -1 && m_iSignalSecond != -1)
47 class SCR_WristwatchComponent : SCR_GadgetComponent
74 m_TimeMgr = world.GetTimeAndWeatherManager();
99 if (System.IsConsoleApp())
115 m_iMode = EGadgetMode.IN_HAND;
121 m_TimeMgr = world.GetTimeAndWeatherManager();
127 override void ModeSwitch(EGadgetMode mode, IEntity charOwner)
129 super.ModeSwitch(mode, charOwner);
131 if (mode == EGadgetMode.IN_HAND)
141 if (mode == EGadgetMode.IN_HAND)
143 m_bActivated =
false;
147 super.ModeClear(mode);
153 super.ActivateGadgetUpdate();
157 itemComponent.ActivateOwner(
true);
163 super.DeactivateGadgetUpdate();
167 itemComponent.ActivateOwner(
false);
173 return EGadgetType.WRISTWATCH;
191 super.OnPostInit(owner);
194 m_SignalManager = SignalsManagerComponent.Cast( owner.FindComponent( SignalsManagerComponent ) );