Make component states dependant on the player getting them (#3280)
* Make component states dependant on the player getting them Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com> * Updated submodule to v0.3.7. Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com> Co-authored-by: Acruid <shatter66@gmail.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Content.Shared.GameObjects.Components.Research;
|
||||
using Content.Shared.Research;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Players;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
@@ -17,7 +18,7 @@ namespace Content.Server.GameObjects.Components.Research
|
||||
public bool Static => _static;
|
||||
private bool _static = false;
|
||||
|
||||
public override ComponentState GetComponentState()
|
||||
public override ComponentState GetComponentState(ICommonSession player)
|
||||
{
|
||||
return new LatheDatabaseState(GetRecipeIdList());
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using Content.Shared.GameObjects.Components.Research;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Players;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
@@ -20,7 +21,7 @@ namespace Content.Server.GameObjects.Components.Research
|
||||
public int StorageLimit => _storageLimit;
|
||||
private int _storageLimit;
|
||||
|
||||
public override ComponentState GetComponentState()
|
||||
public override ComponentState GetComponentState(ICommonSession player)
|
||||
{
|
||||
return new MaterialStorageState(Storage);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ using Content.Shared.GameObjects.Components.Research;
|
||||
using Content.Shared.Research;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Players;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Research
|
||||
@@ -14,7 +15,7 @@ namespace Content.Server.GameObjects.Components.Research
|
||||
|
||||
public override string Name => "ProtolatheDatabase";
|
||||
|
||||
public override ComponentState GetComponentState()
|
||||
public override ComponentState GetComponentState(ICommonSession player)
|
||||
{
|
||||
return new ProtolatheDatabaseState(GetRecipeIdList());
|
||||
}
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
using Content.Shared.GameObjects.Components.Research;
|
||||
using Content.Shared.Research;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Players;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Research
|
||||
{
|
||||
[RegisterComponent]
|
||||
public class TechnologyDatabaseComponent : SharedTechnologyDatabaseComponent
|
||||
{
|
||||
public override ComponentState GetComponentState()
|
||||
public override ComponentState GetComponentState(ICommonSession player)
|
||||
{
|
||||
return new TechnologyDatabaseState(_technologies);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user