This reverts commit 30e831163c.
This commit is contained in:
@@ -11,12 +11,6 @@ namespace Content.Server.Research.Components
|
|||||||
[ViewVariables(VVAccess.ReadWrite)] [DataField("points")]
|
[ViewVariables(VVAccess.ReadWrite)] [DataField("points")]
|
||||||
public int Points = 0;
|
public int Points = 0;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// To encourage people to spend points,
|
|
||||||
/// will not accept passive points gain above this number for each source.
|
|
||||||
/// </summary>
|
|
||||||
[DataField("passiveLimitPerSource")]
|
|
||||||
public int PassiveLimitPerSource = 30000;
|
|
||||||
[ViewVariables(VVAccess.ReadOnly)] public int Id { get; set; }
|
[ViewVariables(VVAccess.ReadOnly)] public int Id { get; set; }
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadOnly)]
|
[ViewVariables(VVAccess.ReadOnly)]
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ namespace Content.Server.Research;
|
|||||||
|
|
||||||
public sealed partial class ResearchSystem
|
public sealed partial class ResearchSystem
|
||||||
{
|
{
|
||||||
[Dependency] private readonly StationSystem _stationSystem = default!;
|
|
||||||
private void InitializeServer()
|
private void InitializeServer()
|
||||||
{
|
{
|
||||||
SubscribeLocalEvent<ResearchServerComponent, ComponentStartup>(OnServerStartup);
|
SubscribeLocalEvent<ResearchServerComponent, ComponentStartup>(OnServerStartup);
|
||||||
@@ -37,10 +36,6 @@ public sealed partial class ResearchSystem
|
|||||||
|
|
||||||
public bool RegisterServerClient(ResearchServerComponent component, ResearchClientComponent clientComponent)
|
public bool RegisterServerClient(ResearchServerComponent component, ResearchClientComponent clientComponent)
|
||||||
{
|
{
|
||||||
// Has to be on the same station
|
|
||||||
if (_stationSystem.GetOwningStation(component.Owner) != _stationSystem.GetOwningStation(clientComponent.Owner))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// TODO: This is shit but I'm just trying to fix RND for now until it gets bulldozed
|
// TODO: This is shit but I'm just trying to fix RND for now until it gets bulldozed
|
||||||
if (TryComp<ResearchPointSourceComponent>(clientComponent.Owner, out var source))
|
if (TryComp<ResearchPointSourceComponent>(clientComponent.Owner, out var source))
|
||||||
{
|
{
|
||||||
@@ -102,8 +97,7 @@ public sealed partial class ResearchSystem
|
|||||||
{
|
{
|
||||||
var points = 0;
|
var points = 0;
|
||||||
|
|
||||||
// Is our machine powered, and are we below our limit of passive point gain?
|
if (CanRun(component))
|
||||||
if (CanRun(component) && component.Points < (component.PassiveLimitPerSource * component.PointSources.Count))
|
|
||||||
{
|
{
|
||||||
foreach (var source in component.PointSources)
|
foreach (var source in component.PointSources)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user