Machine frame ECS (#9713)

This commit is contained in:
Kara
2022-07-14 04:35:37 -07:00
committed by GitHub
parent 02fc4ba61a
commit 3bf8c27888
6 changed files with 330 additions and 341 deletions

View File

@@ -25,7 +25,7 @@ namespace Content.Server.Construction.Conditions
if (!entityManager.TryGetComponent(uid, out MachineFrameComponent? machineFrame))
return false;
return machineFrame.IsComplete;
return EntitySystem.Get<MachineFrameSystem>().IsComplete(machineFrame);
}
public bool DoExamine(ExaminedEvent args)
@@ -41,7 +41,7 @@ namespace Content.Server.Construction.Conditions
return true;
}
if (machineFrame.IsComplete) return false;
if (EntitySystem.Get<MachineFrameSystem>().IsComplete(machineFrame)) return false;
args.Message.AddMarkup(Loc.GetString("construction-condition-machine-frame-requirement-label") + "\n");
foreach (var (part, required) in machineFrame.Requirements)