Fixes (#289)
* - fix: Ling fixes. * - fix: Fix ghasp identity. * - fix: Low temp slowdown fix. * - fix: Crossbow fix. * - fix: Fix gamerules. * - fix: Fix shadow shackles. * - fix: Cleanup refund. * - fix: Can't pry runic door. * - fix: Fix crash. * - fix: Fix mood. * - fix: Fix dictionary.
This commit is contained in:
@@ -5,7 +5,7 @@ using Robust.Shared.Prototypes;
|
||||
namespace Content.Shared.Changeling;
|
||||
|
||||
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
public sealed partial class ChangelingComponent : Component
|
||||
{
|
||||
[DataField("chemRegenRate")]
|
||||
@@ -14,7 +14,7 @@ public sealed partial class ChangelingComponent : Component
|
||||
[DataField("chemicalCap")]
|
||||
public int ChemicalCapacity = 75;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("chemicalsBalance")]
|
||||
[ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
public int ChemicalsBalance = 20;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("pointsBalance")]
|
||||
|
||||
@@ -75,6 +75,9 @@ public sealed class ChemicalsSystem : EntitySystem
|
||||
{
|
||||
base.Update(frameTime);
|
||||
|
||||
if (_net.IsClient)
|
||||
return;
|
||||
|
||||
var query = EntityQueryEnumerator<ChangelingComponent>();
|
||||
|
||||
while (query.MoveNext(out var uid, out var component))
|
||||
@@ -96,8 +99,7 @@ public sealed class ChemicalsSystem : EntitySystem
|
||||
{
|
||||
if(_net.IsServer)
|
||||
{
|
||||
_alertsSystem.ShowAlert(uid, AlertType.Chemicals,
|
||||
(short) Math.Clamp(Math.Round(component.ChemicalsBalance / 10f), 0, 16));
|
||||
_alertsSystem.ShowAlert(uid, AlertType.Chemicals);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user