10 const string DEFAULT_POS_XYZ =
"<1,2,3>";
14 const string CONST_DEFAULT_PRESET_PREFIX =
"[Default]";
15 static float DEBUG_MAP_ZOOM = 1;
16 static int ITEMS_SELECTED_ROW = -1;
17 static int PRESETS_SELECTED_ROW = 0;
19 static int m_ObjectsScope = 2;
20 static bool SHOW_OTHERS = 0;
22 static float DRAW_DISTANCE = 1000;
33 ref
array<string> m_CategoryButtonsNames = {
"FIREARMS",
"MELEE",
"ATTACHMENTS",
"MAGAZINES",
"AMMO",
"FOOD",
"MEDICAL",
"CARS",
"BACKPACKS"};
73 m_PreviewEntity.Delete();
75 DEBUG_MAP_ZOOM = m_DebugMapWidget.GetScale();
77 ITEMS_SELECTED_ROW = m_ObjectsTextListbox.GetSelectedRow();
78 PRESETS_SELECTED_ROW = m_PresetsTextListbox.GetSelectedRow();
79 ITEMS_IN_PRESET_SELECTED_ROW = m_PresetItemsTextListbox.GetSelectedRow();
81 m_PresetsTextListbox.ClearItems();
83 PluginRemotePlayerDebugClient plugin_remote_client = PluginRemotePlayerDebugClient.Cast(
GetPlugin(PluginRemotePlayerDebugClient));
84 if (SHOW_OTHERS && plugin_remote_client)
92 if (m_ItemDisagPlugin)
93 m_ItemDisagPlugin.OnScriptMenuOpened(
false);
100 m_RefreshFilterTimer.Stop();
110 m_ButtonsWindowWidget = layoutRoot.FindAnyWidget(
"TabButtons");
111 m_ButtonsWindowWidget.Show(
true);
113 m_DebugMapWidget =
MapWidget.Cast(layoutRoot.FindAnyWidget(
"MapWidget"));
115 m_Tabs[TAB_ITEMS] = layoutRoot.FindAnyWidget(
"ItemsPanel");
116 m_Tabs[TAB_CONFIGS] = layoutRoot.FindAnyWidget(
"ConfigsPanel");
117 m_Tabs[TAB_ENSCRIPT] = layoutRoot.FindAnyWidget(
"EnScriptPanel");
118 m_Tabs[TAB_ENSCRIPT_SERVER] = layoutRoot.FindAnyWidget(
"EnScriptPanel");
119 m_Tabs[TAB_GENERAL] = layoutRoot.FindAnyWidget(
"GeneralPanel");
120 m_Tabs[TAB_OUTPUT] = layoutRoot.FindAnyWidget(
"OutputPanel");
121 m_Tabs[TAB_VICINITY] = layoutRoot.FindAnyWidget(
"VicinityPanel");
122 m_Tabs[TAB_SOUNDS] = layoutRoot.FindAnyWidget(
"SoundsPanel");
123 m_Tabs[TAB_WEATHER] = layoutRoot.FindAnyWidget(
"WeatherPanel");
125 m_Tab_buttons[TAB_ITEMS] = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"ItemsButtonWidget"));
126 m_Tab_buttons[TAB_CONFIGS] = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"ConfigsButtonWidget"));
127 m_Tab_buttons[TAB_ENSCRIPT] = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"EnScriptButtonWidget"));
128 m_Tab_buttons[TAB_ENSCRIPT_SERVER] = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"EnScriptButtonWidgetServer"));
129 m_Tab_buttons[TAB_GENERAL] = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"GeneralButtonWidget"));
130 m_Tab_buttons[TAB_OUTPUT] = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"OutputButtonWidget"));
131 m_Tab_buttons[TAB_VICINITY] = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"VicinityWidget"));
132 m_Tab_buttons[TAB_SOUNDS] = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"SoundsWidget"));
133 m_Tab_buttons[TAB_WEATHER] = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"WeatherButtonWidget"));
136 m_ClientLogListbox = TextListboxWidget.Cast(layoutRoot.FindAnyWidget(
"TextListbox"));
137 m_ScriptOutputListbox = TextListboxWidget.Cast(layoutRoot.FindAnyWidget(
"ScriptOutputListbox"));
138 m_ClientLogClearButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"ButtonClear"));
139 m_ClientLogScrollCheckbox = CheckBoxWidget.Cast(layoutRoot.FindAnyWidget(
"CheckBoxAutoScroll"));
141 m_DiagToggleTextListbox = TextListboxWidget.Cast(layoutRoot.FindAnyWidget(
"DiagToggle"));
142 m_DiagToggleButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"DiagToggleButton"));
144 m_DiagDrawmodeTextListbox = TextListboxWidget.Cast(layoutRoot.FindAnyWidget(
"DiagDrawmode"));
145 m_DiagDrawButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"DiagDrawButton"));
146 m_DrawInWorld = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"ButtonDrawItem"));
147 m_DrawInWorldClear = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"ButtonDrawItemClear"));
149 m_PositionsListbox = TextListboxWidget.Cast(layoutRoot.FindAnyWidget(
"PositionsList"));
150 m_TeleportButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"ButtonTeleport"));
151 m_ButtonCopyPos = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"Button_CopyPos"));
152 m_CopySoundset = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"SoundsetCopy"));
153 m_PlaySoundset = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"PlaySoundset"));
154 m_PlaySoundsetLooped = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"PlaySoundsetLooped"));
155 m_StopSoundset = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"StopSoundset"));
156 m_TeleportX = EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"TeleportX"));
157 m_TeleportY = EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"TeleportY"));
158 m_TeleportXYZ = EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"TeleportXYZ"));
159 m_PlayerCurPos =
TextWidget.Cast(layoutRoot.FindAnyWidget(
"PlayerPosLabel"));
160 m_PlayerMouseDiff =
TextWidget.Cast(layoutRoot.FindAnyWidget(
"PlayerMouseDiff"));
161 m_MouseCurPos =
TextWidget.Cast(layoutRoot.FindAnyWidget(
"MousePosLabel"));
162 m_LogsEnabled = CheckBoxWidget.Cast(layoutRoot.FindAnyWidget(
"cbx_LogsEnabled"));
163 m_HudDCharStats = CheckBoxWidget.Cast(layoutRoot.FindAnyWidget(
"cbx_CharacterStats"));
164 m_HudDCharLevels = CheckBoxWidget.Cast(layoutRoot.FindAnyWidget(
"cbx_CharacterLevels"));
165 m_HudDCharStomach = CheckBoxWidget.Cast(layoutRoot.FindAnyWidget(
"cbx_CharacterStomach"));
166 m_HudDCharModifiers = CheckBoxWidget.Cast(layoutRoot.FindAnyWidget(
"cbx_CharacterModifiers"));
167 m_HudDCharAgents = CheckBoxWidget.Cast(layoutRoot.FindAnyWidget(
"cbx_CharacterAgents"));
168 m_HudDCharDebug = CheckBoxWidget.Cast(layoutRoot.FindAnyWidget(
"cbx_CharacterDebug"));
169 m_HudDFreeCamCross = CheckBoxWidget.Cast(layoutRoot.FindAnyWidget(
"cbx_FreeCamCross"));
170 m_HudDTemperature = CheckBoxWidget.Cast(layoutRoot.FindAnyWidget(
"cbx_Temp"));
171 m_HudDVersion = CheckBoxWidget.Cast(layoutRoot.FindAnyWidget(
"cbx_Version"));
172 m_ItemPreviewCheckbox = CheckBoxWidget.Cast(layoutRoot.FindAnyWidget(
"ItemPreviewCheckbox"));
173 m_LocationAddButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"AddButton"));
174 m_LocationRemoveButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"RemoveButton"));
175 m_FilterOrderButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"ObjectFilterSortButton"));
176 m_DumpParamButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"DumpParamButton"));
177 m_FilterOrderImage = ImageWidget.Cast(layoutRoot.FindAnyWidget(
"ObjectFilterSortPic"));
179 m_CategoryMergeType = CheckBoxWidget.Cast(layoutRoot.FindAnyWidget(
"CategoryMergeType"));
181 m_TimeSlider = SliderWidget.Cast(layoutRoot.FindAnyWidget(
"TimeSlider"));
182 m_DateYear = EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"DateYear"));
183 m_DateMonth = EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"DateMonth"));
184 m_DateDay = EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"DateDay"));
185 m_DateHour = EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"DateHour"));
186 m_DateMinute = EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"DateMinute"));
188 m_ShowProtected = CheckBoxWidget.Cast(layoutRoot.FindAnyWidget(
"ShowProtectedCheckbox"));
189 m_ShowOthers = CheckBoxWidget.Cast(layoutRoot.FindAnyWidget(
"ShowOthersCheckbox"));
191 m_ClearInventory = CheckBoxWidget.Cast(layoutRoot.FindAnyWidget(
"ForceClearCheckbox"));
195 m_DrawDistanceWidget = EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"DrawItemDistance"));
197 m_EnfScriptEdit = MultilineEditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"MultilineEditBoxWidget0"));
198 m_EnfScriptRun = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"RunButton"));
199 m_EnfScriptClear = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"ClearButton"));
201 m_ObjectFilter = EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"ObjectFilter"));
202 m_SpawnDistanceEditBox = EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"SpawnDistance"));
203 m_SelectedObjectText =
TextWidget.Cast(layoutRoot.FindAnyWidget(
"SelectedObject"));
204 m_ObjectsTextListbox = TextListboxWidget.Cast(layoutRoot.FindAnyWidget(
"ObjectsList"));
205 m_PresetsTextListbox = TextListboxWidget.Cast(layoutRoot.FindAnyWidget(
"PresetList"));
206 m_PresetItemsTextListbox = TextListboxWidget.Cast(layoutRoot.FindAnyWidget(
"PresetItemsList"));
207 m_PresetNewButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"NewPresetButton"));
208 m_PresetDeleteButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"DeletePresetButton"));
209 m_PresetRenameButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"RenamePresetButton"));
210 m_PresetSetDefaultButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"SetDefaultPresetButton"));
211 m_PresetAddItemtButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"AddToPresetButton"));
212 m_ItemNameCopy = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"ItemNameCopy"));
213 m_PresetRemoveItemButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"RemoveFromPresetButton"));
214 m_ItemMoveUpButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"ItemMoveUpButton"));
215 m_ItemMoveDownButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"ItemMoveDownButton"));
218 m_SoundFilter = EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"SoundsFilter"));
219 m_SoundsTextListbox = TextListboxWidget.Cast(layoutRoot.FindAnyWidget(
"SoundsList"));
222 m_QuantityEditBox = EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"QuantityValue"));
223 m_DamageEditBox = EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"DamageValue"));
224 m_ItemDamageLabel =
TextWidget.Cast(layoutRoot.FindAnyWidget(
"DamageLabel"));
225 m_ItemQuantityLabel =
TextWidget.Cast(layoutRoot.FindAnyWidget(
"QuantityLabel"));
227 m_SpawnInInvButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"ButtonSpawnInInv"));
228 m_SpawnGroundButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"ButtonSpawnInGround"));
229 m_SpawnAsAttachment = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"SpawnAsAttachment"));
230 m_SpawnSpecial = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"SpawnSpecial"));
231 m_SpawnBatchButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"ButtonSpawnBatch"));
234 m_RectSpawnColumn = EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"RectangleColumnValue"));
235 m_RectSpawnRow = EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"RectangleRowValue"));
236 m_BatchSpawnQuantity = EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"BatchCount"));
238 m_RectSpawnColumnStep = EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"RectangleStepXValue"));
239 m_RectSpawnRowStep = EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"RectangleStepYValue"));
242 m_HelpTextListboxWidget = TextListboxWidget.Cast(layoutRoot.FindAnyWidget(
"HelpTextListboxWidget"));
244 m_VicinityListbox = TextListboxWidget.Cast(layoutRoot.FindAnyWidget(
"VicinityListbox"));
246 PluginDeveloper module_dev = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
248 m_WgtClassesConfig = layoutRoot.FindAnyWidget(
"ClassesPanel");
251 m_ObjectConfigFilter = EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"ObjectConfigFilter"));
252 m_ConfigHierarchyTextListbox = TextListboxWidget.Cast(layoutRoot.FindAnyWidget(
"ConfigHierarchy"));
253 m_ConfigVariablesTextListbox = TextListboxWidget.Cast(layoutRoot.FindAnyWidget(
"ConfigVariables"));
254 m_SelectedRowCopy = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"SelectedRowCopy"));
256 m_CloseConsoleButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"CloseConsoleButtonWidget"));
257 m_WatchItem = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"WatchItemButton"));
258 m_PlaySoundsetButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"PlaySoundsetButton"));
260 m_MissionGameplay = MissionGameplay.Cast(
GetGame().GetMission());
261 m_Developer = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
263 m_ConfigDebugProfileFixed = PluginConfigDebugProfileFixed.Cast(
GetPlugin(PluginConfigDebugProfileFixed));
264 m_ModuleConfigViewer = PluginConfigViewer.Cast(
GetPlugin(PluginConfigViewer));
282 for (i = 0; i < diag_names.Count(); i++)
284 m_DiagToggleTextListbox.AddItem(diag_names.Get(i), NULL, 0);
288 for (i = 0; i < diag_names.Count(); i++)
290 m_DiagDrawmodeTextListbox.AddItem(diag_names.Get(i), NULL, 0);
299 m_EnscriptHistoryRow = 0;
300 m_EnscriptHistoryRowServer = 0;
302 m_EnscriptConsoleHistory = m_ModuleLocalEnscriptHistory.GetAllLines();
303 m_EnscriptConsoleHistoryServer = m_ModuleLocalEnscriptHistoryServer.GetAllLines();
307 SelectTab(m_selected_tab);
312 m_PresetDeleteButton.Show(
false);
313 m_PresetRenameButton.Show(
false);
315 ShowItemTransferButtons();
322 UpdateHudDebugSetting();
324 m_DebugMapWidget.SetScale(DEBUG_MAP_ZOOM);
326 m_TeleportXYZ.SetText(DEFAULT_POS_XYZ);
328 m_LateInit.Run(0.05,
this,
"LateInit", null,
false);
330 int year,month,day,hour,minute;
332 RefreshDateWidgets(year,month, day, hour, minute);
345 foreach (
string s:m_BaseConfigClasses)
348 CheckBoxWidget cbw = CheckBoxWidget.Cast(w.FindAnyWidget(
"Item"));
351 int indx = m_ClassCheckboxes.Count();
352 m_ClassCheckboxes.Insert(cbw,indx);
355 if (flag1 & (
int)
Math.
Pow(2, indx))
357 string base_class_name = m_BaseConfigClasses.Get(indx);
358 m_BaseConfigClassesToggled.Insert(base_class_name);
359 cbw.SetChecked(
true);
368 m_DateYear.SetText(year.ToString());
369 m_DateMonth.SetText(month.ToString());
370 m_DateDay.SetText(day.ToString());
371 m_DateHour.SetText(hour.ToString());
372 m_DateMinute.SetText(minute.ToString());
373 m_TimeSlider.SetCurrent(time01 * 100);
378 int count = m_PositionsListbox.GetNumItems();
379 for (
int i = 0; i < count; i++)
382 m_PositionsListbox.GetItemData(i,0,data);
383 if (data.param1 ==
name)
391 m_FilterOrderReversed = reversed;
393 m_FilterOrderImage.SetRotation(0,0,180,
true);
395 m_FilterOrderImage.SetRotation(0,0,0,
true);
405 m_PositionsListbox.ClearItems();
409 m_ConfigDebugProfileFixed.GetLocationsData(locData,
false);
412 string name = dta.param1;
417 m_PositionsListbox.AddItem(
name,dta,0);
423 m_RunColor = m_EnfScriptRun.GetColor();
425 if (m_ItemDisagPlugin)
426 m_ItemDisagPlugin.OnScriptMenuOpened(
true);
429 if (!m_SelectedObjectIsPreset == 1 && ITEMS_SELECTED_ROW < m_ObjectsTextListbox.GetNumItems() && m_ObjectsTextListbox.GetNumItems() > 0 && ITEMS_SELECTED_ROW > -1)
431 m_ObjectsTextListbox.SelectRow(ITEMS_SELECTED_ROW);
432 m_ObjectsTextListbox.EnsureVisible(ITEMS_SELECTED_ROW);
435 m_SelectedObjectText.SetText(GetCurrentObjectName());
438 SetObject(GetCurrentObjectName());
440 m_PresetItemsTextListbox.SelectRow(-1);
441 m_SelectedObjectIsPreset = 0;
444 if (m_PresetsTextListbox.GetNumItems() >= 0)
446 m_PresetsTextListbox.SelectRow(PRESETS_SELECTED_ROW);
447 m_PresetsTextListbox.EnsureVisible(PRESETS_SELECTED_ROW);
450 if (m_ObjectsScope == 1)
451 m_ShowProtected.SetChecked(
true);
453 m_ShowProtected.SetChecked(
false);
455 m_ShowOthers.SetChecked(SHOW_OTHERS);
464 if (prevRow < m_PositionsListbox.GetNumItems())
465 m_PositionsListbox.SelectRow(prevRow);
472 if (m_ItemPreviewCheckbox)
479 m_RectSpawnRow.SetText(CfgParamInt.Cast(params.Get(0)).GetValue().ToString());
480 m_RectSpawnColumn.SetText(CfgParamInt.Cast(params.Get(1)).GetValue().ToString());
481 m_RectSpawnRowStep.SetText(CfgParamFloat.Cast(params.Get(2)).GetValue().ToString());
482 m_RectSpawnColumnStep.SetText(CfgParamFloat.Cast(params.Get(3)).GetValue().ToString());
486 foreach (
string name: m_CategoryButtonsNames)
488 string widget_name =
"ItemCategory" + counter;
490 CheckBoxWidget btw = CheckBoxWidget.Cast(layoutRoot.FindAnyWidget(widget_name));
494 m_CategoryButtonsWidgets.Insert(btw);
495 int bit = 1 << counter;
498 btw.SetChecked(
true);
507 if (ITEMS_IN_PRESET_SELECTED_ROW <= m_PresetItemsTextListbox.GetNumItems() && m_PresetItemsTextListbox.GetNumItems() > 0 && ITEMS_IN_PRESET_SELECTED_ROW > -1)
509 m_PresetItemsTextListbox.SelectRow(ITEMS_IN_PRESET_SELECTED_ROW);
510 m_PresetItemsTextListbox.EnsureVisible(ITEMS_IN_PRESET_SELECTED_ROW);
512 m_SelectedObjectText.SetText(
"Object : " + GetCurrentItemName());
513 SetObject(GetCurrentItemName());
514 m_SelectedObjectIsPreset = 0;
521 void Add(
string message,
bool isReload =
false)
523 if (message !=
string.
Empty)
525 if (m_AllowScriptOutput && m_ScriptOutputListbox)
528 m_ScriptOutputHistory.Insert(message);
529 m_ScriptOutputListbox.AddItem(
String(message), NULL, 0);
530 m_ScriptOutputListbox.EnsureVisible(m_ScriptOutputListbox.GetNumItems());
532 else if (m_ClientLogListbox)
534 m_ClientLogListbox.AddItem(
String(message), NULL, 0);
536 if (m_ClientLogScrollCheckbox.IsChecked())
538 m_ClientLogListbox.EnsureVisible(m_ClientLogListbox.GetNumItems());
562 EnscriptHistoryBack();
570 EnscriptHistoryForward();
598 m_EnscriptHistoryRow++;
599 history_index = m_EnscriptConsoleHistory.Count() - m_EnscriptHistoryRow - 1;
600 if (history_index > -1)
602 m_EnfScriptEdit.SetText(m_EnscriptConsoleHistory.Get(history_index));
604 else m_EnscriptHistoryRow--;
608 m_EnscriptHistoryRowServer++;
609 history_index = m_EnscriptConsoleHistoryServer.Count() - m_EnscriptHistoryRowServer - 1;
610 if (history_index > -1)
612 m_EnfScriptEdit.SetText(m_EnscriptConsoleHistoryServer.Get(history_index));
614 else m_EnscriptHistoryRowServer--;
642 m_EnscriptHistoryRow--;
643 history_index = m_EnscriptConsoleHistory.Count() - m_EnscriptHistoryRow - 1;
644 if (history_index < m_EnscriptConsoleHistory.Count())
646 m_EnfScriptEdit.SetText(m_EnscriptConsoleHistory.Get(history_index));
648 else m_EnscriptHistoryRow++;
653 m_EnscriptHistoryRowServer--;
654 history_index = m_EnscriptConsoleHistoryServer.Count() - m_EnscriptHistoryRowServer - 1;
655 if (history_index < m_EnscriptConsoleHistoryServer.Count())
657 m_EnfScriptEdit.SetText(m_EnscriptConsoleHistoryServer.Get(history_index));
659 else m_EnscriptHistoryRowServer++;
669 m_ClientLogListbox.ClearItems();
670 m_ScriptOutputListbox.ClearItems();
687 PrintS(message.ToString());
702 PrintS(message.ToString());
709 m_EnfScriptEdit.GetText(code);
710 string codeNoReplace = code;
712 m_AllowScriptOutput =
true;
713 code.
Replace(
"Print(",
"ScriptConsole.PrintS(");
714 code.
Replace(
"Print (",
"ScriptConsole.PrintS(");
716 m_AllowScriptOutput =
false;
717 ColorRunButton(success);
719 m_EnscriptConsoleHistory.Insert(codeNoReplace);
720 m_ModuleLocalEnscriptHistory.AddNewLine(codeNoReplace);
728 m_EnfScriptRun.SetColor(
ARGB(255,0,255,0));
732 m_EnfScriptRun.SetColor(
ARGB(255,255,0,0));
739 m_EnfScriptRun.SetColor(m_RunColor);
745 m_EnfScriptEdit.GetText(code);
746 m_EnscriptConsoleHistoryServer.Insert(code);
747 m_ModuleLocalEnscriptHistoryServer.AddNewLine(code);
767 return ARGB(255,255,0,0);
769 return ARGB(255,0,255,0);
771 return ARGB(255,130,130,255);
773 return ARGB(255,255,255,0);
775 return ARGB(255,255,169,0);
787 filter.
Split(
" ", rawFilters);
792 foreach (
int i,
string f:rawFilters)
795 if (f.IndexOf(
":") == 1)
797 string clr = f.Substring(0, 1);
798 f = f.Substring(2, f.Length() - 2);
799 color = GetFilterColor(clr);
805 color =
ARGB(200,255,255,255);
809 colors.Insert(color);
813 void ChangeFilter(
TStringArray classes, TextListboxWidget widget, EditBoxWidget filterWidget,
int categoryMask = -1,
bool ignoreScope =
false)
820 PrepareFilters(filterWidget.GetText(),filters, filterColors);
827 for (
int i = 0; i < classes.Count(); i++)
829 string config_path = classes.Get(i);
832 for (
int j = 0; j < objects_count; j++)
840 if (scope >= m_ObjectsScope || ignoreScope)
842 int category_bit =
GetGame().
ConfigGetInt(config_path +
" " + child_name +
" debug_ItemCategory") - 1;
843 category_bit = (1 << category_bit);
845 bool display =
false;
847 if (category_bit & categoryMask)
853 string child_name_lower = child_name;
856 foreach (
int indx,
string filter:filters)
858 if (child_name_lower.
Contains(filter))
861 color = filterColors.Get(indx);
866 itemsByFilters.Set(filter, arr);
868 arr.Insert(child_name);
869 itemsAndColors.Insert(child_name,color);
874 else if (categoryMask == 0)
881 itemsArray.Insert(child_name);
891 foreach (
string it:itemsArray)
893 widget.AddItem(it, NULL, 0);
899 if (m_FilterOrderReversed)
902 foreach (
string f:filters)
908 foreach (
string itm: arr2)
910 int row = widget.AddItem(itm, NULL, 0);
911 int clr = itemsAndColors.Get(itm);
914 widget.SetItemColor(row, 0, clr);
926 m_ConfigTextField = m_ObjectConfigFilter.GetText();
928 if (m_ConfigTextField ==
"")
934 FindInHierarchy(m_ConfigTextField);
940 return super.OnKeyPress(w,
x,
y, key);
951 return super.OnKeyDown(w,
x,
y, key);
959 distance = DRAW_DISTANCE;
966 m_MarkedEntities.Clear();
967 foreach (
Object o: objects)
969 if (o.IsKindOf(type))
972 m_MarkedEntities.Insert(
new MapMarker(o.GetPosition(),
"",
COLOR_RED,eMapMarkerTypes.MARKERTYPE_MAP_BORDER_CROSS));
975 lines[0] = o.GetPosition();
976 lines[1] = o.GetPosition() +
"0 30 0";
978 m_DebugShapes.Insert(shape);
979 m_DebugShapes.Insert(line);
985 Debug.
Log(
string.Format(
"found %1 instances of type %1", i, type));
991 m_MarkedEntities.Clear();
992 foreach (
Shape s: m_DebugShapes)
996 m_DebugShapes.Clear();
1001 super.Update(timeslice);
1005 if (m_TabHandlers[i])
1006 m_TabHandlers[i].Update(timeslice);
1014 m_DebugMapWidget.ClearUserMarks();
1016 foreach (
MapMarker marker: m_MarkedEntities)
1018 m_DebugMapWidget.AddUserMark(marker.GetMarkerPos(),marker.GetMarkerText(), marker.GetMarkerColor(),
MapMarkerTypes.
GetMarkerTypeFromID(marker.GetMarkerIcon()));
1025 if (rpd.m_Player != player)
1027 vector dir = rpd.m_Pos - player.GetWorldPosition();
1030 string text = rpd.m_Name +
" " +dist +
"m.";
1031 m_DebugMapWidget.AddUserMark(rpd.m_Pos, text ,
COLOR_BLUE,
"\\dz\\gear\\navigation\\data\\map_tree_ca.paa");
1035 vector player_pos = player.GetWorldPosition();
1036 m_DebugMapWidget.AddUserMark(player_pos,
"You",
COLOR_RED,
"\\dz\\gear\\navigation\\data\\map_tree_ca.paa");
1037 if (player_pos != GetMapPos())
1038 m_DebugMapWidget.AddUserMark(GetMapPos(),
"Pos",
COLOR_BLUE,
"\\dz\\gear\\navigation\\data\\map_tree_ca.paa");
1040 if (!m_PlayerPosRefreshBlocked)
1041 RefreshPlayerPosEditBoxes();
1048 vector mouse_pos, world_pos;
1051 world_pos = m_DebugMapWidget.ScreenToMap(mouse_pos);
1055 float dst = (world_pos - player_pos).Length();
1059 m_MouseCurPos.SetText(
"Mouse: "+ MiscGameplayFunctions.TruncateToS(world_pos[0]) +
", "+ MiscGameplayFunctions.TruncateToS(world_pos[1]) +
", "+ MiscGameplayFunctions.TruncateToS(world_pos[2]));
1061 if (m_PlayerMouseDiff)
1063 m_PlayerMouseDiff.SetText(
"Distance: " + MiscGameplayFunctions.TruncateToS(dst));
1087 m_PresetItemsTextListbox.SelectRow(-1);
1089 ShowItemTransferButtons();
1090 m_SelectedObjectText.SetText(GetCurrentObjectName());
1091 SetObject(GetCurrentObjectName());
1094 m_SelectedObjectIsPreset = 0;
1103 m_PlayerCurPos.SetText(
"Pos: "+ MiscGameplayFunctions.TruncateToS(pos[0]) +
", "+ MiscGameplayFunctions.TruncateToS(pos[1]) +
", "+ MiscGameplayFunctions.TruncateToS(pos[2]));
1115 relativePath =
" " + relativePath;
1117 for (
int i = 0; i < m_BaseConfigClassesToggled.Count(); i++ )
1119 string config_path = m_BaseConfigClassesToggled.
Get(i);
1123 for (
int j = 0; j < objects_count; j++ )
1132 string path = config_path +
" " + child_name + relativePath +
" " + param;
1138 Print(child_name +
"," + param +
"," + value);
1154 super.OnMouseButtonDown(w,
x,
y,button);
1156 if (w == m_DebugMapWidget)
1160 m_PlayerPosRefreshBlocked =
true;
1161 int mouse_x,mouse_y;
1163 vector mouse_pos, world_pos;
1164 mouse_pos[0] = mouse_x;
1165 mouse_pos[1] = mouse_y;
1166 world_pos = m_DebugMapWidget.ScreenToMap(mouse_pos);
1169 SetMapPos(world_pos);
1171 else if (button == 1)
1182 super.OnClick(w,
x,
y, button);
1186 if (m_TabHandlers[z])
1187 m_TabHandlers[z].OnClick(w,
x,
y,button);
1192 int objects_row_index;
1195 PluginDeveloper module_dev = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
1197 if (w == m_ClientLogClearButton)
1202 else if (w == m_DumpParamButton)
1204 int selectedRowIndex = m_ConfigVariablesTextListbox.GetSelectedRow();
1206 if (selectedRowIndex > -1)
1209 m_ConfigVariablesTextListbox.GetItemText(selectedRowIndex,0,param);
1210 int index = param.
IndexOf(
"=");
1216 objects_row_index = m_ConfigHierarchyTextListbox.GetSelectedRow();
1217 if (objects_row_index > -1 && objects_row_index < m_ConfigHierarchyTextListbox.GetNumItems())
1220 m_ConfigHierarchyTextListbox.GetItemData(objects_row_index, 0, params);
1221 string path = params.param4;
1224 string relativePath;
1226 foreach (
int indx,
string s:pathArr)
1230 relativePath+= s+
" ";
1235 relativePath = relativePath.
Trim();
1237 Print(relativePath);
1242 DumpParam(paramFinal,relativePath);
1246 else if (w == m_ConfigHierarchyTextListbox)
1248 objects_row_index = m_ConfigHierarchyTextListbox.GetSelectedRow();
1251 if (objects_row_index > -1 && objects_row_index < m_ConfigHierarchyTextListbox.GetNumItems())
1254 m_ConfigHierarchyTextListbox.GetItemData(objects_row_index, 0, config_params);
1256 if (config_params.param1 ==
false)
1258 ExpandHierarchy(objects_row_index);
1262 CollapseHierarchy(objects_row_index);
1264 RenderVariables(objects_row_index);
1268 else if (w == m_PositionsListbox)
1271 vector position = GetCurrentLocationPos();
1273 m_TeleportX.SetText(position[0].
ToString());
1274 m_TeleportY.SetText(position[2].
ToString());
1276 if (IsCurrentPositionValid())
1283 else if (w == m_TeleportButton)
1285 float pos_x = m_TeleportX.GetText().ToFloat();
1286 float pos_z = m_TeleportY.GetText().ToFloat();
1289 if (m_TeleportXYZ.GetText() !=
"" && m_TeleportXYZ.GetText() != DEFAULT_POS_XYZ)
1291 string pos = m_TeleportXYZ.GetText();
1294 Teleport(player, v);
1297 else if (w == m_ButtonCopyPos)
1302 else if (w == m_CopySoundset)
1304 AddItemToClipboard(m_SoundsTextListbox);
1307 else if (w == m_LogsEnabled)
1319 else if (w == m_SpawnBatchButton)
1321 int count = m_BatchSpawnQuantity.GetText().ToInt();
1322 int rows = m_RectSpawnRow.GetText().ToInt();
1323 int columns = m_RectSpawnColumn.GetText().ToInt();
1324 float rowStep = m_RectSpawnRowStep.GetText().ToFloat();
1325 float columnStep = m_RectSpawnColumnStep.GetText().ToFloat();
1326 m_Developer.SpawnEntityOnGroundPatternGrid(player,
m_SelectedObject,count, m_DamageEditBox.GetText().ToFloat(), 1, rows, columns, rowStep, columnStep);
1330 else if (w == m_HudDCharStats)
1338 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
1342 else if (w == m_HudDCharLevels)
1350 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
1354 else if (w == m_HudDCharStomach)
1362 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
1366 else if (w == m_CategoryMergeType)
1372 ChangeFilterItems();
1374 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
1379 else if (w == m_WatchItem)
1381 int row = m_VicinityListbox.GetSelectedRow();
1383 if (m_VicinityItems.IsValidIndex(row))
1385 Object entity = m_VicinityItems.Get(row);
1389 PluginDeveloper.SetDeveloperItemClientEx(entity);
1395 else if (w == m_ItemPreviewCheckbox)
1400 if (!m_ItemPreviewCheckbox.IsChecked())
1406 else if (w == m_HudDVersion)
1414 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
1418 else if (w == m_HudDTemperature)
1426 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
1430 else if (w == m_HudDCharModifiers)
1438 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
1442 else if (w == m_HudDCharAgents)
1450 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
1454 else if (w == m_HudDCharDebug)
1462 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
1466 else if (w == m_HudDFreeCamCross)
1474 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
1480 else if (w == m_ObjectsTextListbox)
1485 else if (w == m_ObjectFilter)
1487 ChangeFilterItems();
1490 else if (w == m_SoundFilter)
1492 ChangeFilterSound();
1494 }
else if (w == m_SoundFilter)
1496 ChangeFilterSound();
1499 else if (w == m_SpawnInInvButton || w == m_SpawnGroundButton || w == m_SpawnAsAttachment || w == m_SpawnSpecial)
1501 SaveProfileSpawnDistance();
1503 objects_row_index = m_ObjectsTextListbox.GetSelectedRow();
1509 int hitComponentIndex;
1510 set<Object> hitObjects =
new set<Object>;
1512 DayZPhysics.
RaycastRV(rayStart, rayEnd, hitPos, hitNormal, hitComponentIndex, hitObjects, NULL, player,
false,
false, ObjIntersectView, 0.3);
1515 if (hitObjects.Count())
1516 target = hitObjects.Get(0);
1521 float distance = m_SpawnDistanceEditBox.GetText().ToFloat();
1522 if (m_SelectedObjectIsPreset == 1)
1526 case m_SpawnAsAttachment:
1528 if (target != NULL && target.IsInherited(
EntityAI))
1539 case m_SpawnGroundButton:
1545 case m_SpawnSpecial:
1561 float health = m_DamageEditBox.GetText().ToFloat() * MiscGameplayFunctions.GetTypeMaxGlobalHealth(
m_SelectedObject);
1562 float quantity = -1;
1565 if (cfgQuantity > 0)
1576 case m_SpawnGroundButton:
1578 m_Developer.SpawnEntityOnCursorDir(player,
m_SelectedObject, quantity, distance, health);
1582 case m_SpawnGroundPatternGrid:
1584 m_Developer.SpawnEntityOnCursorDir(player,
m_SelectedObject, quantity, distance, health);
1588 case m_SpawnSpecial:
1590 m_Developer.SpawnEntityOnCursorDir(player,
m_SelectedObject, quantity, distance, health,
true);
1594 case m_SpawnAsAttachment:
1596 if (target != NULL && target.IsInherited(
EntityAI))
1599 m_Developer.SpawnEntityAsAttachment(player, att_parent2,
m_SelectedObject, 100, -1);
1603 m_Developer.SpawnEntityAsAttachment(player, player,
m_SelectedObject, 100, -1);
1608 case m_SpawnInInvButton:
1613 case m_SpawnGroundButton:
1615 m_Developer.SpawnEntityOnCursorDir(player,
m_SelectedObject, quantity, distance, health);
1623 else if (w == m_DiagToggleButton)
1625 int toggle_row_index = m_DiagToggleTextListbox.GetSelectedRow();
1630 else if (w == m_DiagDrawButton)
1632 int draw_row_index = m_DiagDrawmodeTextListbox.GetSelectedRow();
1636 else if (w == m_CloseConsoleButton)
1642 else if (w == m_PresetsTextListbox)
1647 else if (w == m_PresetItemsTextListbox)
1649 m_ObjectsTextListbox.SelectRow(-1);
1651 ShowItemTransferButtons();
1652 m_SelectedObjectText.SetText(
"Object : " + GetCurrentItemName());
1653 SetObject(GetCurrentItemName());
1654 m_SelectedObjectIsPreset = 0;
1658 else if (w == m_PresetSetDefaultButton)
1660 if (GetCurrentPresetName()!=
"")
1662 SetDefaultPreset(GetCurrentPresetIndex());
1666 else if (w == m_PresetNewButton)
1671 else if (w == m_PresetDeleteButton)
1673 if (GetCurrentPresetName()!=
"")
1679 else if (w == m_PresetRenameButton)
1681 if (GetCurrentPresetName()!=
"")
1687 else if (w == m_PresetAddItemtButton)
1692 else if (w == m_ItemNameCopy)
1694 AddItemToClipboard(m_ObjectsTextListbox);
1697 else if (w == m_SelectedRowCopy)
1699 AddItemToClipboard(m_ConfigVariablesTextListbox);
1702 else if (w == m_PresetRemoveItemButton)
1704 RemoveItemFromPreset();
1707 else if (w == m_ItemMoveUpButton)
1712 else if (w == m_ItemMoveDownButton)
1717 else if (w == m_EnfScriptRun)
1720 RunEnscriptServer();
1725 else if (w == m_EnfScriptClear)
1727 m_ScriptOutputListbox.ClearItems();
1728 m_ScriptOutputHistory.Clear();
1731 else if (w == m_DrawInWorld)
1737 else if (w == m_DrawInWorldClear)
1742 else if (w == m_PlaySoundsetButton)
1749 else if (w == m_PlaySoundset || w == m_PlaySoundsetLooped)
1751 int selected_row_index = m_SoundsTextListbox.GetSelectedRow();
1752 string soundSetName;
1755 if (selected_row_index != -1)
1757 m_SoundsTextListbox.GetItemText(selected_row_index, 0, soundSetName);
1759 if (w == m_PlaySoundsetLooped)
1770 else if (w == m_StopSoundset)
1776 else if (w == m_LocationAddButton)
1778 ScriptConsoleAddLocation menu = ScriptConsoleAddLocation.Cast(
g_Game.GetUIManager().EnterScriptedMenu(
MENU_LOC_ADD,
this));
1779 menu.SetPosition(GetMapPos());
1782 else if (w == m_LocationRemoveButton)
1788 else if (w == m_FilterOrderButton)
1790 SetFilterOrder(!m_FilterOrderReversed);
1796 CheckBoxWidget cbw = CheckBoxWidget.Cast(w);
1798 if (cbw && m_ClassCheckboxes.Contains(cbw))
1801 int checkbox_index = m_ClassCheckboxes.Get(cbw);
1802 string base_class_name = m_BaseConfigClasses.Get(checkbox_index);
1804 int index_toggled = m_BaseConfigClassesToggled.Find(base_class_name);
1813 if (cbw.IsChecked())
1815 if (index_toggled == -1)
1817 m_BaseConfigClassesToggled.Insert(base_class_name);
1821 new_flag = (flag | (
int)
Math.
Pow(2, checkbox_index));
1825 else if (index_toggled != -1)
1827 m_BaseConfigClassesToggled.Remove(index_toggled);
1831 new_flag = (flag ^ (
int)
Math.
Pow(2, checkbox_index));
1852 if (w == m_Tab_buttons[i])
1864 super.OnDoubleClick(w,
x,
y, button);
1867 int objects_row_index;
1870 if (w == m_ObjectsTextListbox)
1873 m_PresetItemsTextListbox.SelectRow(-1);
1875 ShowItemTransferButtons();
1876 m_SelectedObjectText.SetText(
"Object : " + GetCurrentObjectName());
1880 m_SelectedObjectIsPreset = 0;
1883 SaveProfileSpawnDistance();
1885 objects_row_index = m_ObjectsTextListbox.GetSelectedRow();
1891 int hitComponentIndex;
1892 set<Object> hitObjects =
new set<Object>;
1893 DayZPhysics.
RaycastRV(rayStart, rayEnd, hitPos, hitNormal, hitComponentIndex, hitObjects, NULL, player);
1896 if (hitObjects.Count())
1897 target = hitObjects.Get(0);
1901 float distance = m_SpawnDistanceEditBox.GetText().ToFloat();
1905 m_Developer.SpawnEntityOnCursorDir(player,
m_SelectedObject, 100, distance);
1907 else if (button == 1)
1909 if (
GetGame().IsMultiplayer())
1916 player.LocalTakeEntityToHands(spawned_entity);
1922 if (w == m_DebugMapWidget)
1924 vector screen_to_map = m_DebugMapWidget.ScreenToMap(
Vector(
x,
y, 0));
1925 float pos_y_a =
GetGame().
SurfaceY(screen_to_map[0], screen_to_map[2]);
1927 float pos_y =
Math.
Max(pos_y_a, pos_y_b);
1928 screen_to_map[1] = pos_y;
1929 m_Developer.Teleport(player, screen_to_map);
1933 if (w == m_PositionsListbox)
1935 vector position = GetCurrentLocationPos();
1936 Teleport(player, position);
1940 if (w == m_TeleportXYZ)
1942 EditBoxWidget.Cast(w).SetText(
"");
1951 if (position[1] == 0)
1953 m_Developer.Teleport(player, position);
1958 super.OnMouseLeave(w, enterW,
x,
y);
1971 super.OnMouseEnter(w,
x,
y);
1973 #ifdef PLATFORM_CONSOLE
1981 super.OnChange(w,
x,
y, finished);
1985 if (m_TabHandlers[i])
1986 m_TabHandlers[i].OnChange(w,
x,
y,finished);
1989 if (w == m_ObjectFilter)
1991 m_RefreshFilterTimer.Run(0.85,
this,
"ChangeFilterItems", null,
false);
1994 else if (w == m_SoundFilter)
1996 m_RefreshFilterTimer.Run(0.85,
this,
"ChangeFilterSound", null,
false);
1999 else if (w == m_QuantityEditBox && (GetCurrentItemIndex() >= 0 || GetCurrentPresetName() !=
""))
2001 m_ConfigDebugProfile.SetItemQuantity(GetCurrentPresetName(), GetCurrentItemIndex(), m_QuantityEditBox.GetText().ToFloat());
2004 else if (w == m_DrawDistanceWidget)
2006 DRAW_DISTANCE = m_DrawDistanceWidget.GetText().ToFloat();
2009 else if (w == m_DamageEditBox && (GetCurrentItemIndex() >= 0 || GetCurrentPresetName() !=
""))
2011 m_ConfigDebugProfile.SetItemHealth(GetCurrentPresetName(), GetCurrentItemIndex(), m_DamageEditBox.GetText().ToFloat());
2014 else if (w == m_ObjectConfigFilter)
2016 ChangeConfigFilter();
2019 else if (w == m_BatchSpawnQuantity)
2024 else if ((w == m_RectSpawnRow || w == m_RectSpawnColumn || w == m_RectSpawnRowStep || w == m_RectSpawnColumnStep))
2026 if (w == m_RectSpawnRow || w == m_RectSpawnColumn)
2028 int rowQ = m_RectSpawnRow.GetText().ToInt();
2029 int columnQ = m_RectSpawnColumn.GetText().ToInt();
2030 int result = columnQ * rowQ;
2031 m_BatchSpawnQuantity.SetText(result.ToString());
2037 m_ConfigDebugProfile.SetBatchSpawnRectangle(m_RectSpawnRow.GetText().ToInt(),m_RectSpawnColumn.GetText().ToInt(), m_RectSpawnRowStep.GetText().ToFloat(),m_RectSpawnColumnStep.GetText().ToFloat());
2043 else if (w == m_ShowProtected)
2045 if (m_ShowProtected.IsChecked())
2053 ChangeFilterItems();
2056 else if (w == m_ShowOthers)
2058 PluginRemotePlayerDebugClient plugin_remote_client = PluginRemotePlayerDebugClient.Cast(
GetPlugin(PluginRemotePlayerDebugClient));
2059 if (m_ShowOthers.IsChecked())
2069 SHOW_OTHERS =
false;
2073 else if (w == m_ClearInventory)
2075 CLEAR_IVN = m_ClearInventory.IsChecked();
2078 else if (m_CategoryButtonsWidgets.Find(w) >= 0)
2081 int pos = m_CategoryButtonsWidgets.Find(w);
2083 CheckBoxWidget cbw = CheckBoxWidget.Cast(w);
2084 if (cbw.IsChecked())
2086 m_CategoryMask = m_CategoryMask | bit;
2087 cbw.SetTextColor(
ARGB(255, 255, 0, 0));
2091 m_CategoryMask = (m_CategoryMask & ~bit);
2092 cbw.SetTextColor(
ARGB(255, 255, 255,255));
2095 ChangeFilterItems();
2098 else if (w == m_TimeSlider || w == m_DateDay || w == m_DateYear || w == m_DateMonth || w == m_DateHour || w == m_DateMinute)
2100 UpdateTime(w == m_TimeSlider);
2109 super.OnItemSelected(w,
x,
y, row, column, oldRow, oldColumn);
2110 if (w == m_PositionsListbox)
2112 vector position = GetCurrentLocationPos();
2113 m_TeleportX.SetText(position[0].
ToString());
2114 m_TeleportY.SetText(position[2].
ToString());
2115 m_TeleportXYZ.SetText(position.
ToString());
2116 if (IsCurrentPositionValid())
2123 else if (w == m_PresetsTextListbox && (m_SelectedObjectIsPreset == 1 || m_SelectedObjectIsPreset == -1))
2125 if (m_PresetsTextListbox.GetSelectedRow() != -1)
2131 else if (w == m_PresetItemsTextListbox)
2133 if (m_PresetItemsTextListbox.GetSelectedRow() != -1)
2136 ShowItemTransferButtons();
2137 m_SelectedObjectText.SetText(GetCurrentItemName());
2138 SetObject(GetCurrentItemName());
2139 m_SelectedObjectIsPreset = 0;
2143 else if (w == m_ObjectsTextListbox)
2145 SelectObject(
false);
2148 else if (w == m_ConfigHierarchyTextListbox)
2150 TextListboxWidget wgt = TextListboxWidget.Cast(w);
2151 wgt.GetItemData(row, 0,m_ConfigData);
2155 m_PlaySoundsetButton.Show(
true);
2159 m_PlaySoundsetButton.Show(
false);
2169 ChangeFilter(GetItemsClasses(), m_ObjectsTextListbox,m_ObjectFilter, m_CategoryMask);
2175 ChangeFilter(GetSoundClasses(), m_SoundsTextListbox, m_SoundFilter, 0,
true);
2180 m_ObjectsTextListbox.SelectRow(-1);
2181 RenderPresetItems();
2182 ShowPresetButtons();
2183 ShowItemTransferButtons();
2186 m_SelectedObjectIsPreset = 1;
2190 m_ConfigDebugProfileFixed.GetPresetItems(
m_SelectedObject, command_array,
"cmd");
2193 if (command_array.IsValidIndex(0))
2195 string first_line = command_array.Get(0);
2197 clear = (first_line ==
"clear_inv");
2200 m_ClearInventory.SetChecked(clear);
2209 RenderPresetItems();
2215 m_PresetsTextListbox.ClearItems();
2222 for (i = custom_presets_array.Count() - 1; i >= 0; i--)
2224 m_PresetsTextListbox.AddItem(custom_presets_array.Get(i),
new PresetParams (custom_presets_array.Get(i),
false,
false), 0);
2228 TStringArray presets_array = m_ConfigDebugProfileFixed.GetPresets();
2229 for (i = 0; i < presets_array.Count(); i++)
2231 m_PresetsTextListbox.AddItem(
"["+presets_array.Get(i)+
"]",
new PresetParams (presets_array.Get(i),
true,
false), 0);
2234 if (default_preset !=
"")
2237 int index = GetPresetIndexByName(default_preset);
2238 if (IsPresetFixed(default_preset))
2240 default_preset =
"[" + default_preset +
"]";
2243 if (index > -1 && index < m_PresetsTextListbox.GetNumItems())
2245 m_PresetsTextListbox.GetItemData(index, 0, preset_params_array);
2246 m_PresetsTextListbox.SetItem(index, default_preset + CONST_DEFAULT_PRESET_PREFIX, preset_params_array, 0);
2256 m_PresetItemsTextListbox.ClearItems();
2257 if (GetCurrentPresetIndex() != -1)
2259 bool isFixed = IsCurrentPresetFixed();
2264 m_ConfigDebugProfileFixed.GetPresetItems(GetCurrentPresetName(), preset_array);
2273 for (i = 0; i < preset_array.Count(); i++)
2275 m_PresetItemsTextListbox.AddItem(preset_array.Get(i), NULL, 0);
2289 if (GetCurrentPresetIndex() != -1)
2306 if (new_preset_name && GetCurrentPresetIndex() != -1)
2319 if (GetCurrentPresetIndex() != -1)
2321 bool is_preset_fixed = IsCurrentPresetFixed();
2324 if (is_preset_fixed)
2326 m_ConfigDebugProfileFixed.GetPresetItems(preset_name, preset_array);
2334 if (clear_inventory)
2336 m_Developer.ClearInventory(player);
2339 for (i = 0; i < preset_array.Count(); i++)
2343 if (is_preset_fixed)
2345 health = m_ConfigDebugProfileFixed.GetItemHealth(preset_name, i);
2346 quantity = m_ConfigDebugProfileFixed.GetItemQuantity(preset_name, i);
2354 EntityAI ent = m_Developer.SpawnEntityInInventory(player, preset_array.Get(i), -1, quantity,
false, preset_name);
2357 m_Developer.SpawnEntityOnCursorDir(player, preset_array.Get(i), quantity, distance, health,
false, preset_name);
2361 player.RPCSingleParam(
ERPCs.DEV_RPC_SPAWN_PRESET,
new Param1<string>(preset_name),
true);
2369 if (default_preset !=
"")
2371 int index = GetPresetIndexByName(default_preset);
2373 if (IsPresetFixed(default_preset))
2375 default_preset =
"[" + default_preset +
"]";
2378 if (index > -1 && index < m_PresetsTextListbox.GetNumItems())
2380 m_PresetsTextListbox.GetItemData(index, 0, prev_preset_params_array);
2381 prev_preset_params_array.param3 =
false;
2382 m_PresetsTextListbox.SetItem(index, default_preset, prev_preset_params_array, 0);
2388 string preset_name = GetCurrentPresetName();
2389 if (IsPresetFixed(preset_name))
2391 preset_name =
"[" + preset_name +
"]";
2395 index = GetCurrentPresetIndex();
2396 if (index > -1 && index < m_PresetsTextListbox.GetNumItems())
2398 m_PresetsTextListbox.GetItemData(index, 0, preset_params_array);
2399 preset_params_array.param3 =
true;
2400 m_PresetsTextListbox.SetItem(index, preset_name + CONST_DEFAULT_PRESET_PREFIX, preset_params_array, 0);
2412 SetPreviewObject(
object);
2420 if (m_PreviewEntity)
2422 m_PreviewEntity.Delete();
2425 if (!
GetGame().IsKindOf(
object,
"DZ_LightAI") && !
GetGame().IsKindOf(
object,
"Man"))
2427 DayZGame.m_IsPreviewSpawn =
true;
2429 DayZGame.m_IsPreviewSpawn =
false;
2430 if (m_PreviewEntity)
2433 m_PreviewEntity.DisableSimulation(
true);
2435 m_PreviewEntity.SetAllowDamage(
false);
2443 int selected_row_index = m_ObjectsTextListbox.GetSelectedRow();
2444 if (selected_row_index != -1 && GetCurrentPresetIndex() != -1)
2447 m_ObjectsTextListbox.GetItemText(selected_row_index, 0, item_name);
2449 RenderPresetItems();
2456 if (IsCurrentPresetFixed())
2460 m_PresetDeleteButton.Show(show);
2461 m_PresetRenameButton.Show(show);
2469 int selected_row_index = text_listbox_widget.GetSelectedRow();
2470 if (selected_row_index != -1)
2473 text_listbox_widget.GetItemText(selected_row_index, 0, item_name);
2480 if (GetCurrentItemIndex() != -1 && GetCurrentPresetIndex() != -1)
2483 RenderPresetItems();
2489 int index = GetCurrentPresetIndex();
2491 if (index > -1 && index < m_PresetsTextListbox.GetNumItems())
2494 m_PresetsTextListbox.GetItemData(index, 0, item_params_array);
2495 return item_params_array.param1;
2502 if (GetCurrentItemIndex() != -1)
2505 m_PresetItemsTextListbox.GetItemText(GetCurrentItemIndex(), 0, item_name);
2513 int selected_row_index = m_ObjectsTextListbox.GetSelectedRow();
2514 if (selected_row_index != -1)
2517 m_ObjectsTextListbox.GetItemText(selected_row_index, 0, item_name);
2527 GetCurrentPositionData(prms);
2535 GetCurrentPositionData(prms);
2544 if (m_PositionsListbox.GetSelectedRow() != -1)
2546 m_PositionsListbox.GetItemData(m_PositionsListbox.GetSelectedRow(), 0, data);
2553 GetCurrentPositionData(prms);
2562 return m_PositionsListbox.GetSelectedRow();
2567 return (m_PositionsListbox.GetSelectedRow() != -1);
2572 return m_PresetsTextListbox.GetSelectedRow();
2577 return m_PresetItemsTextListbox.GetSelectedRow();
2582 int index = GetCurrentPresetIndex();
2583 if (index > -1 && index < m_PresetsTextListbox.GetNumItems())
2586 m_PresetsTextListbox.GetItemData(index, 0, item_params_array);
2587 return item_params_array.param2;
2594 int preset_index = GetPresetIndexByName(preset_name);
2596 if (preset_index > -1 && preset_index < m_PresetsTextListbox.GetNumItems())
2598 m_PresetsTextListbox.GetItemData(preset_index, 0, item_params_array);
2599 return item_params_array.param2;
2607 for (i = 0; i < m_PresetsTextListbox.GetNumItems(); i++)
2610 m_PresetsTextListbox.GetItemData(i, 0, item_params_array);
2612 if (item_params_array.param1 == preset_name)
2622 if (!IsCurrentPresetFixed())
2624 ShowItemTransferButtons();
2626 string preset_name = GetCurrentPresetName();
2627 int item_index = GetCurrentItemIndex();
2629 m_ItemMoveUpButton.Show(
true);
2630 m_ItemMoveDownButton.Show(
true);
2632 m_ItemDamageLabel.Show(
true);
2633 m_ItemQuantityLabel.Show(
true);
2635 if (preset_name !=
"" && item_index > -1)
2637 m_DamageEditBox.Show(
true);
2638 m_QuantityEditBox.Show(
true);
2639 float item_health=
m_ConfigDebugProfile.GetItemHealth(GetCurrentPresetName(), GetCurrentItemIndex());
2640 int item_quantity =
m_ConfigDebugProfile.GetItemQuantity(GetCurrentPresetName(), GetCurrentItemIndex());
2643 m_DamageEditBox.SetText(item_health.
ToString());
2646 m_QuantityEditBox.SetText(item_quantity.ToString());
2652 m_DamageEditBox.Show(
false);
2653 m_QuantityEditBox.Show(
false);
2660 m_ItemMoveUpButton.Show(
false);
2661 m_ItemMoveDownButton.Show(
false);
2671 int object_row = m_ObjectsTextListbox.GetSelectedRow();
2672 if (object_row >-1 && GetCurrentPresetIndex() >-1 && !IsCurrentPresetFixed())
2674 m_PresetAddItemtButton.Show(
true);
2678 m_PresetAddItemtButton.Show(
false);
2681 if (GetCurrentItemIndex() >-1 && GetCurrentPresetIndex() >-1 && !IsCurrentPresetFixed())
2683 m_PresetRemoveItemButton.Show(
true);
2687 m_PresetRemoveItemButton.Show(
false);
2690 if (object_row > -1)
2692 m_ItemNameCopy.Show(
true);
2696 m_ItemNameCopy.Show(
false);
2703 int new_index = GetCurrentItemIndex() - 1;
2704 if (GetCurrentItemIndex() != -1 && GetCurrentPresetIndex() != -1 && new_index > -1)
2707 RenderPresetItems();
2708 m_PresetItemsTextListbox.SelectRow (new_index);
2714 int new_index = GetCurrentItemIndex() + 1;
2715 if (GetCurrentItemIndex() != -1 && GetCurrentPresetIndex() != -1 && new_index < m_PresetItemsTextListbox.GetNumItems())
2718 RenderPresetItems();
2719 m_PresetItemsTextListbox.SelectRow (new_index);
2729 m_ConfigHierarchyTextListbox.ClearItems();
2730 m_ConfigVariablesTextListbox.ClearItems();
2732 string config_path =
"configfile";
2733 TStringArray variables = m_ModuleConfigViewer.GetConfigHierarchy(config_path);
2734 for (
int i = 0; i < variables.Count(); i++)
2736 string variable = variables.Get(i);
2738 for (
int j = 0; j < m_BaseConfigClassesToggled.Count(); j++)
2740 if (variable == m_BaseConfigClassesToggled.
Get(j))
2742 string new_config_path = (config_path +
" " + variable).Trim();
2743 m_ConfigHierarchyTextListbox.AddItem(
"+ " + variable,
new ConfigParamsEx(
false, variable, 0, new_config_path, 0,variable), 0);
2751 m_ConfigHierarchyTextListbox.ClearItems();
2752 m_ConfigVariablesTextListbox.ClearItems();
2755 string config_base_path =
"configfile";
2761 filter_lower.
Split(
" ", filters);
2763 for (
int i = 0; i < m_BaseConfigClassesToggled.Count(); i++)
2765 string config_root = m_BaseConfigClassesToggled.Get(i);
2766 string config_path = config_base_path +
" " + config_root;
2767 TStringArray variables = m_ModuleConfigViewer.GetConfigHierarchy(config_path);
2769 for (
int j = 0; j < variables.Count(); j++)
2771 string variable = variables.Get(j);
2772 string variable_lower = variable;
2775 for (
int k = 0; k < filters.Count(); k++)
2777 if (variable_lower.
Contains(filters.Get(k)))
2779 string new_config_path = (config_path +
" " + variable).Trim();
2780 m_ConfigHierarchyTextListbox.AddItem(
"+ " + variable,
new ConfigParamsEx(
false, variable, 0, new_config_path, 0, config_root), 0);
2790 if (row <= -1 && row >= m_ConfigHierarchyTextListbox.GetNumItems())
2799 m_ConfigHierarchyTextListbox.GetItemData(row, 0, config_params);
2801 string config_path = config_params.param4;
2802 int deep = config_params.param5;
2805 for (
int i = 0; i < deep; i++)
2807 offset = offset +
" ";
2811 variables = m_ModuleConfigViewer.GetConfigHierarchy(config_path);
2812 int childrens_count = variables.Count();
2813 m_ConfigHierarchyTextListbox.SetItem(row, offset +
"- " + config_params.param2,
new ConfigParamsEx(
true, config_params.param2, childrens_count, config_path, deep,config_params.param6), 0);
2815 offset = offset +
" ";
2819 childrens_count = 0;
2820 for (i = variables.Count() - 1; i >= 0; i--)
2822 string new_config_path = (config_path +
" " + variables.Get(i)).Trim();
2823 m_ConfigHierarchyTextListbox.AddItem(offset +
"+ " + variables.Get(i),
new ConfigParamsEx(
false, variables.Get(i), childrens_count, new_config_path, deep,config_params.param2), 0, (row + 1));
2830 if (row <= -1 && row >= m_ConfigHierarchyTextListbox.GetNumItems())
2837 m_ConfigHierarchyTextListbox.GetItemData(row, 0, config_params);
2838 m_ConfigHierarchyTextListbox.GetItemData(row + 1, 0, config_params_next);
2840 int deep = config_params.param5;
2841 int deep_next = config_params_next.param5;
2842 int max_count = m_ConfigHierarchyTextListbox.GetNumItems();
2843 int remove_lines_count = 0;
2845 for (
int i = row + 1; i < max_count; i++)
2847 if (deep < deep_next && i <= max_count)
2849 remove_lines_count = remove_lines_count + 1;
2850 m_ConfigHierarchyTextListbox.GetItemData(i, 0, config_params_next);
2851 deep_next = config_params_next.param5;
2857 for (i = 1; i < remove_lines_count; i++)
2862 m_ConfigHierarchyTextListbox.RemoveRow(
x);
2867 for (i = 0; i < deep; i++)
2869 offset = offset +
" ";
2871 m_ConfigHierarchyTextListbox.SetItem(row, offset +
"+ " + config_params.param2,
new ConfigParamsEx(
false, config_params.param2, 0, config_params.param4, deep,
""), 0);
2883 if (row > -1 && row < m_ConfigHierarchyTextListbox.GetNumItems())
2885 m_ConfigHierarchyTextListbox.GetItemData(row, 0, config_params);
2886 m_ConfigVariablesTextListbox.ClearItems();
2888 string path = config_params.param4;
2889 variables = m_ModuleConfigViewer.GetConfigVariables(
path);
2890 for (
int i = 0; i < variables.Count(); i++)
2892 m_ConfigVariablesTextListbox.AddItem(variables.Get(i), NULL, 0);
2904 SetMapPos(player_pos);
2912 return m_LastSelectedObject;
2917 Param5<int,int,int,int,int> p5 =
new Param5<int,int,int,int,int>(0,0,0,0,0);
2918 int year, month, day, hour, minute;
2920 year = m_DateYear.GetText().ToInt();
2921 month = m_DateMonth.GetText().ToInt();
2922 day = m_DateDay.GetText().ToInt();
2926 int time_minutes =
Math.
Lerp(0, (24*60) - 1, m_TimeSlider.GetCurrent()/100);
2927 hour = time_minutes / 60;
2928 minute = time_minutes % 60;
2932 hour = m_DateHour.GetText().ToInt();
2933 minute = m_DateMinute.GetText().ToInt();
2942 RefreshDateWidgets(year, month, day, hour, minute);
3026 static int m_SelectedObjectIsPreset = -1;
3055 ButtonWidget m_CloseConsoleButton;
3083 static const int TAB_GENERAL = 0;
3084 static const int TAB_ITEMS = 1;
3085 static const int TAB_CONFIGS = 2;
3086 static const int TAB_ENSCRIPT = 3;
3087 static const int TAB_ENSCRIPT_SERVER = 4;
3088 static const int TAB_OUTPUT = 5;
3089 static const int TAB_VICINITY = 6;
3090 static const int TAB_SOUNDS = 7;
3091 static const int TAB_WEATHER = 8;
3103 int currTab = m_selected_tab;
3110 while (currTab != m_selected_tab)
3112 if (m_Tab_buttons[currTab] != NULL)
3128 int currTab = m_selected_tab;
3131 while (currTab != m_selected_tab)
3133 if (m_Tab_buttons[currTab] != NULL)
3148 Widget tab = m_Tabs[tab_id];
3153 m_TabHandlers[i] = null;
3169 ButtonWidget button = m_Tab_buttons[i];
3170 button.SetState(i == tab_id);
3173 m_selected_tab = tab_id;
3176 OnTabSeleted(m_selected_tab);
3190 string line_content;
3191 while (
FGets( file_index, line_content ) > 0 )
3193 Add(line_content,
true);
3202 m_ScriptOutputListbox.ClearItems();
3203 m_AllowScriptOutput =
true;
3204 foreach (
string s: m_ScriptOutputHistory)
3208 m_AllowScriptOutput =
false;
3213 Widget tab = m_Tabs[tabID];
3218 if (tabID == TAB_WEATHER)
3222 else if (tabID == TAB_VICINITY)
3228 m_VicinityListbox.ClearItems();
3229 m_VicinityItems.Clear();
3230 foreach (
Object o:objects)
3232 if (o.Type().ToString() !=
"Object")
3236 m_VicinityItems.InsertAt(o,0);
3237 m_VicinityListbox.AddItem(o.GetType(),null,0,0);
3241 m_VicinityItems.Insert(o);
3242 m_VicinityListbox.AddItem(o.GetType(),null,0);
3247 else if (tabID == TAB_SOUNDS)
3250 ChangeFilterSound();
3252 else if (tabID == TAB_ENSCRIPT)
3254 m_ScriptServer =
false;
3256 index = m_EnscriptConsoleHistory.Count() - m_EnscriptHistoryRow - 1;
3257 if (m_EnscriptConsoleHistory.IsValidIndex(index))
3259 text = m_EnscriptConsoleHistory.
Get(index);
3261 m_EnfScriptEdit.SetText(text);
3263 ReloadScriptOutput();
3265 else if (tabID == TAB_ENSCRIPT_SERVER)
3267 m_ScriptServer =
true;
3268 index = m_EnscriptConsoleHistoryServer.Count() - m_EnscriptHistoryRowServer - 1;
3269 if (m_EnscriptConsoleHistoryServer.IsValidIndex(index))
3271 text = m_EnscriptConsoleHistoryServer.
Get(index);
3273 m_EnfScriptEdit.SetText(text);
3275 ReloadScriptOutput();
3277 else if (tabID == TAB_OUTPUT)
3281 else if (tabID == TAB_CONFIGS)
3283 if (m_ConfigTextField)
3284 m_ObjectConfigFilter.SetText(m_ConfigTextField);
3285 ChangeConfigFilter();
3294 super.OnRPCEx(rpc_type, ctx);
3295 #ifdef DIAG_DEVELOPER
3298 case ERPCs.DEV_PLAYER_DEBUG_DATA:
3304 case ERPCs.DEV_RPC_SERVER_SCRIPT_RESULT:
class RecipeCacheData int
const int ECE_PLACE_ON_SURFACE
protected const int TABS_COUNT
void RefreshCrosshairVisibility()
InventoryLocationType
types of Inventory Location
class OptionSelectorMultistate extends OptionSelector class_name
Param3< string, bool, vector > LocationParams
PluginConfigDebugProfile m_ConfigDebugProfile
ItemPreviewWidget m_ItemPreviewWidget
void PluginItemDiagnostic()
class PluginLocalEnscriptHistory extends PluginLocalHistoryBase PluginLocalEnscriptHistoryServer()
void PluginLocalEnscriptHistory()
PluginBase GetPlugin(typename plugin_type)
ref array< ref RemotePlayerStatDebug > m_PlayerDebugStats
protected PlayerBase _player
void RemotePlayerStatDebug(PlayerBase player)
Param5< bool, string, int, string, int > ConfigParams
Param6< bool, string, int, string, int, string > ConfigParamsEx
Param3< string, bool, bool > PresetParams
void ScriptConsoleWeatherTab(Widget root)
class JsonUndergroundAreaTriggerData GetPosition
void Add(string name, string value)
proto native vector GetCurrentCameraDirection()
proto native void GetDiagModeNames(out TStringArray diag_names)
Get list of all debug modes.
proto native Mission GetMission()
proto native int ConfigGetChildrenCount(string path)
Get count of subclasses in config class on path.
proto native void CopyToClipboard(string text)
proto native DayZPlayer GetPlayer()
proto bool ConfigGetText(string path, out string value)
Get string value from config on path.
proto native float SurfaceRoadY(float x, float z)
override ScriptCallQueue GetCallQueue(int call_category)
proto native int ConfigGetInt(string path)
Get int value from config on path.
proto native bool GetDiagModeEnable(int diag_mode)
Gets state of specific debug mode.
proto native World GetWorld()
proto native void GetDiagDrawModeNames(out TStringArray diag_names)
Get list of all debug draw modes.
proto native void SetDiagModeEnable(int diag_mode, bool enabled)
Set specific debug mode.
void RPCSingleParam(Object target, int rpc_type, Param param, bool guaranteed, PlayerIdentity recipient=null)
see CGame.RPC
proto bool ConfigGetChildName(string path, int index, out string name)
Get name of subclass in config class on path.
proto native UIManager GetUIManager()
proto native vector GetCurrentCameraPosition()
proto native WorkspaceWidget GetWorkspace()
proto native float SurfaceY(float x, float z)
proto native void SetDiagDrawMode(int diag_draw_mode)
Set debug draw mode.
proto native void GetObjectsAtPosition(vector pos, float radius, out array< Object > objects, out array< CargoBase > proxyCargos)
Returns list of all objects in circle "radius" around position "pos".
proto native bool ExecuteEnforceScript(string expression, string mainFnName)
Delevoper only: Executes Enforce Script expression, if there is an error, is printed into the script ...
static ref Param1< bool > PARAM1_BOOL
static ref Param1< string > PARAM1_STRING
static proto bool RaycastRV(vector begPos, vector endPos, out vector contactPos, out vector contactDir, out int contactComponent, set< Object > results=NULL, Object with=NULL, Object ignore=NULL, bool sorted=false, bool ground_only=false, int iType=ObjIntersectView, float radius=0.0, CollisionFlags flags=CollisionFlags.NEARESTCONTACT)
Raycasts world by given parameters.
static string GetFileName()
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
static void GetBaseConfigClasses(out TStringArray base_classes)
Returns some of base config classes strings like CfgVehicles, CfgWeapons, etc. for searching purposes...
Wrapper class for managing sound through SEffectManager.
override void Stop()
Stops sound.
void ShowQuickbarPlayer(bool show)
void ShowHudPlayer(bool show)
static void SetLogsEnabled(bool enable)
static string GetMarkerTypeFromID(int id)
void EnableAllInputs(bool bForceSupress=false)
Manager class for managing Effect (EffectParticle, EffectSound)
static EffectSound PlaySoundEnviroment(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound, updating environment variables.
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
proto void CallLater(func fn, int delay=0, bool repeat=false, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
proto void Call(func fn, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
Serialization general interface. Serializer API works with:
proto bool Read(void value_in)
bool Back()
Close top window on windows stack, returns true when any window is closed.
proto void GetDate(out int year, out int month, out int day, out int hour, out int minute)
Get actual ingame world time.
proto native void SetDate(int year, int month, int day, int hour, int minute)
Sets actual ingame world time.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto string ToString(bool beautify=true)
Vector to string.
proto native float Length()
Returns length of vector (magnitude)
proto native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.
array< string > TStringArray
string String(string s)
Helper for passing string expression to functions with void parameter. Example: Print(String("Hello "...
proto void CloseFile(FileHandle file)
Close the File.
proto int FGets(FileHandle file, string var)
Get line from file, every next call of this function returns next line.
proto FileHandle OpenFile(string name, FileMode mode)
Opens File.
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto float Max(float x, float y)
Returns bigger of two given values.
static proto float Pow(float v, float power)
Return power of v ^ power.
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
proto void GetMousePos(out int x, out int y)
proto native void dBodyDestroy(notnull IEntity ent)
Destroys attached physics body.
proto string Substring(int start, int len)
Substring of 'str' from 'start' position 'len' number of characters.
void Split(string sample, out array< string > output)
Splits string into array of strings separated by 'sample'.
string Get(int index)
Gets n-th character from string.
proto native int IndexOf(string sample)
Finds 'sample' in 'str'. Returns -1 when not found.
bool Contains(string sample)
Returns true if sample is substring of string.
proto string Trim()
Returns trimmed string with removed leading and trailing whitespaces.
vector BeautifiedToVector()
Convert beautified string into a vector.
proto int Replace(string sample, string replace)
Replace all occurrances of 'sample' in 'str' by 'replace'.
proto int ToLower()
Changes string to lowercase. Returns length.
int ARGB(int a, int r, int g, int b)