Technology Disks (#13077)

* clean up a bunch of R&D code

* don't store components

* brug

* speedrun some sloth review

* technology disks

* expand functionality, begin work on printer

* disk printer ui

* file

* fix the rebase

* disk console is finito

* Update DiskConsoleSystem.cs
This commit is contained in:
Nemanja
2022-12-20 17:39:57 -05:00
committed by GitHub
parent 88ed188b42
commit 050e157005
34 changed files with 659 additions and 151 deletions

View File

@@ -1,5 +1,6 @@
using Content.Server.Power.EntitySystems;
using Content.Server.Research.Components;
using Content.Shared.Research.Components;
using Content.Shared.Research.Prototypes;
namespace Content.Server.Research.Systems;
@@ -44,7 +45,7 @@ public sealed partial class ResearchSystem
{
if (!Resolve(component.Owner, ref databaseComponent, false))
return false;
return databaseComponent.IsTechnologyUnlocked(prototype.ID);
return IsTechnologyUnlocked(databaseComponent.Owner, prototype.ID, databaseComponent);
}
public bool CanUnlockTechnology(ResearchServerComponent component, TechnologyPrototype technology, TechnologyDatabaseComponent? databaseComponent = null)
@@ -52,7 +53,7 @@ public sealed partial class ResearchSystem
if (!Resolve(component.Owner, ref databaseComponent, false))
return false;
if (!databaseComponent.CanUnlockTechnology(technology) ||
if (!CanUnlockTechnology(databaseComponent.Owner, technology, databaseComponent) ||
component.Points < technology.RequiredPoints ||
IsTechnologyUnlocked(component, technology, databaseComponent))
return false;