Restore tutorial return placement and source terrain collision eligibility
This commit is contained in:
1 parent
ca08c468ba
commit
8d60a68511
36 files changed
+991
-69
No files matched your search
@@ -3,7 +3,7 @@ using GamePort.Assets;
|
||||
|
||||
namespace GamePort.Game;
|
||||
|
||||
public sealed record LevelTransition(string LevelFile, string StartPoint, float FadeTime, int FadeType);
|
||||
public sealed record LevelTransition(string LevelFile, string StartPoint, float FadeTime, int FadeType, bool Returning = false);
|
||||
|
||||
/// <summary>
|
||||
/// Recovered star/trophy/lab jetpack contacts, Carl talk dispatch and LOAD gates. Uses source root spheres
|
||||
@@ -122,11 +122,12 @@ public sealed class SceneInteractions
|
||||
if (!TaskActivation.Load(source, tasks)) break;
|
||||
var destination = source.Text("LevelName") ?? "none";
|
||||
var start = source.Text("StartPoint") ?? "none";
|
||||
if (string.Equals(destination, "RETURN", StringComparison.OrdinalIgnoreCase))
|
||||
var returning = string.Equals(destination, "RETURN", StringComparison.OrdinalIgnoreCase);
|
||||
if (returning)
|
||||
{ destination = ReturnLevel; start = ReturnStart; }
|
||||
if (string.Equals(destination, "none", StringComparison.OrdinalIgnoreCase))
|
||||
{ unsupported.Add("RETURN has no stored destination"); break; }
|
||||
Transition?.Invoke(new(destination, start, source.Number("FadeTime"), source.Integer("FadeType")));
|
||||
Transition?.Invoke(new(destination, start, source.Number("FadeTime"), source.Integer("FadeType"), returning));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user