3 protected string FILE_ROOT =
"$saves:";
4 protected const string FILE_ROOT_SCENES =
"scenes";
6 protected const string PARAM_MISSION =
"Mission";
7 protected const string PARAM_TIME =
"InitTime";
8 protected const string PARAM_YEAR =
"InitYear";
9 protected const string PARAM_MONTH =
"InitMonth";
10 protected const string PARAM_DAY =
"InitDay";
11 protected const string PARAM_HOUR =
"InitHour";
12 protected const string PARAM_MINUTE =
"InitMinute";
13 protected const string PARAM_OVERCAST =
"WeatherInitOvercast";
14 protected const string PARAM_RAIN =
"WeatherInitRain";
15 protected const string PARAM_FOG =
"WeatherInitFog";
16 protected const string PARAM_WIND_F =
"WeatherInitWindForce";
17 protected const string PARAM_PLAYER =
"Player";
18 protected const string PARAM_OBJ_COUNT =
"SceneObjectsCount";
19 protected const string PARAM_OBJ_NAME =
"SceneObject";
20 protected const string PARAM_OBJ_ATT =
"Att";
21 protected const string PARAM_OBJ_LNK =
"Lnk";
22 protected const string PARAM_OBJ_TYPE =
"type";
23 protected const string PARAM_OBJ_POS =
"position";
24 protected const string PARAM_OBJ_ROT =
"rotation";
25 protected const string PARAM_OBJ_DMG =
"damage";
26 protected const string PARAM_OBJ_HLT =
"health";
27 protected const string PARAM_OBJ_ISCR =
"init_script";
40 FILE_ROOT =
g_Game.GetMissionFolderPath();
48 return FILE_ROOT +
"\\" + FILE_ROOT_SCENES;
56 return GetPathScenes() +
"\\" + m_FileSceneName;
64 string file_path = GetPathScenes() +
"\\" +
scene_name +
"." + PluginSceneManager.SCENE_SUFIX;
74 string file_path = GetPathScenes() +
"\\" +
scene_name +
"." + PluginSceneManager.SCENE_SUFIX;
83 string file_path = GetPathScenes() +
"\\" +
scene_name +
"." + PluginSceneManager.SCENE_SUFIX;
109 string path_find_pattern = GetPathScenes() +
"/*." + PluginSceneManager.SCENE_SUFIX;
131 script.Replace(
"\"",
"^");
132 script.Replace(
"\n",
"$");
141 script.Replace(
"^",
"\"");
142 script.Replace(
"$",
"\n");
162 m_FileSceneName =
scene.GetNameScene() +
"." + PluginSceneManager.SCENE_SUFIX;
165 SaveSceneSettings(
scene);
168 SaveSceneWeather(
scene);
171 SaveScenePlayer(
scene);
174 SaveSceneObjects(
scene);
366 m_FileSceneName =
scene_name +
"." + PluginSceneManager.SCENE_SUFIX;
377 LoadSceneSettings(
scene);
380 LoadSceneWeather(
scene);
383 LoadScenePlayer(
scene);
386 LoadSceneObjects(
scene);
389 SceneDataSave(
scene);
411 if (ParamExist(PARAM_YEAR))
420 if (ParamExist(PARAM_MONTH))
429 if (ParamExist(PARAM_DAY))
438 if (ParamExist(PARAM_HOUR))
447 if (ParamExist(PARAM_MINUTE))
462 if (ParamExist(PARAM_OVERCAST))
469 if (ParamExist(PARAM_RAIN))
476 if (ParamExist(PARAM_FOG))
483 if (ParamExist(PARAM_WIND_F))
507 if (PluginSceneManager.GetInstance().GetLoadPlayerPos())
546 string param_name = PARAM_OBJ_NAME +
"_" +
i.ToString();
const int CFG_TYPE_STRING
override string GetFileName()
PluginBase GetPlugin(typename plugin_type)
override string GetFileName()
void LoadSceneWeather(SceneData scene)
TStringArray m_CfgTemplate
void SceneRename(string scene_name, string scene_name_new)
string EncodeInitScript(string script)
void LoadSceneSettings(SceneData scene)
void SaveSceneWeather(SceneData scene)
TStringArray GetSceneList()
void SceneDelete(string scene_name)
void LoadSceneObjects(SceneData scene)
void SaveScenePlayer(SceneData scene)
SceneData SceneDataLoad(string scene_name)
void SceneDataSave(SceneData scene)
void LoadScenePlayer(SceneData scene)
string DecodeInitScript(string script)
void SceneDuplicate(string scene_name)
void SaveSceneSettings(SceneData scene)
void SaveSceneObjects(SceneData scene)
array< SceneObject > GetLinkedSceneObjects()
string GetPositionAsString()
proto native CGame GetGame()
array< string > TStringArray
proto native bool MakeDirectory(string name)
Makes a directory.
enum FindFileFlags FindFile(string pattern, out string fileName, out FileAttr fileAttributes, FindFileFlags flags)
proto bool FindNextFile(FindFileHandle handle, out string fileName, out FileAttr fileAttributes)
proto bool FileExist(string name)
Check existence of file.