Merge remote-tracking branch 'upstream/master' into 2021-04-22_gridtiletest
This commit is contained in:
@@ -3,6 +3,7 @@ using System;
|
||||
using Content.Shared.GameObjects.Components.Chemistry;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
|
||||
namespace Content.Client.GameObjects.Components.Chemistry
|
||||
@@ -12,9 +13,10 @@ namespace Content.Client.GameObjects.Components.Chemistry
|
||||
{
|
||||
[DataField("maxFillLevels")] private int _maxFillLevels = 0;
|
||||
[DataField("fillBaseName")] private string? _fillBaseName = null;
|
||||
[DataField("emptySpriteName")] private string? _emptySpriteName = null;
|
||||
[DataField("layer")] private SolutionContainerLayers _layer = SolutionContainerLayers.Fill;
|
||||
[DataField("changeColor")] private bool _changeColor = true;
|
||||
[DataField("emptySpriteName")] private string? _emptySpriteName = null;
|
||||
[DataField("emptySpriteColor")] private Color _emptySpriteColor = Color.White;
|
||||
|
||||
public override void OnChangeData(AppearanceComponent component)
|
||||
{
|
||||
@@ -46,7 +48,11 @@ namespace Content.Client.GameObjects.Components.Chemistry
|
||||
if (_emptySpriteName == null)
|
||||
sprite.LayerSetVisible(fillLayer, false);
|
||||
else
|
||||
{
|
||||
sprite.LayerSetState(fillLayer, _emptySpriteName);
|
||||
if (_changeColor)
|
||||
sprite.LayerSetColor(fillLayer, _emptySpriteColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,11 @@ namespace Content.Client.GameObjects.Components.Doors
|
||||
|
||||
var sound = new AnimationTrackPlaySound();
|
||||
CloseAnimation.AnimationTracks.Add(sound);
|
||||
sound.KeyFrames.Add(new AnimationTrackPlaySound.KeyFrame(_closeSound, 0));
|
||||
|
||||
if (_closeSound != null)
|
||||
{
|
||||
sound.KeyFrames.Add(new AnimationTrackPlaySound.KeyFrame(_closeSound, 0));
|
||||
}
|
||||
}
|
||||
|
||||
OpenAnimation = new Animation {Length = TimeSpan.FromSeconds(_delay)};
|
||||
@@ -75,7 +79,11 @@ namespace Content.Client.GameObjects.Components.Doors
|
||||
|
||||
var sound = new AnimationTrackPlaySound();
|
||||
OpenAnimation.AnimationTracks.Add(sound);
|
||||
sound.KeyFrames.Add(new AnimationTrackPlaySound.KeyFrame(_openSound, 0));
|
||||
|
||||
if (_openSound != null)
|
||||
{
|
||||
sound.KeyFrames.Add(new AnimationTrackPlaySound.KeyFrame(_openSound, 0));
|
||||
}
|
||||
}
|
||||
|
||||
DenyAnimation = new Animation {Length = TimeSpan.FromSeconds(0.3f)};
|
||||
@@ -87,7 +95,11 @@ namespace Content.Client.GameObjects.Components.Doors
|
||||
|
||||
var sound = new AnimationTrackPlaySound();
|
||||
DenyAnimation.AnimationTracks.Add(sound);
|
||||
sound.KeyFrames.Add(new AnimationTrackPlaySound.KeyFrame(_denySound, 0, () => AudioHelpers.WithVariation(0.05f)));
|
||||
|
||||
if (_denySound != null)
|
||||
{
|
||||
sound.KeyFrames.Add(new AnimationTrackPlaySound.KeyFrame(_denySound, 0, () => AudioHelpers.WithVariation(0.05f)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Content.Client.GameObjects.EntitySystems;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.Utility;
|
||||
using static Robust.Client.GameObjects.SpriteComponent;
|
||||
|
||||
namespace Content.Client.GameObjects.Components.IconSmoothing
|
||||
@@ -25,6 +27,8 @@ namespace Content.Client.GameObjects.Components.IconSmoothing
|
||||
[RegisterComponent]
|
||||
public class IconSmoothComponent : Component
|
||||
{
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
|
||||
[DataField("mode")]
|
||||
private IconSmoothingMode _mode = IconSmoothingMode.Corners;
|
||||
|
||||
@@ -32,8 +36,6 @@ namespace Content.Client.GameObjects.Components.IconSmoothing
|
||||
|
||||
internal ISpriteComponent? Sprite { get; private set; }
|
||||
|
||||
internal SnapGridComponent? SnapGrid { get; private set; }
|
||||
|
||||
private (GridId, Vector2i) _lastPosition;
|
||||
|
||||
/// <summary>
|
||||
@@ -62,7 +64,6 @@ namespace Content.Client.GameObjects.Components.IconSmoothing
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SnapGrid = Owner.GetComponent<SnapGridComponent>();
|
||||
Sprite = Owner.GetComponent<ISpriteComponent>();
|
||||
}
|
||||
|
||||
@@ -71,15 +72,14 @@ namespace Content.Client.GameObjects.Components.IconSmoothing
|
||||
{
|
||||
base.Startup();
|
||||
|
||||
if (SnapGrid != null)
|
||||
if (Owner.Transform.Anchored)
|
||||
{
|
||||
SnapGrid.OnPositionChanged += SnapGridOnPositionChanged;
|
||||
|
||||
// ensures lastposition initial value is populated on spawn. Just calling
|
||||
// the hook here would cause a dirty event to fire needlessly
|
||||
_lastPosition = (Owner.Transform.GridID, SnapGrid.Position);
|
||||
var grid = _mapManager.GetGrid(Owner.Transform.GridID);
|
||||
_lastPosition = (Owner.Transform.GridID, grid.TileIndicesFor(Owner.Transform.Coordinates));
|
||||
|
||||
Owner.EntityManager.EventBus.RaiseEvent(EventSource.Local, new IconSmoothDirtyEvent(Owner,null, SnapGrid.Offset, Mode));
|
||||
Owner.EntityManager.EventBus.RaiseEvent(EventSource.Local, new IconSmoothDirtyEvent(Owner, null, Mode));
|
||||
}
|
||||
|
||||
if (Sprite != null && Mode == IconSmoothingMode.Corners)
|
||||
@@ -115,20 +115,22 @@ namespace Content.Client.GameObjects.Components.IconSmoothing
|
||||
|
||||
private void CalculateNewSpriteCardinal()
|
||||
{
|
||||
if (SnapGrid == null || Sprite == null)
|
||||
if (!Owner.Transform.Anchored || Sprite == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var dirs = CardinalConnectDirs.None;
|
||||
|
||||
if (MatchingEntity(SnapGrid.GetInDir(Direction.North)))
|
||||
var grid = _mapManager.GetGrid(Owner.Transform.GridID);
|
||||
var position = Owner.Transform.Coordinates;
|
||||
if (MatchingEntity(grid.GetInDir(position, Direction.North)))
|
||||
dirs |= CardinalConnectDirs.North;
|
||||
if (MatchingEntity(SnapGrid.GetInDir(Direction.South)))
|
||||
if (MatchingEntity(grid.GetInDir(position, Direction.South)))
|
||||
dirs |= CardinalConnectDirs.South;
|
||||
if (MatchingEntity(SnapGrid.GetInDir(Direction.East)))
|
||||
if (MatchingEntity(grid.GetInDir(position, Direction.East)))
|
||||
dirs |= CardinalConnectDirs.East;
|
||||
if (MatchingEntity(SnapGrid.GetInDir(Direction.West)))
|
||||
if (MatchingEntity(grid.GetInDir(position, Direction.West)))
|
||||
dirs |= CardinalConnectDirs.West;
|
||||
|
||||
Sprite.LayerSetState(0, $"{StateBase}{(int) dirs}");
|
||||
@@ -151,19 +153,21 @@ namespace Content.Client.GameObjects.Components.IconSmoothing
|
||||
|
||||
protected (CornerFill ne, CornerFill nw, CornerFill sw, CornerFill se) CalculateCornerFill()
|
||||
{
|
||||
if (SnapGrid == null)
|
||||
if (!Owner.Transform.Anchored)
|
||||
{
|
||||
return (CornerFill.None, CornerFill.None, CornerFill.None, CornerFill.None);
|
||||
}
|
||||
|
||||
var n = MatchingEntity(SnapGrid.GetInDir(Direction.North));
|
||||
var ne = MatchingEntity(SnapGrid.GetInDir(Direction.NorthEast));
|
||||
var e = MatchingEntity(SnapGrid.GetInDir(Direction.East));
|
||||
var se = MatchingEntity(SnapGrid.GetInDir(Direction.SouthEast));
|
||||
var s = MatchingEntity(SnapGrid.GetInDir(Direction.South));
|
||||
var sw = MatchingEntity(SnapGrid.GetInDir(Direction.SouthWest));
|
||||
var w = MatchingEntity(SnapGrid.GetInDir(Direction.West));
|
||||
var nw = MatchingEntity(SnapGrid.GetInDir(Direction.NorthWest));
|
||||
var grid = _mapManager.GetGrid(Owner.Transform.GridID);
|
||||
var position = Owner.Transform.Coordinates;
|
||||
var n = MatchingEntity(grid.GetInDir(position, Direction.North));
|
||||
var ne = MatchingEntity(grid.GetInDir(position, Direction.NorthEast));
|
||||
var e = MatchingEntity(grid.GetInDir(position, Direction.East));
|
||||
var se = MatchingEntity(grid.GetInDir(position, Direction.SouthEast));
|
||||
var s = MatchingEntity(grid.GetInDir(position, Direction.South));
|
||||
var sw = MatchingEntity(grid.GetInDir(position, Direction.SouthWest));
|
||||
var w = MatchingEntity(grid.GetInDir(position, Direction.West));
|
||||
var nw = MatchingEntity(grid.GetInDir(position, Direction.NorthWest));
|
||||
|
||||
// ReSharper disable InconsistentNaming
|
||||
var cornerNE = CornerFill.None;
|
||||
@@ -234,28 +238,28 @@ namespace Content.Client.GameObjects.Components.IconSmoothing
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
if (SnapGrid != null)
|
||||
if (Owner.Transform.Anchored)
|
||||
{
|
||||
SnapGrid.OnPositionChanged -= SnapGridOnPositionChanged;
|
||||
Owner.EntityManager.EventBus.RaiseEvent(EventSource.Local, new IconSmoothDirtyEvent(Owner, _lastPosition, SnapGrid.Offset, Mode));
|
||||
Owner.EntityManager.EventBus.RaiseEvent(EventSource.Local, new IconSmoothDirtyEvent(Owner, _lastPosition, Mode));
|
||||
}
|
||||
}
|
||||
|
||||
private void SnapGridOnPositionChanged()
|
||||
public void SnapGridOnPositionChanged()
|
||||
{
|
||||
if (SnapGrid != null)
|
||||
if (Owner.Transform.Anchored)
|
||||
{
|
||||
Owner.EntityManager.EventBus.RaiseEvent(EventSource.Local, new IconSmoothDirtyEvent(Owner, _lastPosition, SnapGrid.Offset, Mode));
|
||||
_lastPosition = (Owner.Transform.GridID, SnapGrid.Position);
|
||||
Owner.EntityManager.EventBus.RaiseEvent(EventSource.Local, new IconSmoothDirtyEvent(Owner, _lastPosition, Mode));
|
||||
var grid = _mapManager.GetGrid(Owner.Transform.GridID);
|
||||
_lastPosition = (Owner.Transform.GridID, grid.TileIndicesFor(Owner.Transform.Coordinates));
|
||||
}
|
||||
}
|
||||
|
||||
[System.Diagnostics.Contracts.Pure]
|
||||
protected bool MatchingEntity(IEnumerable<IEntity> candidates)
|
||||
protected bool MatchingEntity(IEnumerable<EntityUid> candidates)
|
||||
{
|
||||
foreach (var entity in candidates)
|
||||
{
|
||||
if (!entity.TryGetComponent(out IconSmoothComponent? other))
|
||||
if (!Owner.EntityManager.ComponentManager.TryGetComponent(entity, out IconSmoothComponent? other))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Diagnostics.Contracts;
|
||||
using Content.Client.GameObjects.Components.IconSmoothing;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Utility;
|
||||
using Robust.Shared.ViewVariables;
|
||||
using static Robust.Client.GameObjects.SpriteComponent;
|
||||
|
||||
@@ -23,6 +26,8 @@ namespace Content.Client.GameObjects.Components
|
||||
{
|
||||
public override string Name => "LowWall";
|
||||
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
|
||||
public CornerFill LastCornerNE { get; private set; }
|
||||
public CornerFill LastCornerSE { get; private set; }
|
||||
public CornerFill LastCornerSW { get; private set; }
|
||||
@@ -65,19 +70,22 @@ namespace Content.Client.GameObjects.Components
|
||||
{
|
||||
base.CalculateNewSprite();
|
||||
|
||||
if (Sprite == null || SnapGrid == null || _overlaySprite == null)
|
||||
if (Sprite == null || !Owner.Transform.Anchored || _overlaySprite == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var (n, nl) = MatchingWall(SnapGrid.GetInDir(Direction.North));
|
||||
var (ne, nel) = MatchingWall(SnapGrid.GetInDir(Direction.NorthEast));
|
||||
var (e, el) = MatchingWall(SnapGrid.GetInDir(Direction.East));
|
||||
var (se, sel) = MatchingWall(SnapGrid.GetInDir(Direction.SouthEast));
|
||||
var (s, sl) = MatchingWall(SnapGrid.GetInDir(Direction.South));
|
||||
var (sw, swl) = MatchingWall(SnapGrid.GetInDir(Direction.SouthWest));
|
||||
var (w, wl) = MatchingWall(SnapGrid.GetInDir(Direction.West));
|
||||
var (nw, nwl) = MatchingWall(SnapGrid.GetInDir(Direction.NorthWest));
|
||||
var grid = _mapManager.GetGrid(Owner.Transform.GridID);
|
||||
var coords = Owner.Transform.Coordinates;
|
||||
|
||||
var (n, nl) = MatchingWall(grid.GetInDir(coords, Direction.North));
|
||||
var (ne, nel) = MatchingWall(grid.GetInDir(coords, Direction.NorthEast));
|
||||
var (e, el) = MatchingWall(grid.GetInDir(coords, Direction.East));
|
||||
var (se, sel) = MatchingWall(grid.GetInDir(coords, Direction.SouthEast));
|
||||
var (s, sl) = MatchingWall(grid.GetInDir(coords, Direction.South));
|
||||
var (sw, swl) = MatchingWall(grid.GetInDir(coords, Direction.SouthWest));
|
||||
var (w, wl) = MatchingWall(grid.GetInDir(coords, Direction.West));
|
||||
var (nw, nwl) = MatchingWall(grid.GetInDir(coords, Direction.NorthWest));
|
||||
|
||||
// ReSharper disable InconsistentNaming
|
||||
var cornerNE = CornerFill.None;
|
||||
@@ -194,9 +202,9 @@ namespace Content.Client.GameObjects.Components
|
||||
LastCornerSW = cornerSW;
|
||||
LastCornerNW = cornerNW;
|
||||
|
||||
foreach (var entity in SnapGrid.GetLocal())
|
||||
foreach (var entity in grid.GetLocal(coords))
|
||||
{
|
||||
if (entity.TryGetComponent(out WindowComponent? window))
|
||||
if (Owner.EntityManager.ComponentManager.TryGetComponent(entity, out WindowComponent? window))
|
||||
{
|
||||
window.UpdateSprite();
|
||||
}
|
||||
@@ -204,11 +212,11 @@ namespace Content.Client.GameObjects.Components
|
||||
}
|
||||
|
||||
[Pure]
|
||||
private (bool connected, bool lowWall) MatchingWall(IEnumerable<IEntity> candidates)
|
||||
private (bool connected, bool lowWall) MatchingWall(IEnumerable<EntityUid> candidates)
|
||||
{
|
||||
foreach (var entity in candidates)
|
||||
{
|
||||
if (!entity.TryGetComponent(out IconSmoothComponent? other))
|
||||
if (!Owner.EntityManager.ComponentManager.TryGetComponent(entity, out IconSmoothComponent? other))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
using Content.Shared.GameObjects.Components.Nutrition;
|
||||
using Content.Shared.Utility;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.Utility;
|
||||
using YamlDotNet.RepresentationModel;
|
||||
|
||||
namespace Content.Client.GameObjects.Components.Nutrition
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public sealed class DrinkFoodVisualizer : AppearanceVisualizer
|
||||
{
|
||||
[DataField("steps")]
|
||||
private int _steps;
|
||||
|
||||
public override void OnChangeData(AppearanceComponent component)
|
||||
{
|
||||
base.OnChangeData(component);
|
||||
var sprite = component.Owner.GetComponent<ISpriteComponent>();
|
||||
|
||||
if (!component.TryGetData<float>(SharedFoodComponent.FoodVisuals.MaxUses, out var maxUses))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (component.TryGetData<float>(SharedFoodComponent.FoodVisuals.Visual, out var usesLeft))
|
||||
{
|
||||
var step = ContentHelpers.RoundToLevels(usesLeft, maxUses, _steps);
|
||||
sprite.LayerSetState(0, $"icon-{step}");
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite.LayerSetState(0, "icon-0");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,11 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Content.Client.GameObjects.EntitySystems;
|
||||
using Content.Shared.GameObjects.Components;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using static Content.Client.GameObjects.Components.IconSmoothing.IconSmoothComponent;
|
||||
|
||||
@@ -12,18 +15,18 @@ namespace Content.Client.GameObjects.Components
|
||||
[ComponentReference(typeof(SharedWindowComponent))]
|
||||
public sealed class WindowComponent : SharedWindowComponent
|
||||
{
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
|
||||
[DataField("base")]
|
||||
private string? _stateBase;
|
||||
|
||||
private ISpriteComponent? _sprite;
|
||||
private SnapGridComponent? _snapGrid;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
_sprite = Owner.GetComponent<ISpriteComponent>();
|
||||
_snapGrid = Owner.GetComponent<SnapGridComponent>();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -31,11 +34,6 @@ namespace Content.Client.GameObjects.Components
|
||||
{
|
||||
base.Startup();
|
||||
|
||||
if (_snapGrid != null)
|
||||
{
|
||||
_snapGrid.OnPositionChanged += SnapGridOnPositionChanged;
|
||||
}
|
||||
|
||||
Owner.EntityManager.EventBus.RaiseEvent(EventSource.Local, new WindowSmoothDirtyEvent(Owner));
|
||||
|
||||
if (_sprite != null)
|
||||
@@ -67,18 +65,7 @@ namespace Content.Client.GameObjects.Components
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Shutdown()
|
||||
{
|
||||
if (_snapGrid != null)
|
||||
{
|
||||
_snapGrid.OnPositionChanged -= SnapGridOnPositionChanged;
|
||||
}
|
||||
|
||||
base.Shutdown();
|
||||
}
|
||||
|
||||
private void SnapGridOnPositionChanged()
|
||||
public void SnapGridOnPositionChanged()
|
||||
{
|
||||
Owner.EntityManager.EventBus.RaiseEvent(EventSource.Local, new WindowSmoothDirtyEvent(Owner));
|
||||
}
|
||||
@@ -102,14 +89,14 @@ namespace Content.Client.GameObjects.Components
|
||||
|
||||
private LowWallComponent? FindLowWall()
|
||||
{
|
||||
if (_snapGrid == null)
|
||||
{
|
||||
if (!Owner.Transform.Anchored)
|
||||
return null;
|
||||
}
|
||||
|
||||
foreach (var entity in _snapGrid.GetLocal())
|
||||
var grid = _mapManager.GetGrid(Owner.Transform.GridID);
|
||||
var coords = Owner.Transform.Coordinates;
|
||||
foreach (var entity in grid.GetLocal(coords))
|
||||
{
|
||||
if (entity.TryGetComponent(out LowWallComponent? lowWall))
|
||||
if (Owner.EntityManager.ComponentManager.TryGetComponent(entity, out LowWallComponent? lowWall))
|
||||
{
|
||||
return lowWall;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
using System;
|
||||
using System;
|
||||
using Content.Shared.GameObjects.Components;
|
||||
using Content.Shared.Utility;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Map;
|
||||
|
||||
namespace Content.Client.GameObjects.Components
|
||||
{
|
||||
@@ -15,10 +17,10 @@ namespace Content.Client.GameObjects.Components
|
||||
base.OnChangeData(component);
|
||||
|
||||
var sprite = component.Owner.GetComponent<ISpriteComponent>();
|
||||
if (!component.Owner.TryGetComponent(out SnapGridComponent? snapGrid))
|
||||
if (!component.Owner.Transform.Anchored)
|
||||
return;
|
||||
|
||||
var lowWall = FindLowWall(snapGrid);
|
||||
var lowWall = FindLowWall(IoCManager.Resolve<IMapManager>(), component.Owner.Transform);
|
||||
if (lowWall == null)
|
||||
return;
|
||||
|
||||
@@ -48,11 +50,13 @@ namespace Content.Client.GameObjects.Components
|
||||
}
|
||||
}
|
||||
|
||||
private static LowWallComponent? FindLowWall(SnapGridComponent snapGrid)
|
||||
private static LowWallComponent? FindLowWall(IMapManager mapManager, ITransformComponent transform)
|
||||
{
|
||||
foreach (var entity in snapGrid.GetLocal())
|
||||
var grid = mapManager.GetGrid(transform.GridID);
|
||||
var coords = transform.Coordinates;
|
||||
foreach (var entity in grid.GetLocal(coords))
|
||||
{
|
||||
if (entity.TryGetComponent(out LowWallComponent? lowWall))
|
||||
if (transform.Owner.EntityManager.ComponentManager.TryGetComponent(entity, out LowWallComponent? lowWall))
|
||||
{
|
||||
return lowWall;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Content.Client.GameObjects.Components.IconSmoothing;
|
||||
using JetBrains.Annotations;
|
||||
@@ -6,6 +6,7 @@ using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Client.GameObjects.EntitySystems
|
||||
{
|
||||
@@ -17,7 +18,7 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
{
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
|
||||
private readonly Queue<IEntity> _dirtyEntities = new();
|
||||
private readonly Queue<EntityUid> _dirtyEntities = new();
|
||||
|
||||
private int _generation;
|
||||
|
||||
@@ -27,13 +28,18 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<IconSmoothDirtyEvent>(HandleDirtyEvent);
|
||||
|
||||
SubscribeLocalEvent<IconSmoothComponent, SnapGridPositionChangedEvent>(HandleSnapGridMove);
|
||||
}
|
||||
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
UnsubscribeLocalEvent<IconSmoothDirtyEvent>();
|
||||
|
||||
UnsubscribeLocalEvent<IconSmoothComponent, SnapGridPositionChangedEvent>(HandleSnapGridMove);
|
||||
}
|
||||
|
||||
public override void FrameUpdate(float frameTime)
|
||||
@@ -63,20 +69,20 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
senderEnt.TryGetComponent(out IconSmoothComponent? iconSmooth)
|
||||
&& iconSmooth.Running)
|
||||
{
|
||||
var snapGrid = senderEnt.GetComponent<SnapGridComponent>();
|
||||
var grid1 = _mapManager.GetGrid(senderEnt.Transform.GridID);
|
||||
var coords = senderEnt.Transform.Coordinates;
|
||||
|
||||
_dirtyEntities.Enqueue(senderEnt);
|
||||
AddValidEntities(snapGrid.GetInDir(Direction.North));
|
||||
AddValidEntities(snapGrid.GetInDir(Direction.South));
|
||||
AddValidEntities(snapGrid.GetInDir(Direction.East));
|
||||
AddValidEntities(snapGrid.GetInDir(Direction.West));
|
||||
_dirtyEntities.Enqueue(senderEnt.Uid);
|
||||
AddValidEntities(grid1.GetInDir(coords, Direction.North));
|
||||
AddValidEntities(grid1.GetInDir(coords, Direction.South));
|
||||
AddValidEntities(grid1.GetInDir(coords, Direction.East));
|
||||
AddValidEntities(grid1.GetInDir(coords, Direction.West));
|
||||
if (ev.Mode == IconSmoothingMode.Corners)
|
||||
{
|
||||
|
||||
AddValidEntities(snapGrid.GetInDir(Direction.NorthEast));
|
||||
AddValidEntities(snapGrid.GetInDir(Direction.SouthEast));
|
||||
AddValidEntities(snapGrid.GetInDir(Direction.SouthWest));
|
||||
AddValidEntities(snapGrid.GetInDir(Direction.NorthWest));
|
||||
AddValidEntities(grid1.GetInDir(coords, Direction.NorthEast));
|
||||
AddValidEntities(grid1.GetInDir(coords, Direction.SouthEast));
|
||||
AddValidEntities(grid1.GetInDir(coords, Direction.SouthWest));
|
||||
AddValidEntities(grid1.GetInDir(coords, Direction.NorthWest));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,43 +91,43 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
{
|
||||
var pos = ev.LastPosition.Value.pos;
|
||||
|
||||
AddValidEntities(grid.GetSnapGridCell(pos + new Vector2i(1, 0), ev.Offset));
|
||||
AddValidEntities(grid.GetSnapGridCell(pos + new Vector2i(-1, 0), ev.Offset));
|
||||
AddValidEntities(grid.GetSnapGridCell(pos + new Vector2i(0, 1), ev.Offset));
|
||||
AddValidEntities(grid.GetSnapGridCell(pos + new Vector2i(0, -1), ev.Offset));
|
||||
AddValidEntities(grid.GetAnchoredEntities(pos + new Vector2i(1, 0)));
|
||||
AddValidEntities(grid.GetAnchoredEntities(pos + new Vector2i(-1, 0)));
|
||||
AddValidEntities(grid.GetAnchoredEntities(pos + new Vector2i(0, 1)));
|
||||
AddValidEntities(grid.GetAnchoredEntities(pos + new Vector2i(0, -1)));
|
||||
if (ev.Mode == IconSmoothingMode.Corners)
|
||||
{
|
||||
AddValidEntities(grid.GetSnapGridCell(pos + new Vector2i(1, 1), ev.Offset));
|
||||
AddValidEntities(grid.GetSnapGridCell(pos + new Vector2i(-1, -1), ev.Offset));
|
||||
AddValidEntities(grid.GetSnapGridCell(pos + new Vector2i(-1, 1), ev.Offset));
|
||||
AddValidEntities(grid.GetSnapGridCell(pos + new Vector2i(1, -1), ev.Offset));
|
||||
AddValidEntities(grid.GetAnchoredEntities(pos + new Vector2i(1, 1)));
|
||||
AddValidEntities(grid.GetAnchoredEntities(pos + new Vector2i(-1, -1)));
|
||||
AddValidEntities(grid.GetAnchoredEntities(pos + new Vector2i(-1, 1)));
|
||||
AddValidEntities(grid.GetAnchoredEntities(pos + new Vector2i(1, -1)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void AddValidEntities(IEnumerable<IEntity> candidates)
|
||||
private static void HandleSnapGridMove(EntityUid uid, IconSmoothComponent component, SnapGridPositionChangedEvent args)
|
||||
{
|
||||
component.SnapGridOnPositionChanged();
|
||||
}
|
||||
|
||||
private void AddValidEntities(IEnumerable<EntityUid> candidates)
|
||||
{
|
||||
foreach (var entity in candidates)
|
||||
{
|
||||
if (entity.HasComponent<IconSmoothComponent>())
|
||||
if (ComponentManager.HasComponent<IconSmoothComponent>(entity))
|
||||
{
|
||||
_dirtyEntities.Enqueue(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void AddValidEntities(IEnumerable<IComponent> candidates)
|
||||
{
|
||||
AddValidEntities(candidates.Select(c => c.Owner));
|
||||
}
|
||||
|
||||
private void CalculateNewSprite(IEntity entity)
|
||||
private void CalculateNewSprite(EntityUid euid)
|
||||
{
|
||||
// The generation check prevents updating an entity multiple times per tick.
|
||||
// As it stands now, it's totally possible for something to get queued twice.
|
||||
// Generation on the component is set after an update so we can cull updates that happened this generation.
|
||||
if (!entity.IsValid()
|
||||
|| !entity.TryGetComponent(out IconSmoothComponent? smoothing)
|
||||
if (!EntityManager.EntityExists(euid)
|
||||
|| !ComponentManager.TryGetComponent(euid, out IconSmoothComponent? smoothing)
|
||||
|| smoothing.UpdateGeneration == _generation)
|
||||
{
|
||||
return;
|
||||
@@ -138,16 +144,14 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
/// </summary>
|
||||
public sealed class IconSmoothDirtyEvent : EntityEventArgs
|
||||
{
|
||||
public IconSmoothDirtyEvent(IEntity sender, (GridId grid, Vector2i pos)? lastPosition, SnapGridOffset offset, IconSmoothingMode mode)
|
||||
public IconSmoothDirtyEvent(IEntity sender, (GridId grid, Vector2i pos)? lastPosition, IconSmoothingMode mode)
|
||||
{
|
||||
LastPosition = lastPosition;
|
||||
Offset = offset;
|
||||
Mode = mode;
|
||||
Sender = sender;
|
||||
}
|
||||
|
||||
public (GridId grid, Vector2i pos)? LastPosition { get; }
|
||||
public SnapGridOffset Offset { get; }
|
||||
public IconSmoothingMode Mode { get; }
|
||||
public IEntity Sender { get; }
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using Content.Client.GameObjects.Components;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
@@ -15,6 +15,7 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<WindowSmoothDirtyEvent>(HandleDirtyEvent);
|
||||
SubscribeLocalEvent<WindowComponent, SnapGridPositionChangedEvent>(HandleSnapGridMove);
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
@@ -22,6 +23,7 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
base.Shutdown();
|
||||
|
||||
UnsubscribeLocalEvent<WindowSmoothDirtyEvent>();
|
||||
UnsubscribeLocalEvent<WindowComponent, SnapGridPositionChangedEvent>(HandleSnapGridMove);
|
||||
}
|
||||
|
||||
private void HandleDirtyEvent(WindowSmoothDirtyEvent ev)
|
||||
@@ -32,6 +34,11 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
}
|
||||
}
|
||||
|
||||
private static void HandleSnapGridMove(EntityUid uid, WindowComponent component, SnapGridPositionChangedEvent args)
|
||||
{
|
||||
component.SnapGridOnPositionChanged();
|
||||
}
|
||||
|
||||
public override void FrameUpdate(float frameTime)
|
||||
{
|
||||
base.FrameUpdate(frameTime);
|
||||
|
||||
@@ -165,5 +165,13 @@ namespace Content.Client.State
|
||||
|
||||
Viewport.Viewport.Eye = _eyeManager.CurrentEye;
|
||||
}
|
||||
|
||||
protected override void OnKeyBindStateChanged(ViewportBoundKeyEventArgs args)
|
||||
{
|
||||
if (args.Viewport == null)
|
||||
base.OnKeyBindStateChanged(new ViewportBoundKeyEventArgs(args.KeyEventArgs, Viewport.Viewport));
|
||||
else
|
||||
base.OnKeyBindStateChanged(args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,10 +214,10 @@ namespace Content.Client.State
|
||||
/// Converts a state change event from outside the simulation to inside the simulation.
|
||||
/// </summary>
|
||||
/// <param name="args">Event data values for a bound key state change.</param>
|
||||
private void OnKeyBindStateChanged(ViewportBoundKeyEventArgs args)
|
||||
protected virtual void OnKeyBindStateChanged(ViewportBoundKeyEventArgs args)
|
||||
{
|
||||
// If there is no InputSystem, then there is nothing to forward to, and nothing to do here.
|
||||
if(!EntitySystemManager.TryGetEntitySystem(out InputSystem inputSys))
|
||||
if(!EntitySystemManager.TryGetEntitySystem(out InputSystem? inputSys))
|
||||
return;
|
||||
|
||||
var kArgs = args.KeyEventArgs;
|
||||
|
||||
@@ -28,6 +28,8 @@ namespace Content.IntegrationTests
|
||||
FailureLogLevel = LogLevel.Warning
|
||||
};
|
||||
|
||||
options.ContentStart = true;
|
||||
|
||||
options.ContentAssemblies = new[]
|
||||
{
|
||||
typeof(Shared.EntryPoint).Assembly,
|
||||
@@ -69,6 +71,8 @@ namespace Content.IntegrationTests
|
||||
FailureLogLevel = LogLevel.Warning
|
||||
};
|
||||
|
||||
options.ContentStart = true;
|
||||
|
||||
options.ContentAssemblies = new[]
|
||||
{
|
||||
typeof(Shared.EntryPoint).Assembly,
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace Content.Server.Commands.GameTicking
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!childEntity.TryGetComponent(out SnapGridComponent? snapGrid))
|
||||
if (!childEntity.Transform.Anchored)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -4,10 +4,8 @@ using Content.Server.Utility;
|
||||
using Content.Shared.Construction;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using YamlDotNet.Serialization;
|
||||
|
||||
namespace Content.Server.Construction.Completions
|
||||
{
|
||||
@@ -15,14 +13,13 @@ namespace Content.Server.Construction.Completions
|
||||
[DataDefinition]
|
||||
public class SnapToGrid : IGraphAction
|
||||
{
|
||||
[DataField("offset")] public SnapGridOffset Offset { get; private set; } = SnapGridOffset.Center;
|
||||
[DataField("southRotation")] public bool SouthRotation { get; private set; } = false;
|
||||
|
||||
public async Task PerformAction(IEntity entity, IEntity? user)
|
||||
{
|
||||
if (entity.Deleted) return;
|
||||
|
||||
entity.SnapToGrid(Offset);
|
||||
entity.SnapToGrid();
|
||||
if (SouthRotation)
|
||||
{
|
||||
entity.Transform.LocalRotation = Angle.Zero;
|
||||
|
||||
@@ -10,7 +10,6 @@ using Content.Shared.Interfaces.GameObjects.Components;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.Physics;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Server.GameObjects.Components
|
||||
@@ -105,7 +104,7 @@ namespace Content.Server.GameObjects.Components
|
||||
}
|
||||
|
||||
if (Snap)
|
||||
Owner.SnapToGrid(SnapGridOffset.Center, Owner.EntityManager);
|
||||
Owner.SnapToGrid(Owner.EntityManager);
|
||||
|
||||
Owner.EntityManager.EventBus.RaiseLocalEvent(Owner.Uid, new AnchoredMessage(), false);
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ using Content.Server.GameObjects.EntitySystems;
|
||||
using Content.Shared.Atmos;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
@@ -14,6 +16,8 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
[RegisterComponent]
|
||||
public class AirtightComponent : Component, IMapInit
|
||||
{
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
|
||||
private (GridId, Vector2i) _lastPosition;
|
||||
private AtmosphereSystem _atmosphereSystem = default!;
|
||||
|
||||
@@ -77,14 +81,13 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
|
||||
_atmosphereSystem = EntitySystem.Get<AtmosphereSystem>();
|
||||
|
||||
// Using the SnapGrid is critical for performance, and thus if it is absent the component
|
||||
// will not be airtight. A warning is much easier to track down than the object magically
|
||||
// not being airtight, so log one if the SnapGrid component is missing.
|
||||
Owner.EnsureComponentWarn(out SnapGridComponent _);
|
||||
|
||||
if (_fixAirBlockedDirectionInitialize)
|
||||
RotateEvent(new RotateEvent(Owner, Angle.Zero, Owner.Transform.WorldRotation));
|
||||
|
||||
// Adding this component will immediately anchor the entity, because the atmos system
|
||||
// requires airtight entities to be anchored for performance.
|
||||
Owner.Transform.Anchored = true;
|
||||
|
||||
UpdatePosition();
|
||||
}
|
||||
|
||||
@@ -116,28 +119,25 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
return newAirBlockedDirs;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void MapInit()
|
||||
{
|
||||
if (Owner.TryGetComponent(out SnapGridComponent? snapGrid))
|
||||
if (Owner.Transform.Anchored)
|
||||
{
|
||||
snapGrid.OnPositionChanged += OnTransformMove;
|
||||
_lastPosition = (Owner.Transform.GridID, snapGrid.Position);
|
||||
var grid = _mapManager.GetGrid(Owner.Transform.GridID);
|
||||
_lastPosition = (Owner.Transform.GridID, grid.TileIndicesFor(Owner.Transform.Coordinates));
|
||||
}
|
||||
|
||||
UpdatePosition();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
_airBlocked = false;
|
||||
|
||||
if (Owner.TryGetComponent(out SnapGridComponent? snapGrid))
|
||||
{
|
||||
snapGrid.OnPositionChanged -= OnTransformMove;
|
||||
}
|
||||
|
||||
UpdatePosition(_lastPosition.Item1, _lastPosition.Item2);
|
||||
|
||||
if (_fixVacuum)
|
||||
@@ -146,21 +146,25 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTransformMove()
|
||||
public void OnTransformMove()
|
||||
{
|
||||
UpdatePosition(_lastPosition.Item1, _lastPosition.Item2);
|
||||
UpdatePosition();
|
||||
|
||||
if (Owner.TryGetComponent(out SnapGridComponent? snapGrid))
|
||||
if (Owner.Transform.Anchored)
|
||||
{
|
||||
_lastPosition = (Owner.Transform.GridID, snapGrid.Position);
|
||||
var grid = _mapManager.GetGrid(Owner.Transform.GridID);
|
||||
_lastPosition = (Owner.Transform.GridID, grid.TileIndicesFor(Owner.Transform.Coordinates));
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdatePosition()
|
||||
{
|
||||
if (Owner.TryGetComponent(out SnapGridComponent? snapGrid))
|
||||
UpdatePosition(Owner.Transform.GridID, snapGrid.Position);
|
||||
if (Owner.Transform.Anchored)
|
||||
{
|
||||
var grid = _mapManager.GetGrid(Owner.Transform.GridID);
|
||||
UpdatePosition(Owner.Transform.GridID, grid.TileIndicesFor(Owner.Transform.Coordinates));
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdatePosition(GridId gridId, Vector2i pos)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Content.Server.Atmos;
|
||||
using Content.Server.GameObjects.Components.Atmos.Piping;
|
||||
@@ -11,6 +12,8 @@ using Content.Shared.GameObjects.EntitySystems.ActionBlocker;
|
||||
using Content.Shared.Interfaces.GameObjects.Components;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.ViewVariables;
|
||||
using Robust.Shared.Physics;
|
||||
@@ -24,6 +27,8 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
[ComponentReference(typeof(IActivate))]
|
||||
public class GasCanisterComponent : Component, IGasMixtureHolder, IActivate
|
||||
{
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
|
||||
public override string Name => "GasCanister";
|
||||
|
||||
private const int MaxLabelLength = 32;
|
||||
@@ -114,9 +119,11 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
|
||||
public void TryConnectToPort()
|
||||
{
|
||||
if (!Owner.TryGetComponent<SnapGridComponent>(out var snapGrid)) return;
|
||||
var port = snapGrid.GetLocal()
|
||||
.Select(entity => entity.TryGetComponent<GasCanisterPortComponent>(out var port) ? port : null)
|
||||
if (!Owner.Transform.Anchored) return;
|
||||
var grid = _mapManager.GetGrid(Owner.Transform.GridID);
|
||||
var coords = Owner.Transform.Coordinates;
|
||||
var port = grid.GetLocal(coords)
|
||||
.Select(entity => Owner.EntityManager.ComponentManager.TryGetComponent<GasCanisterPortComponent>(entity, out var port) ? port : null)
|
||||
.Where(port => port != null)
|
||||
.Where(port => !port!.ConnectedToCanister)
|
||||
.FirstOrDefault();
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
#nullable enable
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Content.Server.GameObjects.Components.NodeContainer;
|
||||
using Content.Server.GameObjects.Components.NodeContainer.Nodes;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Atmos.Piping
|
||||
@@ -13,6 +16,8 @@ namespace Content.Server.GameObjects.Components.Atmos.Piping
|
||||
{
|
||||
public override string Name => "GasCanisterPort";
|
||||
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
|
||||
[ViewVariables]
|
||||
public GasCanisterComponent? ConnectedCanister { get; private set; }
|
||||
|
||||
@@ -27,12 +32,14 @@ namespace Content.Server.GameObjects.Components.Atmos.Piping
|
||||
base.Initialize();
|
||||
Owner.EnsureComponentWarn<PipeNetDeviceComponent>();
|
||||
SetGasPort();
|
||||
if (Owner.TryGetComponent<SnapGridComponent>(out var snapGrid))
|
||||
if (Owner.Transform.Anchored)
|
||||
{
|
||||
var entities = snapGrid.GetLocal();
|
||||
var grid = _mapManager.GetGrid(Owner.Transform.GridID);
|
||||
var coords = Owner.Transform.Coordinates;
|
||||
var entities = grid.GetLocal(coords);
|
||||
foreach (var entity in entities)
|
||||
{
|
||||
if (entity.TryGetComponent<GasCanisterComponent>(out var canister) && canister.Anchored && !canister.ConnectedToPort)
|
||||
if (Owner.EntityManager.ComponentManager.TryGetComponent<GasCanisterComponent>(entity, out var canister) && canister.Anchored && !canister.ConnectedToPort)
|
||||
{
|
||||
canister.TryConnectToPort();
|
||||
break;
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
#nullable enable
|
||||
#nullable enable
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Content.Server.GameObjects.Components.Atmos;
|
||||
using Content.Server.Utility;
|
||||
using Content.Shared.Chemistry;
|
||||
using Content.Shared.GameObjects.EntitySystems;
|
||||
using Content.Shared.Interfaces.GameObjects.Components;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Log;
|
||||
@@ -24,7 +23,6 @@ namespace Content.Server.GameObjects.Components.Chemistry
|
||||
[Dependency] protected readonly IMapManager MapManager = default!;
|
||||
[Dependency] protected readonly IPrototypeManager PrototypeManager = default!;
|
||||
|
||||
[ComponentDependency] protected readonly SnapGridComponent? SnapGridComponent = default!;
|
||||
[ComponentDependency] protected readonly SolutionContainerComponent? SolutionContainerComponent = default!;
|
||||
public int Amount { get; set; }
|
||||
public SolutionAreaEffectInceptionComponent? Inception { get; set; }
|
||||
@@ -63,26 +61,20 @@ namespace Content.Server.GameObjects.Components.Chemistry
|
||||
return;
|
||||
}
|
||||
|
||||
if (SnapGridComponent == null)
|
||||
{
|
||||
Logger.Error("AreaEffectComponent attached to " + Owner.Prototype.ID +
|
||||
" couldn't get SnapGridComponent from owner.");
|
||||
return;
|
||||
}
|
||||
|
||||
void SpreadToDir(Direction dir)
|
||||
{
|
||||
foreach (var neighbor in SnapGridComponent.GetInDir(dir))
|
||||
var grid = MapManager.GetGrid(Owner.Transform.GridID);
|
||||
var coords = Owner.Transform.Coordinates;
|
||||
foreach (var neighbor in grid.GetInDir(coords, dir))
|
||||
{
|
||||
if (neighbor.TryGetComponent(out SolutionAreaEffectComponent? comp) && comp.Inception == Inception)
|
||||
if (Owner.EntityManager.ComponentManager.TryGetComponent(neighbor, out SolutionAreaEffectComponent? comp) && comp.Inception == Inception)
|
||||
return;
|
||||
|
||||
if (neighbor.TryGetComponent(out AirtightComponent? airtight) && airtight.AirBlocked)
|
||||
if (Owner.EntityManager.ComponentManager.TryGetComponent(neighbor, out AirtightComponent? airtight) && airtight.AirBlocked)
|
||||
return;
|
||||
}
|
||||
|
||||
var newEffect =
|
||||
Owner.EntityManager.SpawnEntity(Owner.Prototype.ID, SnapGridComponent.DirectionToGrid(dir));
|
||||
var newEffect = Owner.EntityManager.SpawnEntity(Owner.Prototype.ID, grid.DirectionToGrid(coords, dir));
|
||||
|
||||
if (!newEffect.TryGetComponent(out SolutionAreaEffectComponent? effectComponent))
|
||||
{
|
||||
|
||||
@@ -26,6 +26,7 @@ using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.Physics;
|
||||
using Robust.Shared.Player;
|
||||
@@ -43,6 +44,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
public class DisposalMailingUnitComponent : SharedDisposalMailingUnitComponent, IInteractHand, IActivate, IInteractUsing, IDragDropOn
|
||||
{
|
||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
|
||||
private const string HolderPrototypeId = "DisposalHolder";
|
||||
|
||||
@@ -277,17 +279,17 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
return false;
|
||||
}
|
||||
|
||||
var snapGrid = Owner.GetComponent<SnapGridComponent>();
|
||||
var entry = snapGrid
|
||||
.GetLocal()
|
||||
.FirstOrDefault(entity => entity.HasComponent<DisposalEntryComponent>());
|
||||
var grid = _mapManager.GetGrid(Owner.Transform.GridID);
|
||||
var coords = Owner.Transform.Coordinates;
|
||||
var entry = grid.GetLocal(coords)
|
||||
.FirstOrDefault(entity => Owner.EntityManager.ComponentManager.HasComponent<DisposalEntryComponent>(entity));
|
||||
|
||||
if (entry == null)
|
||||
if (entry == default)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var entryComponent = entry.GetComponent<DisposalEntryComponent>();
|
||||
var entryComponent = Owner.EntityManager.ComponentManager.GetComponent<DisposalEntryComponent>(entry);
|
||||
var entities = _container.ContainedEntities.ToList();
|
||||
foreach (var entity in _container.ContainedEntities.ToList())
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Content.Shared.GameObjects.Components.Disposal;
|
||||
using Content.Shared.GameObjects.EntitySystems;
|
||||
@@ -12,6 +13,7 @@ using Robust.Shared.Containers;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Prototypes;
|
||||
@@ -26,6 +28,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
public abstract class DisposalTubeComponent : Component, IDisposalTubeComponent, IBreakAct
|
||||
{
|
||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
|
||||
private static readonly TimeSpan ClangDelay = TimeSpan.FromSeconds(0.5);
|
||||
private TimeSpan _lastClang;
|
||||
@@ -67,12 +70,13 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
public IDisposalTubeComponent? NextTube(DisposalHolderComponent holder)
|
||||
{
|
||||
var nextDirection = NextDirection(holder);
|
||||
var snapGrid = Owner.GetComponent<SnapGridComponent>();
|
||||
var oppositeDirection = new Angle(nextDirection.ToAngle().Theta + Math.PI).GetDir();
|
||||
|
||||
foreach (var entity in snapGrid.GetInDir(nextDirection))
|
||||
var grid = _mapManager.GetGrid(Owner.Transform.GridID);
|
||||
var position = Owner.Transform.Coordinates;
|
||||
foreach (var entity in grid.GetInDir(position, nextDirection))
|
||||
{
|
||||
if (!entity.TryGetComponent(out IDisposalTubeComponent? tube))
|
||||
if (!Owner.EntityManager.ComponentManager.TryGetComponent(entity, out IDisposalTubeComponent? tube))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Physics;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Random;
|
||||
@@ -44,6 +45,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
public class DisposalUnitComponent : SharedDisposalUnitComponent, IInteractHand, IActivate, IInteractUsing, IThrowCollide, IGasMixtureHolder
|
||||
{
|
||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
|
||||
public override string Name => "DisposalUnit";
|
||||
|
||||
@@ -260,17 +262,17 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
return false;
|
||||
}
|
||||
|
||||
var snapGrid = Owner.GetComponent<SnapGridComponent>();
|
||||
var entry = snapGrid
|
||||
.GetLocal()
|
||||
.FirstOrDefault(entity => entity.HasComponent<DisposalEntryComponent>());
|
||||
var grid = _mapManager.GetGrid(Owner.Transform.GridID);
|
||||
var coords = Owner.Transform.Coordinates;
|
||||
var entry = grid.GetLocal(coords)
|
||||
.FirstOrDefault(entity => Owner.EntityManager.ComponentManager.HasComponent<DisposalEntryComponent>(entity));
|
||||
|
||||
if (entry == null)
|
||||
if (entry == default)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var entryComponent = entry.GetComponent<DisposalEntryComponent>();
|
||||
var entryComponent = Owner.EntityManager.ComponentManager.GetComponent<DisposalEntryComponent>(entry);
|
||||
|
||||
if (Owner.Transform.Coordinates.TryGetTileAtmosphere(out var tileAtmos) &&
|
||||
tileAtmos.Air != null &&
|
||||
|
||||
@@ -78,7 +78,6 @@ namespace Content.Server.GameObjects.Components.Fluids
|
||||
private bool _overflown;
|
||||
|
||||
private SpriteComponent _spriteComponent = default!;
|
||||
private SnapGridComponent _snapGrid = default!;
|
||||
|
||||
public ReagentUnit MaxVolume
|
||||
{
|
||||
@@ -112,7 +111,6 @@ namespace Content.Server.GameObjects.Components.Fluids
|
||||
base.Initialize();
|
||||
|
||||
_contents = Owner.EnsureComponentWarn<SolutionContainerComponent>();
|
||||
_snapGrid = Owner.EnsureComponent<SnapGridComponent>();
|
||||
|
||||
// Smaller than 1m^3 for now but realistically this shouldn't be hit
|
||||
MaxVolume = ReagentUnit.New(1000);
|
||||
@@ -348,8 +346,9 @@ namespace Content.Server.GameObjects.Components.Fluids
|
||||
puddle = default;
|
||||
|
||||
var mapGrid = _mapManager.GetGrid(Owner.Transform.GridID);
|
||||
var coords = Owner.Transform.Coordinates;
|
||||
|
||||
if (!Owner.Transform.Coordinates.Offset(direction).TryGetTileRef(out var tile))
|
||||
if (!coords.Offset(direction).TryGetTileRef(out var tile))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -360,16 +359,19 @@ namespace Content.Server.GameObjects.Components.Fluids
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach (var entity in _snapGrid.GetInDir(direction))
|
||||
if (!Owner.Transform.Anchored)
|
||||
return false;
|
||||
|
||||
foreach (var entity in mapGrid.GetInDir(coords, direction))
|
||||
{
|
||||
if (entity.TryGetComponent(out IPhysBody? physics) &&
|
||||
if (Owner.EntityManager.ComponentManager.TryGetComponent(entity, out IPhysBody? physics) &&
|
||||
(physics.CollisionLayer & (int) CollisionGroup.Impassable) != 0)
|
||||
{
|
||||
puddle = default;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (entity.TryGetComponent(out PuddleComponent? existingPuddle))
|
||||
if (Owner.EntityManager.ComponentManager.TryGetComponent(entity, out PuddleComponent? existingPuddle))
|
||||
{
|
||||
if (existingPuddle._overflown)
|
||||
{
|
||||
@@ -382,8 +384,7 @@ namespace Content.Server.GameObjects.Components.Fluids
|
||||
|
||||
if (puddle == default)
|
||||
{
|
||||
var grid = _snapGrid.DirectionToGrid(direction);
|
||||
puddle = () => Owner.EntityManager.SpawnEntity(Owner.Prototype?.ID, grid).GetComponent<PuddleComponent>();
|
||||
puddle = () => Owner.EntityManager.SpawnEntity(Owner.Prototype?.ID, mapGrid.DirectionToGrid(coords, direction)).GetComponent<PuddleComponent>();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace Content.Server.GameObjects.Components.Items.RCD
|
||||
|
||||
var mapGrid = _mapManager.GetGrid(eventArgs.ClickLocation.GetGridId(Owner.EntityManager));
|
||||
var tile = mapGrid.GetTileRef(eventArgs.ClickLocation);
|
||||
var snapPos = mapGrid.SnapGridCellFor(eventArgs.ClickLocation, SnapGridOffset.Center);
|
||||
var snapPos = mapGrid.TileIndicesFor(eventArgs.ClickLocation);
|
||||
|
||||
//Using an RCD isn't instantaneous
|
||||
var cancelToken = new CancellationTokenSource();
|
||||
|
||||
@@ -8,6 +8,7 @@ using Content.Server.GameObjects.Components.Power.AME;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.NodeContainer.NodeGroups
|
||||
@@ -68,12 +69,13 @@ namespace Content.Server.GameObjects.Components.NodeContainer.NodeGroups
|
||||
//Check each shield node to see if it meets core criteria
|
||||
foreach (Node node in Nodes)
|
||||
{
|
||||
if (!node.Owner.TryGetComponent<AMEShieldComponent>(out var shield)) { continue; }
|
||||
var nodeNeighbors = node.Owner
|
||||
.GetComponent<SnapGridComponent>()
|
||||
.GetCellsInSquareArea()
|
||||
.Select(sgc => sgc.Owner)
|
||||
.Where(entity => entity != node.Owner)
|
||||
var nodeOwner = node.Owner;
|
||||
if (!nodeOwner.TryGetComponent<AMEShieldComponent>(out var shield)) { continue; }
|
||||
|
||||
var grid = IoCManager.Resolve<IMapManager>().GetGrid(nodeOwner.Transform.GridID);
|
||||
var nodeNeighbors = grid.GetCellsInSquareArea(nodeOwner.Transform.Coordinates, 1)
|
||||
.Select(sgc => nodeOwner.EntityManager.GetEntity(sgc))
|
||||
.Where(entity => entity != nodeOwner)
|
||||
.Select(entity => entity.TryGetComponent<AMEShieldComponent>(out var adjshield) ? adjshield : null)
|
||||
.Where(adjshield => adjshield != null);
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#nullable enable
|
||||
using System.Collections.Generic;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.NodeContainer.Nodes
|
||||
@@ -13,22 +14,27 @@ namespace Content.Server.GameObjects.Components.NodeContainer.Nodes
|
||||
{
|
||||
protected override IEnumerable<Node> GetReachableNodes()
|
||||
{
|
||||
if (!Owner.TryGetComponent(out SnapGridComponent? snap))
|
||||
if (!Owner.Transform.Anchored)
|
||||
yield break;
|
||||
|
||||
foreach (var cell in snap.GetCardinalNeighborCells())
|
||||
foreach (var entity in cell.GetLocal())
|
||||
var grid = IoCManager.Resolve<IMapManager>().GetGrid(Owner.Transform.GridID);
|
||||
var coords = Owner.Transform.Coordinates;
|
||||
foreach (var cell in grid.GetCardinalNeighborCells(coords))
|
||||
{
|
||||
if (!entity.TryGetComponent<NodeContainerComponent>(out var container)) continue;
|
||||
|
||||
foreach (var node in container.Nodes.Values)
|
||||
foreach (var entity in grid.GetLocal(Owner.EntityManager.GetEntity(cell).Transform.Coordinates))
|
||||
{
|
||||
if (node != null && node != this)
|
||||
{
|
||||
yield return node;
|
||||
}
|
||||
}
|
||||
if (!Owner.EntityManager.GetEntity(entity).TryGetComponent<NodeContainerComponent>(out var container))
|
||||
continue;
|
||||
|
||||
foreach (var node in container.Nodes.Values)
|
||||
{
|
||||
if (node != null && node != this)
|
||||
{
|
||||
yield return node;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@ using Content.Server.Interfaces;
|
||||
using Content.Shared.GameObjects.Components.Atmos;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.ViewVariables;
|
||||
@@ -169,14 +171,14 @@ namespace Content.Server.GameObjects.Components.NodeContainer.Nodes
|
||||
/// </summary>
|
||||
private IEnumerable<PipeNode> PipesInDirection(PipeDirection pipeDir)
|
||||
{
|
||||
if (!Owner.TryGetComponent(out SnapGridComponent? grid))
|
||||
if (!Owner.Transform.Anchored)
|
||||
yield break;
|
||||
|
||||
var entities = grid.GetInDir(pipeDir.ToDirection());
|
||||
|
||||
foreach (var entity in entities)
|
||||
var grid = IoCManager.Resolve<IMapManager>().GetGrid(Owner.Transform.GridID);
|
||||
var position = Owner.Transform.Coordinates;
|
||||
foreach (var entity in grid.GetInDir(position, pipeDir.ToDirection()))
|
||||
{
|
||||
if (!entity.TryGetComponent<NodeContainerComponent>(out var container))
|
||||
if (!Owner.EntityManager.ComponentManager.TryGetComponent<NodeContainerComponent>(entity, out var container))
|
||||
continue;
|
||||
|
||||
foreach (var node in container.Nodes.Values)
|
||||
|
||||
@@ -13,8 +13,10 @@ using Content.Shared.GameObjects.EntitySystems.ActionBlocker;
|
||||
using Content.Shared.Interfaces.GameObjects.Components;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization;
|
||||
@@ -36,6 +38,8 @@ namespace Content.Server.GameObjects.Components.PA
|
||||
[RegisterComponent]
|
||||
public class ParticleAcceleratorControlBoxComponent : ParticleAcceleratorPartComponent, IActivate, IWires
|
||||
{
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
|
||||
public override string Name => "ParticleAcceleratorControlBox";
|
||||
|
||||
[ViewVariables]
|
||||
@@ -378,11 +382,13 @@ namespace Content.Server.GameObjects.Components.PA
|
||||
_partEmitterRight = null;
|
||||
|
||||
// Find fuel chamber first by scanning cardinals.
|
||||
if (SnapGrid != null)
|
||||
if (Owner.Transform.Anchored)
|
||||
{
|
||||
foreach (var maybeFuel in SnapGrid.GetCardinalNeighborCells())
|
||||
var grid = _mapManager.GetGrid(Owner.Transform.GridID);
|
||||
var coords = Owner.Transform.Coordinates;
|
||||
foreach (var maybeFuel in grid.GetCardinalNeighborCells(coords))
|
||||
{
|
||||
if (maybeFuel.Owner.TryGetComponent(out _partFuelChamber))
|
||||
if (Owner.EntityManager.ComponentManager.TryGetComponent(maybeFuel, out _partFuelChamber))
|
||||
{
|
||||
break;
|
||||
}
|
||||
@@ -452,9 +458,11 @@ namespace Content.Server.GameObjects.Components.PA
|
||||
private bool ScanPart<T>(Vector2i offset, [NotNullWhen(true)] out T? part)
|
||||
where T : ParticleAcceleratorPartComponent
|
||||
{
|
||||
foreach (var ent in SnapGrid!.GetOffset(offset))
|
||||
var grid = _mapManager.GetGrid(Owner.Transform.GridID);
|
||||
var coords = Owner.Transform.Coordinates;
|
||||
foreach (var ent in grid.GetOffset(coords, offset))
|
||||
{
|
||||
if (ent.TryGetComponent(out part) && !part.Deleted)
|
||||
if (Owner.EntityManager.ComponentManager.TryGetComponent(ent, out part) && !part.Deleted)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#nullable enable
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.PA
|
||||
@@ -8,14 +7,13 @@ namespace Content.Server.GameObjects.Components.PA
|
||||
public abstract class ParticleAcceleratorPartComponent : Component
|
||||
{
|
||||
[ViewVariables] public ParticleAcceleratorControlBoxComponent? Master;
|
||||
[ViewVariables] protected SnapGridComponent? SnapGrid;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
// FIXME: this has to be an entity system, full stop.
|
||||
|
||||
Owner.EnsureComponent<SnapGridComponent>(out SnapGrid);
|
||||
Owner.Transform.Anchored = true;
|
||||
}
|
||||
|
||||
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
||||
|
||||
@@ -40,8 +40,8 @@ namespace Content.Server.GameObjects.Components.Power.AME
|
||||
if (!_mapManager.TryGetGrid(args.ClickLocation.GetGridId(_serverEntityManager), out var mapGrid))
|
||||
return false; // No AME in space.
|
||||
|
||||
var snapPos = mapGrid.SnapGridCellFor(args.ClickLocation, SnapGridOffset.Center);
|
||||
if (mapGrid.GetSnapGridCell(snapPos, SnapGridOffset.Center).Any(sc => sc.Owner.HasComponent<AMEShieldComponent>()))
|
||||
var snapPos = mapGrid.TileIndicesFor(args.ClickLocation);
|
||||
if (mapGrid.GetAnchoredEntities(snapPos).Any(sc => _serverEntityManager.ComponentManager.HasComponent<AMEShieldComponent>(sc)))
|
||||
{
|
||||
Owner.PopupMessage(args.User, Loc.GetString("Shielding is already there!"));
|
||||
return true;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#nullable enable
|
||||
using System.Collections.Generic;
|
||||
using Content.Server.GameObjects.Components.Stack;
|
||||
using Content.Shared.Interfaces.GameObjects.Components;
|
||||
using Content.Shared.Utility;
|
||||
@@ -38,13 +39,12 @@ namespace Content.Server.GameObjects.Components.Power
|
||||
return true;
|
||||
if(!_mapManager.TryGetGrid(eventArgs.ClickLocation.GetGridId(Owner.EntityManager), out var grid))
|
||||
return true;
|
||||
var snapPos = grid.SnapGridCellFor(eventArgs.ClickLocation, SnapGridOffset.Center);
|
||||
var snapCell = grid.GetSnapGridCell(snapPos, SnapGridOffset.Center);
|
||||
var snapPos = grid.TileIndicesFor(eventArgs.ClickLocation);
|
||||
if(grid.GetTileRef(snapPos).Tile.IsEmpty)
|
||||
return true;
|
||||
foreach (var snapComp in snapCell)
|
||||
foreach (var anchored in grid.GetAnchoredEntities(snapPos))
|
||||
{
|
||||
if (snapComp.Owner.TryGetComponent<WireComponent>(out var wire) && wire.WireType == _blockingWireType)
|
||||
if (Owner.EntityManager.ComponentManager.TryGetComponent<WireComponent>(anchored, out var wire) && wire.WireType == _blockingWireType)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,8 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
}
|
||||
|
||||
// Required for airtight components.
|
||||
EntityManager.EventBus.SubscribeEvent<RotateEvent>(EventSource.Local, this, RotateEvent);
|
||||
SubscribeLocalEvent<RotateEvent>(RotateEvent);
|
||||
SubscribeLocalEvent<AirtightComponent, SnapGridPositionChangedEvent>(HandleSnapGridMove);
|
||||
|
||||
_cfg.OnValueChanged(CCVars.SpaceWind, OnSpaceWindChanged, true);
|
||||
_cfg.OnValueChanged(CCVars.MonstermosEqualization, OnMonstermosEqualizationChanged, true);
|
||||
@@ -72,6 +73,11 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
_cfg.OnValueChanged(CCVars.ExcitedGroupsSpaceIsAllConsuming, OnExcitedGroupsSpaceIsAllConsumingChanged, true);
|
||||
}
|
||||
|
||||
private static void HandleSnapGridMove(EntityUid uid, AirtightComponent component, SnapGridPositionChangedEvent args)
|
||||
{
|
||||
component.OnTransformMove();
|
||||
}
|
||||
|
||||
public bool SpaceWind { get; private set; }
|
||||
public bool MonstermosEqualization { get; private set; }
|
||||
public bool Superconduction { get; private set; }
|
||||
@@ -115,7 +121,8 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
|
||||
_mapManager.MapCreated -= OnMapCreated;
|
||||
|
||||
EntityManager.EventBus.UnsubscribeEvent<RotateEvent>(EventSource.Local, this);
|
||||
UnsubscribeLocalEvent<RotateEvent>();
|
||||
UnsubscribeLocalEvent<AirtightComponent, SnapGridPositionChangedEvent>(HandleSnapGridMove);
|
||||
}
|
||||
|
||||
private void RotateEvent(RotateEvent ev)
|
||||
|
||||
@@ -3,34 +3,41 @@ using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Maths;
|
||||
|
||||
namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
[UsedImplicitly]
|
||||
internal sealed class PuddleSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
var mapManager = IoCManager.Resolve<IMapManager>();
|
||||
mapManager.TileChanged += HandleTileChanged;
|
||||
_mapManager.TileChanged += HandleTileChanged;
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
var mapManager = IoCManager.Resolve<IMapManager>();
|
||||
mapManager.TileChanged -= HandleTileChanged;
|
||||
_mapManager.TileChanged -= HandleTileChanged;
|
||||
}
|
||||
|
||||
//TODO: Replace all this with an Unanchored event that deletes the puddle
|
||||
private void HandleTileChanged(object? sender, TileChangedEventArgs eventArgs)
|
||||
{
|
||||
// If this gets hammered you could probably queue up all the tile changes every tick but I doubt that would ever happen.
|
||||
foreach (var (puddle, snapGrid) in ComponentManager.EntityQuery<PuddleComponent, SnapGridComponent>(true))
|
||||
foreach (var puddle in ComponentManager.EntityQuery<PuddleComponent>(true))
|
||||
{
|
||||
// If the tile becomes space then delete it (potentially change by design)
|
||||
var puddleTransform = puddle.Owner.Transform;
|
||||
if(!puddleTransform.Anchored)
|
||||
continue;
|
||||
|
||||
var grid = _mapManager.GetGrid(puddleTransform.GridID);
|
||||
if (eventArgs.NewTile.GridIndex == puddle.Owner.Transform.GridID &&
|
||||
snapGrid.Position == eventArgs.NewTile.GridIndices &&
|
||||
grid.TileIndicesFor(puddleTransform.Coordinates) == eventArgs.NewTile.GridIndices &&
|
||||
eventArgs.NewTile.Tile.IsEmpty)
|
||||
{
|
||||
puddle.Owner.Delete();
|
||||
|
||||
@@ -4,7 +4,6 @@ using Content.Server.GameObjects.Components.Stack;
|
||||
using Content.Server.GameObjects.EntitySystems.DoAfter;
|
||||
using Content.Server.Utility;
|
||||
using Content.Shared.Interfaces.GameObjects.Components;
|
||||
using Content.Shared.Maps;
|
||||
using Content.Shared.Utility;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
@@ -70,12 +69,10 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
if (component.RemoveOnInteract && component.Owner.TryGetComponent(out stack) && !stack.Use(1))
|
||||
return;
|
||||
|
||||
EntityManager.SpawnEntity(component.Prototype, args.ClickLocation.SnapToGrid(grid, SnapGridOffset.Center));
|
||||
EntityManager.SpawnEntity(component.Prototype, args.ClickLocation.SnapToGrid(grid));
|
||||
|
||||
if (component.RemoveOnInteract && stack == null && !component.Owner.Deleted)
|
||||
component.Owner.Delete();
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,11 +74,7 @@ namespace Content.Server.GameTicking.GamePresets
|
||||
{
|
||||
continue;
|
||||
}
|
||||
var profile = ReadyProfiles[player.UserId];
|
||||
if (profile.AntagPreferences.Contains(_prototypeManager.Index<AntagPrototype>(TraitorID).Name))
|
||||
{
|
||||
prefList.Add(player);
|
||||
}
|
||||
prefList.Add(player);
|
||||
|
||||
player.AttachedEntity?.EnsureComponent<SuspicionRoleComponent>();
|
||||
}
|
||||
|
||||
@@ -156,9 +156,9 @@ namespace Content.Server.Physics.Controllers
|
||||
// If the coordinates have a FootstepModifier component
|
||||
// i.e. component that emit sound on footsteps emit that sound
|
||||
string? soundCollectionName = null;
|
||||
foreach (var maybeFootstep in grid.GetSnapGridCell(tile.GridIndices, SnapGridOffset.Center))
|
||||
foreach (var maybeFootstep in grid.GetAnchoredEntities(tile.GridIndices))
|
||||
{
|
||||
if (maybeFootstep.Owner.TryGetComponent(out FootstepModifierComponent? footstep))
|
||||
if (EntityManager.ComponentManager.TryGetComponent(maybeFootstep, out FootstepModifierComponent? footstep))
|
||||
{
|
||||
soundCollectionName = footstep._soundCollectionName;
|
||||
break;
|
||||
|
||||
@@ -7,13 +7,12 @@ namespace Content.Server.Utility
|
||||
{
|
||||
public static class SnapgridHelper
|
||||
{
|
||||
public static void SnapToGrid(this IEntity entity, SnapGridOffset offset = SnapGridOffset.Center, IEntityManager? entityManager = null, IMapManager? mapManager = null)
|
||||
public static void SnapToGrid(this IEntity entity, IEntityManager? entityManager = null, IMapManager? mapManager = null)
|
||||
{
|
||||
entity.Transform.Coordinates = entity.Transform.Coordinates.SnapToGrid(offset, entityManager, mapManager);
|
||||
entity.Transform.Coordinates = entity.Transform.Coordinates.SnapToGrid(entityManager, mapManager);
|
||||
}
|
||||
|
||||
public static EntityCoordinates SnapToGrid(this EntityCoordinates coordinates,
|
||||
SnapGridOffset offset = SnapGridOffset.Center, IEntityManager? entityManager = null, IMapManager? mapManager = null)
|
||||
public static EntityCoordinates SnapToGrid(this EntityCoordinates coordinates, IEntityManager? entityManager = null, IMapManager? mapManager = null)
|
||||
{
|
||||
entityManager ??= IoCManager.Resolve<IEntityManager>();
|
||||
mapManager ??= IoCManager.Resolve<IMapManager>();
|
||||
@@ -30,21 +29,20 @@ namespace Content.Server.Utility
|
||||
|
||||
var localPos = coordinates.Position;
|
||||
|
||||
var x = (int)Math.Floor(localPos.X / tileSize) + tileSize / (offset == SnapGridOffset.Center ? 2f : 0f);
|
||||
var y = (int)Math.Floor(localPos.Y / tileSize) + tileSize / (offset == SnapGridOffset.Center ? 2f : 0f);
|
||||
var x = (int)Math.Floor(localPos.X / tileSize) + tileSize / 2f;
|
||||
var y = (int)Math.Floor(localPos.Y / tileSize) + tileSize / 2f;
|
||||
|
||||
return new EntityCoordinates(coordinates.EntityId, x, y);
|
||||
}
|
||||
|
||||
public static EntityCoordinates SnapToGrid(this EntityCoordinates coordinates, IMapGrid grid,
|
||||
SnapGridOffset offset = SnapGridOffset.Center)
|
||||
public static EntityCoordinates SnapToGrid(this EntityCoordinates coordinates, IMapGrid grid)
|
||||
{
|
||||
var tileSize = grid.TileSize;
|
||||
|
||||
var localPos = coordinates.Position;
|
||||
|
||||
var x = (int)Math.Floor(localPos.X / tileSize) + tileSize / (offset == SnapGridOffset.Center ? 2f : 0f);
|
||||
var y = (int)Math.Floor(localPos.Y / tileSize) + tileSize / (offset == SnapGridOffset.Center ? 2f : 0f);
|
||||
var x = (int)Math.Floor(localPos.X / tileSize) + tileSize / 2f;
|
||||
var y = (int)Math.Floor(localPos.Y / tileSize) + tileSize / 2f;
|
||||
|
||||
return new EntityCoordinates(coordinates.EntityId, x, y);
|
||||
}
|
||||
|
||||
@@ -70,6 +70,12 @@ namespace Content.Shared.GameObjects.Components.Chemistry
|
||||
public bool CanRefill => Capabilities.HasCap(SolutionContainerCaps.Refillable);
|
||||
public bool CanDrain => Capabilities.HasCap(SolutionContainerCaps.Drainable);
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
UpdateAppearance();
|
||||
}
|
||||
|
||||
public void RemoveAllSolution()
|
||||
{
|
||||
if (CurrentVolume == 0)
|
||||
|
||||
@@ -36,12 +36,11 @@ namespace Content.Shared.GameObjects.EntitySystems
|
||||
|
||||
private void UpdateAll()
|
||||
{
|
||||
foreach (var comp in EntityManager.ComponentManager.EntityQuery<SubFloorHideComponent>(true))
|
||||
foreach (var comp in ComponentManager.EntityQuery<SubFloorHideComponent>(true))
|
||||
{
|
||||
if (!_mapManager.TryGetGrid(comp.Owner.Transform.GridID, out var grid)) return;
|
||||
|
||||
var snapPos = comp.Owner.GetComponent<SnapGridComponent>();
|
||||
UpdateTile(grid, snapPos.Position);
|
||||
var transform = comp.Owner.Transform;
|
||||
if (!_mapManager.TryGetGrid(transform.GridID, out var grid)) return;
|
||||
UpdateTile(grid, grid.TileIndicesFor(transform.Coordinates));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,22 +118,21 @@ namespace Content.Shared.GameObjects.EntitySystems
|
||||
{
|
||||
var tile = grid.GetTileRef(position);
|
||||
var tileDef = (ContentTileDefinition) _tileDefinitionManager[tile.Tile.TypeId];
|
||||
foreach (var snapGridComponent in grid.GetSnapGridCell(position, SnapGridOffset.Center))
|
||||
foreach (var anchored in grid.GetAnchoredEntities(position))
|
||||
{
|
||||
var entity = snapGridComponent.Owner;
|
||||
if (!entity.TryGetComponent(out SubFloorHideComponent? subFloorComponent))
|
||||
if (!ComponentManager.TryGetComponent(anchored, out SubFloorHideComponent? subFloorComponent))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Show sprite
|
||||
if (entity.TryGetComponent(out SharedSpriteComponent? spriteComponent))
|
||||
if (ComponentManager.TryGetComponent(anchored, out SharedSpriteComponent ? spriteComponent))
|
||||
{
|
||||
spriteComponent.Visible = ShowAll || !subFloorComponent.Running || tileDef.IsSubFloor;
|
||||
}
|
||||
|
||||
// So for collision all we care about is that the component is running.
|
||||
if (entity.TryGetComponent(out PhysicsComponent? physicsComponent))
|
||||
if (ComponentManager.TryGetComponent(anchored, out PhysicsComponent ? physicsComponent))
|
||||
{
|
||||
physicsComponent.CanCollide = !subFloorComponent.Running;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
/// <summary>
|
||||
/// Called when this component is activated by another entity who is in range.
|
||||
/// </summary>
|
||||
[Obsolete("Use ActivateInWorldMessage instead")]
|
||||
void Activate(ActivateEventArgs eventArgs);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
/// <summary>
|
||||
/// Called when we interact with nothing, or when we interact with an entity out of range that has no behavior
|
||||
/// </summary>
|
||||
[Obsolete("Use AfterInteractMessage instead")]
|
||||
Task<bool> AfterInteract(AfterInteractEventArgs eventArgs);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,10 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
public interface IAttack
|
||||
{
|
||||
// Redirects to ClickAttack by default.
|
||||
[Obsolete("WideAttack")]
|
||||
bool WideAttack(AttackEventArgs eventArgs) => ClickAttack(eventArgs);
|
||||
|
||||
[Obsolete("Use ClickAttack instead")]
|
||||
bool ClickAttack(AttackEventArgs eventArgs);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
[RequiresExplicitImplementation]
|
||||
public interface IDropped
|
||||
{
|
||||
[Obsolete("Use DroppedMessage instead")]
|
||||
void Dropped(DroppedEventArgs eventArgs);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
[RequiresExplicitImplementation]
|
||||
public interface IEquipped
|
||||
{
|
||||
[Obsolete("Use EquippedMessage instead")]
|
||||
void Equipped(EquippedEventArgs eventArgs);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using Content.Shared.GameObjects.Components.Items;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Analyzers;
|
||||
@@ -15,6 +16,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
[RequiresExplicitImplementation]
|
||||
public interface IEquippedHand
|
||||
{
|
||||
[Obsolete("Use EquippedHandMessage instead")]
|
||||
void EquippedHand(EquippedHandEventArgs eventArgs);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
[RequiresExplicitImplementation]
|
||||
public interface IHandDeselected
|
||||
{
|
||||
[Obsolete("Use HandDeselectedMessage instead")]
|
||||
void HandDeselected(HandDeselectedEventArgs eventArgs);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
[RequiresExplicitImplementation]
|
||||
public interface IHandSelected
|
||||
{
|
||||
[Obsolete("Use HandSelectedMessage instead")]
|
||||
void HandSelected(HandSelectedEventArgs eventArgs);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
/// <summary>
|
||||
/// Called when a player directly interacts with an empty hand when user is in range of the target entity.
|
||||
/// </summary>
|
||||
[Obsolete("Use AttackHandMessage instead")]
|
||||
bool InteractHand(InteractHandEventArgs eventArgs);
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
/// <summary>
|
||||
/// Called when using one object on another when user is in range of the target entity.
|
||||
/// </summary>
|
||||
[Obsolete("Use InteractUsingMessage instead")]
|
||||
Task<bool> InteractUsing(InteractUsingEventArgs eventArgs);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
/// <summary>
|
||||
/// Called when we try to interact with an entity out of range
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Obsolete("Use RangedInteractMessage instead")]
|
||||
bool RangedInteract(RangedInteractEventArgs eventArgs);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
[RequiresExplicitImplementation]
|
||||
public interface IThrown
|
||||
{
|
||||
[Obsolete("Use ThrownMessage instead")]
|
||||
void Thrown(ThrownEventArgs eventArgs);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using Content.Shared.GameObjects.Components.Inventory;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Analyzers;
|
||||
@@ -17,6 +18,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
[RequiresExplicitImplementation]
|
||||
public interface IUnequipped
|
||||
{
|
||||
[Obsolete("Use UnequippedMessage instead")]
|
||||
void Unequipped(UnequippedEventArgs eventArgs);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using Content.Shared.GameObjects.Components.Items;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Analyzers;
|
||||
@@ -14,6 +15,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
[RequiresExplicitImplementation]
|
||||
public interface IUnequippedHand
|
||||
{
|
||||
[Obsolete("Use UnequippedHandMessage instead")]
|
||||
void UnequippedHand(UnequippedHandEventArgs eventArgs);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
/// Called when we activate an object we are holding to use it
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Obsolete("Use UseInHandMessage instead")]
|
||||
bool UseEntity(UseEntityEventArgs eventArgs);
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
@@ -947,3 +947,13 @@ Entries:
|
||||
- {message: Fix footstep sounds exception, type: Fix}
|
||||
id: 169
|
||||
time: '2021-04-21T10:14:40.0000000+00:00'
|
||||
- author: TaralGit
|
||||
changes:
|
||||
- {message: (Re)Added the machete and the baseball bat (melee weapons)., type: Add}
|
||||
- {message: Added inhands for the beaker and large beaker., type: Add}
|
||||
- {message: minor changes to the laser gun sprite and mag-unshaded files., type: Fix}
|
||||
- {message: 'reworked the inhands for the homemade pistol, clarissa, giskard and
|
||||
mk58 (both variants),', type: Fix}
|
||||
- {message: nerfed melee weapons, type: Fix}
|
||||
id: 170
|
||||
time: '2021-04-28T21:14:28.0000000+00:00'
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
ButchCleaver: 1
|
||||
KitchenKnife: 5
|
||||
DrinkGlass: 10
|
||||
DrinkPitcher: 1
|
||||
DrinkMug: 5
|
||||
DrinkMugBlack: 2
|
||||
DrinkMugBlue: 2
|
||||
@@ -18,4 +17,3 @@
|
||||
DrinkMugOne: 1
|
||||
DrinkMugRainbow: 2
|
||||
DrinkMugRed: 2
|
||||
|
||||
|
||||
@@ -104,7 +104,6 @@
|
||||
- type: Anchorable
|
||||
- type: Pullable
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Damageable
|
||||
resistances: metallicResistances
|
||||
- type: Destructible
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
sprite: Constructible/Tiles/catwalk.rsi
|
||||
state: catwalk_preview
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: IconSmooth
|
||||
key: catwalk
|
||||
base: catwalk_
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
- type: InteractionOutline
|
||||
- type: Physics
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Sprite
|
||||
netsync: false
|
||||
sprite: Constructible/Atmos/gascanisterport.rsi
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
components:
|
||||
- type: InteractionOutline
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Sprite
|
||||
- type: Damageable
|
||||
resistances: metallicResistances
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
- type: InteractionOutline
|
||||
- type: Physics
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Damageable
|
||||
resistances: metallicResistances
|
||||
- type: Destructible
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
- MobImpassable
|
||||
- VaultImpassable
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: GasGenerator
|
||||
- type: PipeNetDevice
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
- type: InteractionOutline
|
||||
- type: Physics
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Damageable
|
||||
- type: Destructible
|
||||
thresholds:
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
- type: InteractionOutline
|
||||
- type: Physics
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Damageable
|
||||
- type: Destructible
|
||||
thresholds:
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
- type: InteractionOutline
|
||||
- type: Physics
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Damageable
|
||||
resistances: metallicResistances
|
||||
- type: Destructible
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
- type: InteractionOutline
|
||||
- type: Physics
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Damageable
|
||||
resistances: metallicResistances
|
||||
- type: Destructible
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
- type: InteractionOutline
|
||||
- type: Physics
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Damageable
|
||||
resistances: metallicResistances
|
||||
- type: Destructible
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
- !type:DoActsBehavior
|
||||
acts: ["Destruction"]
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Anchorable
|
||||
- type: Pullable
|
||||
- type: AMEController
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
- !type:DoActsBehavior
|
||||
acts: ["Destruction"]
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: IconSmooth
|
||||
mode: CardinalFlags
|
||||
base: shield_
|
||||
|
||||
@@ -19,6 +19,5 @@
|
||||
- MobImpassable
|
||||
- VaultImpassable
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Pullable
|
||||
- type: Clickable
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
- MobImpassable
|
||||
- VaultImpassable
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Sprite
|
||||
sprite: Constructible/Power/Singularity/collector.rsi
|
||||
layers:
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
- MobImpassable
|
||||
- VaultImpassable
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Sprite
|
||||
sprite: Constructible/Power/Singularity/containment.rsi
|
||||
state: icon
|
||||
@@ -66,7 +65,6 @@
|
||||
- MobImpassable
|
||||
- VaultImpassable
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Sprite
|
||||
sprite: Constructible/Power/Singularity/containment_field.rsi
|
||||
state: field
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
- MobImpassable
|
||||
- VaultImpassable
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Sprite
|
||||
sprite: Constructible/Power/Singularity/emitter.rsi
|
||||
layers:
|
||||
|
||||
@@ -23,6 +23,5 @@
|
||||
mask:
|
||||
- MobImpassable
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Anchorable
|
||||
- type: Pullable
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
- VaultImpassable
|
||||
- SmallImpassable
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Sprite
|
||||
sprite: Constructible/Power/power.rsi
|
||||
state: generator
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
- type: SolarPanel
|
||||
supply: 1500
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Damageable
|
||||
resistances: metallicResistances
|
||||
- type: Destructible
|
||||
@@ -78,7 +77,6 @@
|
||||
sprite: Constructible/Power/solar_panel.rsi
|
||||
state: solar_assembly
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Damageable
|
||||
resistances: metallicResistances
|
||||
- type: Destructible
|
||||
@@ -123,7 +121,6 @@
|
||||
sprite: Constructible/Power/solar_panel.rsi
|
||||
state: solar_tracker
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Damageable
|
||||
resistances: metallicResistances
|
||||
- type: Destructible
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
bounds: "-0.5, -0.5, 0.5, 0.5"
|
||||
layer: [MobMask, Opaque]
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Sprite
|
||||
sprite: Constructible/Power/power.rsi
|
||||
state: wiredmachine
|
||||
@@ -58,7 +57,6 @@
|
||||
bounds: "-0.5, -0.5, 0.5, 0.5"
|
||||
layer: [MobMask, Opaque]
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Sprite
|
||||
sprite: Constructible/Power/power.rsi
|
||||
state: provider
|
||||
@@ -88,7 +86,6 @@
|
||||
bounds: "-0.5, -0.5, 0.5, 0.5"
|
||||
layer: [MobMask, Opaque]
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Sprite
|
||||
sprite: Constructible/Power/power.rsi
|
||||
state: provider
|
||||
@@ -133,7 +130,6 @@
|
||||
bounds: "-0.5, -0.5, 0.5, 0.5"
|
||||
layer: [MobMask, Opaque]
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Sprite
|
||||
sprite: Constructible/Power/power.rsi
|
||||
state: wirelessmachine
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
- Opaque
|
||||
- MobImpassable
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Lathe
|
||||
- type: MaterialStorage
|
||||
- type: Anchorable
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
- VaultImpassable
|
||||
- SmallImpassable
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Sprite
|
||||
netsync: false
|
||||
sprite: Constructible/Power/smes.rsi
|
||||
@@ -85,7 +84,6 @@
|
||||
- VaultImpassable
|
||||
- SmallImpassable
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Sprite
|
||||
sprite: Constructible/Power/substation.rsi
|
||||
layers:
|
||||
@@ -139,7 +137,6 @@
|
||||
bounds: "-0.25, -0.25, 0.25, 0.3"
|
||||
layer: [ Passable ]
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Sprite
|
||||
drawdepth: WallMountedItems
|
||||
netsync: false
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
- MobImpassable
|
||||
- VaultImpassable
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Anchorable
|
||||
- type: SeedExtractor
|
||||
- type: PowerReceiver
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
- Underplating
|
||||
- type: InteractionOutline
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Sprite
|
||||
drawdepth: BelowFloor
|
||||
- type: IconSmooth
|
||||
@@ -166,7 +165,6 @@
|
||||
mode: SnapgridCenter
|
||||
components:
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Sprite
|
||||
drawdepth: BelowFloor
|
||||
- type: IconSmooth
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
- VaultImpassable
|
||||
- SmallImpassable
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Sprite
|
||||
netsync: false
|
||||
sprite: Constructible/Power/conveyor.rsi
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
mode: SnapgridCenter
|
||||
components:
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Microwave
|
||||
- type: Clickable
|
||||
- type: InteractionOutline
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
mode: SnapgridCenter
|
||||
components:
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: ReagentGrinder
|
||||
- type: UserInterface
|
||||
interfaces:
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
- MobImpassable
|
||||
- VaultImpassable
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: ReagentDispenser
|
||||
- type: PowerReceiver
|
||||
- type: UserInterface
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
- MobImpassable
|
||||
- VaultImpassable
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: CloningPod
|
||||
- type: Damageable
|
||||
resistances: metallicResistances
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
- Impassable
|
||||
- VaultImpassable
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Anchorable
|
||||
- type: Pullable
|
||||
- type: MedicalScanner
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
light_mob: morgue_nosoul_light
|
||||
light_soul: morgue_soul_light
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
|
||||
- type: entity
|
||||
id: MorgueTray
|
||||
@@ -115,7 +114,6 @@
|
||||
light_contents: crema_contents_light
|
||||
light_burning: crema_active_light
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
|
||||
- type: entity
|
||||
id: CrematoriumTray
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
- type: Physics
|
||||
bodyType: Static
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Anchorable
|
||||
- type: Damageable
|
||||
resistances: metallicResistances
|
||||
@@ -399,7 +398,6 @@
|
||||
- VaultImpassable
|
||||
- SmallImpassable
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Anchorable
|
||||
- type: Damageable
|
||||
resistances: metallicResistances
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
shader: unshaded
|
||||
map: ["enum.GravityGeneratorVisualLayers.Core"]
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: PowerReceiver
|
||||
powerLoad: 500
|
||||
- type: Physics
|
||||
|
||||
@@ -44,7 +44,6 @@
|
||||
maxVol: 200
|
||||
caps: Refillable
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Reactive
|
||||
reactions:
|
||||
- !type:AddToSolutionReaction
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
- MobImpassable
|
||||
- VaultImpassable
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Sprite
|
||||
netsync: false
|
||||
sprite: Constructible/Power/recycling.rsi
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
mode: SnapgridCenter
|
||||
components:
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Clickable
|
||||
- type: Physics
|
||||
bodyType: Static
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
- type: SmokeVisualizer
|
||||
- type: Occluder
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: SmokeSolutionAreaEffect
|
||||
- type: SolutionContainer
|
||||
maxVol: 600
|
||||
@@ -38,7 +37,6 @@
|
||||
animationTime: 0.6
|
||||
animationState: foam-dissolve
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Physics
|
||||
fixtures:
|
||||
- shape:
|
||||
@@ -118,7 +116,6 @@
|
||||
sizeX: 32
|
||||
sizeY: 32
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Airtight
|
||||
- type: Damageable
|
||||
resistances: metallicResistances
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
abstract: true
|
||||
components:
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Sprite
|
||||
drawdepth: FloorObjects
|
||||
- type: SolutionContainer
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
- type: Drink
|
||||
- type: Sprite
|
||||
state: icon
|
||||
|
||||
- type: Spillable
|
||||
|
||||
- type: entity
|
||||
@@ -45,7 +44,6 @@
|
||||
- type: DamageOtherOnHit
|
||||
amount: 5
|
||||
|
||||
|
||||
# Transformable container - normal glass
|
||||
- type: entity
|
||||
name: Drinking glass
|
||||
@@ -76,7 +74,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Drinks/aleglass.rsi
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: DrinkGlassBase
|
||||
id: DrinkAntifreeze
|
||||
@@ -93,7 +90,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Drinks/antifreeze.rsi
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: DrinkGlassBase
|
||||
id: DrinkAtomicbombglass
|
||||
@@ -110,7 +106,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Drinks/atomicbombglass.rsi
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: DrinkGlassBase
|
||||
id: DrinkB52Glass
|
||||
@@ -127,7 +122,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Drinks/b52glass.rsi
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: DrinkGlassBase
|
||||
id: DrinkBananahonkglass
|
||||
@@ -138,7 +132,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Drinks/bananahonkglass.rsi
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: DrinkGlassBase
|
||||
id: DrinkBeepskySmashGlass
|
||||
@@ -149,7 +142,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Drinks/beepskysmashglass.rsi
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: DrinkGlassBase
|
||||
id: DrinkBeer
|
||||
@@ -165,7 +157,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Drinks/beer.rsi
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: DrinkGlassBase
|
||||
id: DrinkBeerglass
|
||||
@@ -181,7 +172,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Drinks/beerglass.rsi
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: DrinkGlassBase
|
||||
id: DrinkBerryJuice
|
||||
@@ -198,7 +188,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Drinks/berryjuice.rsi
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: DrinkGlassBase
|
||||
id: DrinkBlackRussianGlass
|
||||
@@ -209,7 +198,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Drinks/blackrussianglass.rsi
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: DrinkGlassBase
|
||||
id: DrinkBloodyMaryGlass
|
||||
@@ -220,7 +208,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Drinks/bloodymaryglass.rsi
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: DrinkGlassBase
|
||||
id: DrinkBooger
|
||||
@@ -231,7 +218,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Drinks/booger.rsi
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: DrinkGlassBase
|
||||
id: DrinkBraveBullGlass
|
||||
@@ -242,7 +228,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Drinks/bravebullglass.rsi
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: DrinkGlassBase
|
||||
id: DrinkBrownStar
|
||||
@@ -253,7 +238,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Drinks/brownstar.rsi
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: DrinkGlassBase
|
||||
id: DrinkCarafe
|
||||
@@ -265,11 +249,6 @@
|
||||
sprite: Objects/Consumable/Drinks/carafe.rsi
|
||||
state: icon-10
|
||||
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: DrinkFoodVisualizer
|
||||
steps: 11
|
||||
|
||||
- type: entity
|
||||
parent: DrinkGlassBase
|
||||
id: DrinkCarrotJuice
|
||||
@@ -286,7 +265,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Drinks/carrotjuice.rsi
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: DrinkGlassBase
|
||||
id: DrinkChocolateGlass
|
||||
@@ -1730,11 +1708,6 @@
|
||||
sprite: Objects/Consumable/Drinks/water_cup.rsi
|
||||
state: icon-1
|
||||
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: DrinkFoodVisualizer
|
||||
steps: 2
|
||||
|
||||
- type: entity
|
||||
parent: DrinkGlassBase
|
||||
id: DrinkWhiskeyColaGlass
|
||||
@@ -1814,4 +1787,3 @@
|
||||
Quantity: 20
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Drinks/wineglass.rsi
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
isOpen: true
|
||||
- type: Sprite
|
||||
state: icon
|
||||
|
||||
- type: Spillable
|
||||
|
||||
- type: entity
|
||||
@@ -27,24 +26,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Drinks/golden_cup.rsi
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkPitcher
|
||||
name: insulated pitcher
|
||||
description: A stainless steel insulated pitcher. Everyone's best friend in the morning.
|
||||
components:
|
||||
- type: SolutionContainer
|
||||
maxVol: 15
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Drinks/pitcher.rsi
|
||||
state: icon-6
|
||||
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: DrinkFoodVisualizer
|
||||
steps: 7
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkMug
|
||||
@@ -57,11 +38,6 @@
|
||||
sprite: Objects/Consumable/Drinks/mug.rsi
|
||||
state: icon-3
|
||||
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: DrinkFoodVisualizer
|
||||
steps: 4
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkMugBlack
|
||||
@@ -74,11 +50,6 @@
|
||||
sprite: Objects/Consumable/Drinks/mug_black.rsi
|
||||
state: icon-3
|
||||
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: DrinkFoodVisualizer
|
||||
steps: 4
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkMugBlue
|
||||
@@ -91,11 +62,6 @@
|
||||
sprite: Objects/Consumable/Drinks/mug_blue.rsi
|
||||
state: icon-3
|
||||
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: DrinkFoodVisualizer
|
||||
steps: 4
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkMugGreen
|
||||
@@ -108,11 +74,6 @@
|
||||
sprite: Objects/Consumable/Drinks/mug_green.rsi
|
||||
state: icon-3
|
||||
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: DrinkFoodVisualizer
|
||||
steps: 4
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkMugHeart
|
||||
@@ -125,11 +86,6 @@
|
||||
sprite: Objects/Consumable/Drinks/mug_heart.rsi
|
||||
state: icon-3
|
||||
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: DrinkFoodVisualizer
|
||||
steps: 4
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkMugMetal
|
||||
@@ -142,11 +98,6 @@
|
||||
sprite: Objects/Consumable/Drinks/mug_metal.rsi
|
||||
state: icon-3
|
||||
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: DrinkFoodVisualizer
|
||||
steps: 4
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkMugMoebius
|
||||
@@ -159,11 +110,6 @@
|
||||
sprite: Objects/Consumable/Drinks/mug_moebius.rsi
|
||||
state: icon-3
|
||||
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: DrinkFoodVisualizer
|
||||
steps: 4
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkMugOne
|
||||
@@ -176,11 +122,6 @@
|
||||
sprite: Objects/Consumable/Drinks/mug_one.rsi
|
||||
state: icon-3
|
||||
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: DrinkFoodVisualizer
|
||||
steps: 4
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkMugRainbow
|
||||
@@ -193,11 +134,6 @@
|
||||
sprite: Objects/Consumable/Drinks/mug_rainbow.rsi
|
||||
state: icon-3
|
||||
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: DrinkFoodVisualizer
|
||||
steps: 4
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkMugRed
|
||||
@@ -210,11 +146,6 @@
|
||||
sprite: Objects/Consumable/Drinks/mug_red.rsi
|
||||
state: icon-3
|
||||
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: DrinkFoodVisualizer
|
||||
steps: 4
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkHotCoco
|
||||
@@ -225,7 +156,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Drinks/hot_coco.rsi
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkHotCoffee
|
||||
@@ -241,7 +171,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Drinks/hot_coffee.rsi
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkTeacup
|
||||
@@ -258,11 +187,6 @@
|
||||
sprite: Objects/Consumable/Drinks/teacup.rsi
|
||||
state: icon-1
|
||||
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: DrinkFoodVisualizer
|
||||
steps: 2
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkLean
|
||||
@@ -278,6 +202,5 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Drinks/lean.rsi
|
||||
state: icon
|
||||
|
||||
- type: Item
|
||||
sprite: Objects/Consumable/Drinks/lean.rsi
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
# For empty check out chemistry bottles
|
||||
|
||||
# With cut-out
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkVisualizerTestCut
|
||||
name: solution container vis cut-out
|
||||
description: A stainless steel insulated pitcher. Everyone's best friend in the morning.
|
||||
components:
|
||||
- type: SolutionContainer
|
||||
maxVol: 30
|
||||
contents:
|
||||
reagents:
|
||||
- ReagentId: WatermelonJuice
|
||||
Quantity: 30
|
||||
- type: Sprite
|
||||
netsync: false
|
||||
sprite: Objects/Consumable/Drinks/pitcher.rsi
|
||||
layers:
|
||||
- state: icon
|
||||
- state: fill-6
|
||||
map: ["enum.SolutionContainerLayers.Fill"]
|
||||
# REMEMBER IF YOU'RE SPAWNING WITH LIQUID ALREADY IN IT YOU WANT THIS TRUE
|
||||
visible: true
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: SolutionContainerVisualizer
|
||||
maxFillLevels: 6
|
||||
fillBaseName: fill-
|
||||
|
||||
# Without (For food, non cut-out stuff)
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkVisualizerTestNot
|
||||
name: solution container vis cut-not
|
||||
description: A stainless steel insulated pitcher. Everyone's best friend in the morning.
|
||||
components:
|
||||
- type: SolutionContainer
|
||||
maxVol: 30
|
||||
contents:
|
||||
reagents:
|
||||
- ReagentId: WatermelonJuice
|
||||
Quantity: 30
|
||||
- type: Sprite
|
||||
netsync: false
|
||||
sprite: Objects/Consumable/Drinks/pitcher.rsi
|
||||
layers:
|
||||
- state: icon-6
|
||||
map: ["enum.SolutionContainerLayers.Fill"]
|
||||
visible: true
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: SolutionContainerVisualizer
|
||||
maxFillLevels: 6
|
||||
fillBaseName: icon-
|
||||
changeColor: false
|
||||
emptySpriteName: icon
|
||||
@@ -264,7 +264,7 @@
|
||||
- type: entity
|
||||
parent: MaterialBase
|
||||
id: MaterialHideCorgi
|
||||
name: corgi hid
|
||||
name: corgi hide
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Materials/materials.rsi
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user