Enable nullability in Content.Client (#3257)
* Enable nullability in Content.Client * Remove #nullable enable * Merge fixes * Remove Debug.Assert * Merge fixes * Fix build * Fix build
This commit is contained in:
@@ -3,8 +3,6 @@ using JetBrains.Annotations;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.Utility;
|
||||
using YamlDotNet.RepresentationModel;
|
||||
|
||||
namespace Content.Client.GameObjects.Components.Atmos
|
||||
{
|
||||
@@ -13,12 +11,15 @@ namespace Content.Client.GameObjects.Components.Atmos
|
||||
{
|
||||
[DataField("fireStackAlternateState")]
|
||||
private int _fireStackAlternateState = 3;
|
||||
|
||||
[DataField("normalState")]
|
||||
private string _normalState;
|
||||
private string? _normalState;
|
||||
|
||||
[DataField("alternateState")]
|
||||
private string _alternateState;
|
||||
private string? _alternateState;
|
||||
|
||||
[DataField("sprite")]
|
||||
private string _sprite;
|
||||
private string? _sprite;
|
||||
|
||||
public override void InitializeEntity(IEntity entity)
|
||||
{
|
||||
@@ -49,7 +50,11 @@ namespace Content.Client.GameObjects.Components.Atmos
|
||||
{
|
||||
var sprite = component.Owner.GetComponent<ISpriteComponent>();
|
||||
|
||||
sprite.LayerSetRSI(FireVisualLayers.Fire, _sprite);
|
||||
if (_sprite != null)
|
||||
{
|
||||
sprite.LayerSetRSI(FireVisualLayers.Fire, _sprite);
|
||||
}
|
||||
|
||||
sprite.LayerSetVisible(FireVisualLayers.Fire, onFire);
|
||||
|
||||
if(fireStacks > _fireStackAlternateState && !string.IsNullOrEmpty(_alternateState))
|
||||
|
||||
Reference in New Issue
Block a user