Endscreen message + command objectives updadte (#533)

* add simple end screen common goals

* finish common objectives endscreen

* personal objectives endscreen

* Update personal_objectives.yml

* new empire objectives
This commit is contained in:
Ed
2024-11-04 13:41:09 +03:00
committed by GitHub
parent 16a0b99daf
commit c21dd891f3
26 changed files with 274 additions and 102 deletions

View File

@@ -340,6 +340,20 @@ public abstract class SharedMindSystem : EntitySystem
return true;
}
/// <summary>
/// CP14 Extension - Tries to create and add an objective from its prototype id, and return objective uid.
/// </summary>
/// <returns>Returns true if adding the objective succeeded.</returns>
public bool TryAddObjective(EntityUid mindId, MindComponent mind, string proto, out EntityUid? objective)
{
objective = _objectives.TryCreateObjective(mindId, mind, proto);
if (objective == null)
return false;
AddObjective(mindId, mind, objective.Value);
return true;
}
/// <summary>
/// Adds an objective that already exists, and is assumed to have had its requirements checked.
/// </summary>