PseudoCode Missions - Milowan/WarChildPort GitHub Wiki
bool unlocked
bool completed
Mission next
Mission prev
string name
Set name to string.
Set unlocked to bool.
Set completed to false.
Set prev to Mission
If prev is not null,
Execute prev's SetNext function with parameter: this.
If prev is completed,
Execute the Unlock function.
Set next to nMission.
Set completed to true.
If next is not null,
Execute next's Unlock function.
Set unlocked to true.
Return name.
static List missions
If missions is null,
Set missions to new List.
Execute mission's Add function with parameter: AddToList's function parameter.
If missions is null,
Set missions to new List.
Set local Filestream to new saveFile.
Set local BinaryFormatter to new BinaryFormatter.
Execute the formatter's Serialize function with the parameters: stream, missions.
Execute the stream's Close function.
If missions is null,
Set missions to new List.
If a saveFile exists,
Set local Filestream to existing saveFile.
Set local BinaryFormatter to new BinaryFormatter.
Set missions to formatter's Deserialize with parameter: stream, cast as List.
Execute the MissionData's Load function.
If missions count is 0,
Execute GenerateMissions function.
Unreal version of loading the Unreal version of the "scene": MainMenu.
Execute MissionData's AddToList with parameters:
new Mission: Defense, true.
Execute MissionData's AddToList with parameters:
new Mission: Exterminate, false, missions[0].