DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ RunEnscript()

void ScriptConsoleEnfScriptTab::RunEnscript ( )
inlineprotected

См. определение в файле ScriptConsoleEnfScriptTab.c строка 127

128 {
129 #ifdef DEVELOPER
130 string code;
131 m_EnfScriptEdit.GetText(code);
132 string codeNoReplace = code;
133 _player = PlayerBase.Cast(GetGame().GetPlayer());
134 m_AllowScriptOutput = true;
135 code.Replace("Print(","ScriptConsoleEnfScriptTab.PrintS(");
136 code.Replace("Print (","ScriptConsoleEnfScriptTab.PrintS(");
137 bool success = GetGame().ExecuteEnforceScript("void scConsMain() \n{\n" + code + "\n}\n", "scConsMain");
138 m_AllowScriptOutput = false;
139 ColorRunButton(success);
140
141 m_EnscriptConsoleHistory.Insert(codeNoReplace);
142 m_ModuleLocalEnscriptHistory.AddNewLine(codeNoReplace);
143 #endif
144 }
PlayerBase GetPlayer()
Определения ModifierBase.c:51
PlayerBase _player
Определения QuickBarBase.c:18
proto native bool ExecuteEnforceScript(string expression, string mainFnName)
Delevoper only: Executes Enforce Script expression, if there is an error, is printed into the script ...
MultilineEditBoxWidget m_EnfScriptEdit
Определения ScriptConsoleEnfScriptTab.c:10
void ColorRunButton(bool success)
Определения ScriptConsoleEnfScriptTab.c:146
ref TStringArray m_EnscriptConsoleHistory
Определения ScriptConsoleEnfScriptTab.c:6
PluginLocalEnscriptHistory m_ModuleLocalEnscriptHistory
Определения ScriptConsoleEnfScriptTab.c:8
proto native CGame GetGame()
proto int Replace(string sample, string replace)
Replace all occurrances of 'sample' in 'str' by 'replace'.

Перекрестные ссылки _player, ColorRunButton(), CGame::ExecuteEnforceScript(), GetGame(), GetPlayer(), m_AllowScriptOutput, m_EnfScriptEdit, m_EnscriptConsoleHistory, m_ModuleLocalEnscriptHistory и string::Replace().

Используется в OnClick().