/// <summary> Which category this <see cref="Stage"/> should be displayed in. </summary>
publicstringcategory=null;
/// <summary> Where to display this <see cref="Stage"/> within a <see cref="category"/> relative to others. </summary>
publicintnumber=-1;
/// <summary>
/// The name this <see cref="Stage"/> will be displayed with.
/// Also defines names of save files of <see cref="player_record_list">stage progress</see>, <see cref="solution"/>
/// </summary>
publicstringname=null;
/// <summary> The description this <see cref="Stage"/> will be displayed with.</summary>
publicstringdescription=null;
/// <summary> The name of a <see cref="UnityEngine.SceneManagement.Scene"/> that this <see cref="Stage"/> takes place in.</summary>
publicstringscene=null;
/// <summary> Wether this <see cref="Stage"/> is located in installation folder or user data (a.k.a. !local).</summary>
publicbooluse_install_folder=false;
/// <summary> TODO? interface </summary>
publicList<Directories>hierarchie=null;
/// <summary>
/// <see langword="true"/> iff there is at least one element in <see cref="player_record_list"/> where <see cref="PlayerRecord.solved"/> == <see langword="true"/>.
@@ -38,29 +67,66 @@ public FactOrganizer factState {
player_record.factState=value;
}
}
/// <summary> Current Stage progress.</summary>
publicPlayerRecordplayer_record=null;
/// <summary> Returns a name for <see cref="player_record.name"/> which needs to be uniquified once put into <see cref="player_record_list"/> (e.g. by <see cref="push_record(double, bool) adding '_i'"/>).</summary>
/// Switches between <see cref="player_record.factState"/> (<see langword="false"/>) and <see cref="solution"/> (<see langword="true"/>) to display in GameWorld.
/// Stores and overwrites this <see cref="Stage"/>, <see cref="player_record"/>, every element in <see cref="player_record_list"/> and <see cref="solution"/> (no overwrite for latter if empty).
/// </summary>
/// <param name="reset_player">wether to clear current <see cref="player_record"/></param>
publicvoidstore(boolreset_player=false)
{
hierarchie??=newList<Directories>();
...
...
@@ -294,6 +427,16 @@ public void store(bool reset_player = false)
/// Determines path via <paramref name="hierarchie"/> and <paramref name="use_install_folder"/> and calls <see cref="ShallowLoad(ref Stage, string)"/>.
/// <see cref="push_record(double, bool)">Pushes</see> current <see cref="player_record"/> to <see cref="player_record_list"/> and sets <see cref="PlayerRecord.solved"/> to <see langword="true"/>.
/// </summary>
/// <returns><see langword="true"/> iff current <see cref="player_record"/> is solved.</returns>
/// <seealso cref="FactOrganizer.DynamiclySolved(SolutionOrganizer, out List<List<string>>, out List<List<string>>)"/>
publicboolCheckSolved()
{
doubletime_s=Time.timeSinceLevelLoadAsDouble;
...
...
@@ -425,21 +609,37 @@ public bool CheckSolved()
}
/// <summary>
/// Represents a save slot.
/// </summary>
publicclassPlayerRecord
{
/// <summary> Wether this save has solved the <see cref="Stage"/> which contains it. </summary>
publicboolsolved=false;
/// <summary> When this save was created (not modified!). </summary>
publiclongdate=System.DateTime.Now.ToBinary();
/// <summary> The time spent within this save since creation. </summary>