Reconstruct lab story, interactions, patrol and jet pack practice flow
This commit is contained in:
1 parent
58424120bb
commit
c929f942e1
84 files changed
+7957
-305
No files matched your search
@@ -0,0 +1,37 @@
|
||||
using GamePort.Assets;
|
||||
|
||||
namespace GamePort.Game;
|
||||
|
||||
/// <summary>Recovered task gates; -1 sentinels and numeric ExactLevel must retain their original meaning.</summary>
|
||||
public static class TaskActivation
|
||||
{
|
||||
// Animated entity EXE0x40E340. null means keep the prior activation state.
|
||||
public static bool? Animated(GamEntity entity, int state)
|
||||
{
|
||||
var exact = entity.Integer("ExactLevel", -1);
|
||||
if (exact != -1) return state == exact;
|
||||
var required = entity.Integer("RequiredLevel", -1);
|
||||
if (required == -1) return null;
|
||||
var remove = entity.Integer("RemoveLevel", -1);
|
||||
return state >= required && (remove == -1 || state < remove);
|
||||
}
|
||||
|
||||
// Pickup EXE0x45F2B0: no RemoveLevel check in this override.
|
||||
public static bool? Pickup(GamEntity entity, int state)
|
||||
{
|
||||
var exact = entity.Integer("ExactLevel", -1);
|
||||
if (exact != -1) return state == exact;
|
||||
var required = entity.Integer("RequiredLevel", -1);
|
||||
return required == -1 ? null : state >= required;
|
||||
}
|
||||
|
||||
// LOAD EXE0x457F32. A stored task state -1 bypasses the requirements.
|
||||
public static bool Load(GamEntity entity, TaskStates tasks)
|
||||
{
|
||||
var name = entity.Text("RequiredTask");
|
||||
if (string.Equals(name, "none", StringComparison.OrdinalIgnoreCase)) return true;
|
||||
var state = tasks.Get(name);
|
||||
var exact = entity.Integer("ExactLevel", -1);
|
||||
return state == -1 || state >= entity.Integer("RequiredLevel") && (exact == -1 || state == exact);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user