Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_AdditionalGameModeSettingsComponent.c
Go to the documentation of this file.
1[ComponentEditorProps(category: "GameScripted/GameMode", description: "")]
5
6enum SCR_ENametagRelationFilter
7{
8 SHOW_HOSTILE = 1 << 0,
13}
14
15enum SCR_ENametagControllerFilter
16{
17 SHOW_PLAYERS = 1 << 0,
18 SHOW_AI = 1 << 1,
19}
20
22{
23 protected static SCR_AdditionalGameModeSettingsComponent s_Instance;
24
25 [Attribute("1", desc: "If true team kill punishment is enabled, otherwise it is disabled", category: "Teamkilling"), RplProp(onRplName: "OnAdditionalSettingsChanged")]
27
28 [Attribute("1", desc: "If true allows for vehicles (and potential other entities) to be refunded at depods.", category: "Entity Refund"), RplProp(onRplName: "OnAdditionalSettingsChanged")]
30
31 [Attribute("#AR-Editor_Action_Disabled_By_GM", desc: "Shown on the entity action why refunding is disabled. The action is simply hidden if this is empty.", category: "Entity Refund")]
33
34 [Attribute("1", desc: "If true it will show additional information in form of ui element that shows ballistic data (f.e. in mortars).", category: "Entity Refund"), RplProp(onRplName: "OnAdditionalSettingsChanged")]
36
37 [Attribute("1", desc: "If true, vehicle (wreck) salvage is enabled, otherwise it is disabled", category: "Vehicle Salvage"), RplProp()]
39
40 [Attribute((SCR_ENametagRelationFilter.SHOW_SAME_FACTION + SCR_ENametagRelationFilter.SHOW_GROUP_MEMBERS + SCR_ENametagRelationFilter.SHOW_MILITARY_ALLIES + SCR_ENametagRelationFilter.SHOW_CIVILIAN_ALLIES).ToString(), desc: "", category: "Nametag Filters", uiwidget: UIWidgets.Flags, enumType: SCR_ENametagRelationFilter), RplProp(onRplName: "OnNametagRelationFilterUpdated")]
41 protected SCR_ENametagRelationFilter m_eNametagRelationFilters;
42
43 [Attribute((SCR_ENametagControllerFilter.SHOW_AI + SCR_ENametagControllerFilter.SHOW_PLAYERS).ToString(), desc: "", category: "Nametag Filters", uiwidget: UIWidgets.Flags, enumType: SCR_ENametagControllerFilter), RplProp(onRplName: "OnNametagControllerFilterUpdated")]
44 protected SCR_ENametagControllerFilter m_eNametagControllerFilters;
45
46 [Attribute(desc: "If true artillery ai command will get position offset based on the distance from the player to the position at which player ordered the artillery")]
48
49 [RplProp(onRplName: "OnNightNoiseSettingChanged"), Attribute(defvalue: "1", desc: "Disable noise effect which will be visible in dark places")]
51
54
55
57
58 //------------------------------------------------------------------------------------------------
62 {
63 return s_Instance;
64 }
65
66 //------------------------------------------------------------------------------------------------
71
72 //------------------------------------------------------------------------------------------------
80
81 //------------------------------------------------------------------------------------------------
83 {
85 return;
86
88 }
89
90 //------------------------------------------------------------------------------------------------
97
98 //------------------------------------------------------------------------------------------------
108
109 //------------------------------------------------------------------------------------------------
116
117 //------------------------------------------------------------------------------------------------
127
128 //------------------------------------------------------------------------------------------------
131 bool HasNametagRelationFilters(SCR_ENametagRelationFilter filter)
132 {
133 return SCR_Enum.HasFlag(m_eNametagRelationFilters, filter);
134 }
135
136 //------------------------------------------------------------------------------------------------
138 SCR_ENametagRelationFilter GetNametagRelationFilters()
139 {
141 }
142
143 //------------------------------------------------------------------------------------------------
147 void SetNametagRelationFilters(SCR_ENametagRelationFilter filters, int playerId = -1)
148 {
149 if (!GetGameMode().IsMaster())
150 return;
151
152 if (m_eNametagRelationFilters == filters)
153 return;
154
156
158 Replication.BumpMe();
159
160 if (playerId > 0)
161 SCR_NotificationsComponent.SendToEveryone(ENotification.EDITOR_NAMETAG_RELATION_FILTER_CHANGED, playerId);
162 }
163
164 //------------------------------------------------------------------------------------------------
168 bool HasNametagControllerFilter(SCR_ENametagControllerFilter filter)
169 {
170 return SCR_Enum.HasFlag(m_eNametagControllerFilters, filter);
171 }
172
173 //------------------------------------------------------------------------------------------------
175 SCR_ENametagControllerFilter GetNametagControllerFilters()
176 {
178 }
179
180 //------------------------------------------------------------------------------------------------
184 void SetNametagControllerFilters(SCR_ENametagControllerFilter filters, int playerId = -1)
185 {
186 if (!GetGameMode().IsMaster())
187 return;
188
189 if (m_eNametagControllerFilters == filters)
190 return;
191
193
195 Replication.BumpMe();
196
197 if (playerId > 0)
198 SCR_NotificationsComponent.SendToEveryone(ENotification.EDITOR_NAMETAG_CONTROLLER_FILTER_CHANGED, playerId);
199 }
200
201 //------------------------------------------------------------------------------------------------
208
209 //------------------------------------------------------------------------------------------------
213 void SetEnableTeamKillPunishment_S(bool enablePunishment, int playerID = -1)
214 {
215 if (m_bEnableTeamKillPunishment == enablePunishment || !GetGameMode().IsMaster())
216 return;
217
218 m_bEnableTeamKillPunishment = enablePunishment;
219
220 if (playerID > 0)
221 {
223 SCR_NotificationsComponent.SendToEveryone(ENotification.EDITOR_TEAMKILL_PUNISHMENT_ENABLED, playerID);
224 else
225 SCR_NotificationsComponent.SendToEveryone(ENotification.EDITOR_TEAMKILL_PUNISHMENT_DISABLED, playerID);
226 }
227
229 Replication.BumpMe();
230 }
231
232 //------------------------------------------------------------------------------------------------
238
239 //------------------------------------------------------------------------------------------------
243 void SetAllowEntityRefundingAction_S(bool allowRefunding, int playerID = -1)
244 {
245 if (m_bAllowEntityRefundingAction == allowRefunding || !GetGameMode().IsMaster())
246 return;
247
248 m_bAllowEntityRefundingAction = allowRefunding;
249
250 if (playerID > 0)
251 {
253 SCR_NotificationsComponent.SendToEveryone(ENotification.EDITOR_REFUND_ENTITY_AT_DEPOTS_ENABLED, playerID);
254 else
255 SCR_NotificationsComponent.SendToEveryone(ENotification.EDITOR_REFUND_ENTITY_AT_DEPOTS_DISABLED, playerID);
256 }
257
259 Replication.BumpMe();
260 }
261
262 //------------------------------------------------------------------------------------------------
268
269 //------------------------------------------------------------------------------------------------
275
276 //------------------------------------------------------------------------------------------------
280 void SetProjectileBallisticInfoVisibility_S(bool shouldShow, int playerID = -1)
281 {
283 return;
284
286
288 Replication.BumpMe();
289
290 if (playerID <= 0)
291 return;
292
294 SCR_NotificationsComponent.SendToEveryone(ENotification.EDITOR_MORTAR_BALLISTIC_DATA_VISIBILITY_ENABLED, playerID);
295 else
296 SCR_NotificationsComponent.SendToEveryone(ENotification.EDITOR_MORTAR_BALLISTIC_DATA_VISIBILITY_DISABLED, playerID);
297 }
298
299 //------------------------------------------------------------------------------------------------
303 {
305 }
306
307 //------------------------------------------------------------------------------------------------
311 void SetEnableVehicleSalvage_S(bool enableSetting, int playerID = -1)
312 {
313 if (m_bEnableVehicleSalvage == enableSetting || !GetGameMode().IsMaster())
314 return;
315
316 m_bEnableVehicleSalvage = enableSetting;
317
318 if (playerID > 0)
319 {
321 SCR_NotificationsComponent.SendToEveryone(ENotification.EDITOR_VEHICLE_SALVAGE_ENABLED, playerID);
322 else
323 SCR_NotificationsComponent.SendToEveryone(ENotification.EDITOR_VEHICLE_SALVAGE_DISABLED, playerID);
324 }
325
327 Replication.BumpMe();
328 }
329
330 //------------------------------------------------------------------------------------------------
332 void SetNightNoiseEffectState_S(bool disabled)
333 {
336 Replication.BumpMe();
337 }
338
339 //------------------------------------------------------------------------------------------------
344
345 //------------------------------------------------------------------------------------------------
346 override protected void OnPostInit(IEntity owner)
347 {
348 SetEventMask(owner, EntityEvent.INIT);
349 }
350
351 //------------------------------------------------------------------------------------------------
352 // constructor
357 {
358 if (s_Instance)
359 {
360 Print("'SCR_AdditionalGameModeSettingsComponent' exists twice in the world!", LogLevel.WARNING);
361 return;
362 }
363
364 s_Instance = this;
365 }
366
367}
ENotification
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
SCR_ENametagRelationFilter GetNametagRelationFilters()
SCR_ENametagControllerFilter GetNametagControllerFilters()
bool IsAdditionalArtileryOrderDistancePenaltyEnabled()
SCR_AdditionalGameModeSettingsComponentClass SHOW_CIVILIAN_ALLIES
show nametags of non-military allies of a different faction
void OnNametagRelationFilterUpdated()
On Updated function for relation filters.
SCR_AdditionalGameModeSettingsComponentClass SHOW_GROUP_MEMBERS
Show nametags of members of own group.
bool HasNametagRelationFilters(SCR_ENametagRelationFilter filter)
string GetEntityRefundingDisabledReason()
SCR_AdditionalGameModeSettingsComponentClass SHOW_HOSTILE
Show nametags of hostile entities.
void SetProjectileBallisticInfoVisibility_S(bool shouldShow, int playerID=-1)
SCR_AdditionalGameModeSettingsComponentClass SHOW_SAME_FACTION
Show nametags of members of own faction.
bool HasNametagControllerFilter(SCR_ENametagControllerFilter filter)
ScriptInvokerInt GetOnNametagControllerFilterUpdated()
SCR_AdditionalGameModeSettingsComponentClass SHOW_AI
Show nametags of AI.
SCR_AdditionalGameModeSettingsComponentClass SHOW_PLAYERS
Show nametags of players.
ScriptInvokerVoid GetOnChangeAdditionalSettingsInvoker()
void OnNametagControllerFilterUpdated()
On Updated function for controller filters.
ref ScriptInvokerInt m_OnNametagControllerFilterUpdated
ScriptInvokerInt GetOnNametagRelationFilterUpdated()
SCR_ENametagRelationFilter m_eNametagRelationFilters
void SetNametagControllerFilters(SCR_ENametagControllerFilter filters, int playerId=-1)
bool GetProjectileBallisticInfoVisibility()
ref ScriptInvokerInt m_OnNametagRelationFilterUpdated
SCR_AdditionalGameModeSettingsComponentClass SHOW_MILITARY_ALLIES
show nametags of military allies of a different faction
void SetNametagRelationFilters(SCR_ENametagRelationFilter filters, int playerId=-1)
void SetAllowEntityRefundingAction_S(bool allowRefunding, int playerID=-1)
bool m_bAdditionalArtilleryOrderDistancePenalty
void SetEnableTeamKillPunishment_S(bool enablePunishment, int playerID=-1)
ref ScriptInvokerVoid m_OnChangeAdditionalSettingsInvoker
void SCR_AdditionalGameModeSettingsComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
void SetNightNoiseEffectState_S(bool disabled)
LocalizedString m_sEntityRefundingDisabledReason
SCR_ENametagControllerFilter m_eNametagControllerFilters
void SetEnableVehicleSalvage_S(bool enableSetting, int playerID=-1)
SCR_BaseGameMode GetGameMode()
void SCR_BaseGameModeComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
SCR_CacheNoteComponentClass ScriptComponentClass RplProp()] protected ref array< string > m_aLines
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
ScriptInvokerBase< ScriptInvokerVoidMethod > ScriptInvokerVoid
ScriptInvokerBase< ScriptInvokerIntMethod > ScriptInvokerInt
Main replication API.
Definition Replication.c:14
static void SetNightNoiseEffectState(bool newState)
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
SCR_FieldOfViewSettings Attribute
EntityEvent
Various entity events.
Definition EntityEvent.c:14