From 69dc9d3b7f19e934c05add80aab0f2d51d45fa8f Mon Sep 17 00:00:00 2001 From: GreaseMonk <1354802+GreaseMonk@users.noreply.github.com> Date: Tue, 9 Apr 2024 22:19:25 +0200 Subject: [PATCH] Fix rest of things --- .../Item/PseudoItem/PseudoItemSystem.cs | 3 +-- .../Kitchen/EntitySystems/DeepFryerSystem.cs | 8 ++++---- Content.Server/Nyanotrasen/Mail/MailSystem.cs | 5 +++-- Content.Server/Procedural/DungeonJob.Generator.cs | 1 + Content.Server/Shipyard/Systems/ShipyardSystem.cs | 14 +++++++------- .../StationEvents/Events/BluespaceCargoRule.cs | 2 +- .../StationEvents/Events/BluespaceErrorRule.cs | 3 ++- .../Events/BluespaceSyndicateCargoRule.cs | 2 +- 8 files changed, 20 insertions(+), 18 deletions(-) diff --git a/Content.Server/Nyanotrasen/Item/PseudoItem/PseudoItemSystem.cs b/Content.Server/Nyanotrasen/Item/PseudoItem/PseudoItemSystem.cs index 6f0a8b3d7b5..af7af93eab2 100644 --- a/Content.Server/Nyanotrasen/Item/PseudoItem/PseudoItemSystem.cs +++ b/Content.Server/Nyanotrasen/Item/PseudoItem/PseudoItemSystem.cs @@ -187,8 +187,7 @@ private void StartInsertDoAfter(EntityUid inserter, EntityUid toInsert, EntityUi var ev = new PseudoItemInsertDoAfterEvent(); var args = new DoAfterArgs(EntityManager, inserter, 5f, ev, toInsert, toInsert, storageEntity) { - BreakOnTargetMove = true, - BreakOnUserMove = true, + BreakOnMove = true, NeedHand = true }; diff --git a/Content.Server/Nyanotrasen/Kitchen/EntitySystems/DeepFryerSystem.cs b/Content.Server/Nyanotrasen/Kitchen/EntitySystems/DeepFryerSystem.cs index 7b5c1a5a0c5..cbd4f4b3292 100644 --- a/Content.Server/Nyanotrasen/Kitchen/EntitySystems/DeepFryerSystem.cs +++ b/Content.Server/Nyanotrasen/Kitchen/EntitySystems/DeepFryerSystem.cs @@ -245,7 +245,7 @@ private void BurnItem(EntityUid uid, DeepFryerComponent component, EntityUid ite MetaData(item).EntityPrototype?.ID != component.CharredPrototype) { var charred = Spawn(component.CharredPrototype, Transform(uid).Coordinates); - component.Storage.Insert(charred); + _containerSystem.Insert(charred, component.Storage); Del(item); } } @@ -456,7 +456,7 @@ private void OnThrowHitBy(EntityUid uid, DeepFryerComponent component, ThrowHitB if (!CanInsertItem(uid, component, args.Thrown) || _random.Prob(missChance) || - !component.Storage.Insert(args.Thrown)) + !_containerSystem.Insert(args.Thrown, component.Storage)) { _popupSystem.PopupEntity( Loc.GetString("deep-fryer-thrown-missed"), @@ -504,7 +504,7 @@ private void OnSolutionChange(EntityUid uid, DeepFryerComponent component, Solut private void OnRelayMovement(EntityUid uid, DeepFryerComponent component, ref ContainerRelayMovementEntityEvent args) { - if (!component.Storage.Remove(args.Entity, EntityManager, destination: Transform(uid).Coordinates)) + if (!_containerSystem.Remove(args.Entity, component.Storage, destination: Transform(uid).Coordinates)) return; _popupSystem.PopupEntity( @@ -527,7 +527,7 @@ private void OnRemoveItem(EntityUid uid, DeepFryerComponent component, DeepFryer if (removedItem.Valid) { //JJ Comment - This line should be unnecessary. Some issue is keeping the UI from updating when converting straight to a Burned Mess while the UI is still open. To replicate, put a Raw Meat in the fryer with no oil in it. Wait until it sputters with no effect. It should transform to Burned Mess, but doesn't. - if (!component.Storage.Remove(removedItem)) + if (!_containerSystem.Remove(removedItem, component.Storage)) return; var user = args.Session.AttachedEntity; diff --git a/Content.Server/Nyanotrasen/Mail/MailSystem.cs b/Content.Server/Nyanotrasen/Mail/MailSystem.cs index b5ddf28bc5c..578bfafe5ca 100644 --- a/Content.Server/Nyanotrasen/Mail/MailSystem.cs +++ b/Content.Server/Nyanotrasen/Mail/MailSystem.cs @@ -26,6 +26,7 @@ using Content.Server.Station.Components; using Content.Server.Station.Systems; using Content.Server.Spawners.EntitySystems; +using Content.Shared.Access; using Content.Shared.Access.Components; using Content.Shared.Access.Systems; using Content.Shared.Damage; @@ -749,11 +750,11 @@ public struct MailRecipient public string Name; public string Job; public string JobIcon; - public HashSet AccessTags; + public HashSet> AccessTags; public bool MayReceivePriorityMail; public string Ship; - public MailRecipient(string name, string job, string jobIcon, HashSet accessTags, bool mayReceivePriorityMail, string ship) + public MailRecipient(string name, string job, string jobIcon, HashSet> accessTags, bool mayReceivePriorityMail, string ship) { Name = name; Job = job; diff --git a/Content.Server/Procedural/DungeonJob.Generator.cs b/Content.Server/Procedural/DungeonJob.Generator.cs index a9ff4055400..434a3f2dc5d 100644 --- a/Content.Server/Procedural/DungeonJob.Generator.cs +++ b/Content.Server/Procedural/DungeonJob.Generator.cs @@ -21,6 +21,7 @@ private async Task GeneratePrefabDungeon(PrefabDunGen prefab, EntityUid var dungeonRotation = _dungeon.GetDungeonRotation(seed); var dungeonTransform = Matrix3.CreateTransform(_position, dungeonRotation); var roomPackProtos = new Dictionary>(); + var fallbackTile = new Tile(_tileDefManager[prefab.Tile].TileId); foreach (var pack in _prototype.EnumeratePrototypes()) { diff --git a/Content.Server/Shipyard/Systems/ShipyardSystem.cs b/Content.Server/Shipyard/Systems/ShipyardSystem.cs index e57341e7b80..7f49b81fb90 100644 --- a/Content.Server/Shipyard/Systems/ShipyardSystem.cs +++ b/Content.Server/Shipyard/Systems/ShipyardSystem.cs @@ -194,21 +194,21 @@ public bool TrySellShuttle(EntityUid stationUid, EntityUid shuttleUid, out int b { foreach (var gridDock in gridDocks) { - if (shuttleDock.Component.DockedWith == gridDock.Uid) + if (shuttleDock.Comp.DockedWith == gridDock.Owner) { isDocked = true; break; - }; - }; + } + } if (isDocked) break; - }; + } if (!isDocked) { _sawmill.Warning($"shuttle is not docked to that station"); return false; - }; + } var mobQuery = GetEntityQuery(); var xformQuery = GetEntityQuery(); @@ -217,7 +217,7 @@ public bool TrySellShuttle(EntityUid stationUid, EntityUid shuttleUid, out int b { _sawmill.Warning($"organics on board"); return false; - }; + } //just yeet and delete for now. Might want to split it into another function later to send back to the shipyard map first to pause for something //also superman 3 moment @@ -238,7 +238,7 @@ private void CleanupShipyard() { ShipyardMap = null; return; - }; + } _mapManager.DeleteMap(ShipyardMap.Value); } diff --git a/Content.Server/StationEvents/Events/BluespaceCargoRule.cs b/Content.Server/StationEvents/Events/BluespaceCargoRule.cs index 6781084674a..7a274434ffa 100644 --- a/Content.Server/StationEvents/Events/BluespaceCargoRule.cs +++ b/Content.Server/StationEvents/Events/BluespaceCargoRule.cs @@ -69,7 +69,7 @@ public void SpawnOnRandomGridLocation(EntityUid grid, string toSpawn, string toS var tile = new Vector2i(randomX, randomY); // no air-blocked areas. - if (_atmosphere.IsTileSpace(grid, xform.MapUid, tile, mapGridComp: gridComp) || + if (_atmosphere.IsTileSpace(grid, xform.MapUid, tile) || _atmosphere.IsTileAirBlocked(grid, tile, mapGridComp: gridComp)) { continue; diff --git a/Content.Server/StationEvents/Events/BluespaceErrorRule.cs b/Content.Server/StationEvents/Events/BluespaceErrorRule.cs index baaf5263b60..210eae741b5 100644 --- a/Content.Server/StationEvents/Events/BluespaceErrorRule.cs +++ b/Content.Server/StationEvents/Events/BluespaceErrorRule.cs @@ -10,6 +10,7 @@ using Content.Server.Shuttles.Components; using Content.Server.Shuttles.Systems; using Content.Server.StationEvents.Components; +using Content.Shared.Coordinates; using Content.Shared.Humanoid; using Content.Shared.Mobs.Components; using Robust.Shared.Player; @@ -53,7 +54,7 @@ protected override void Started(EntityUid uid, BluespaceErrorRuleComponent compo var location = Spawn(null, coords); if (TryComp(component.GridUid, out var shuttle)) { - _shuttle.FTLTravel(gridUid, shuttle, location, 5.5f, 55f); + _shuttle.FTLToCoordinates(gridUid, shuttle, location.ToCoordinates(), 5.5f, 55f); } } diff --git a/Content.Server/StationEvents/Events/BluespaceSyndicateCargoRule.cs b/Content.Server/StationEvents/Events/BluespaceSyndicateCargoRule.cs index 39ccf3ef922..9d2b0b1d189 100644 --- a/Content.Server/StationEvents/Events/BluespaceSyndicateCargoRule.cs +++ b/Content.Server/StationEvents/Events/BluespaceSyndicateCargoRule.cs @@ -66,7 +66,7 @@ public void SpawnOnRandomGridLocation(EntityUid grid, string toSpawn, string toS var tile = new Vector2i(randomX, randomY); // no air-blocked areas. - if (_atmosphere.IsTileSpace(grid, xform.MapUid, tile, mapGridComp: gridComp) || + if (_atmosphere.IsTileSpace(grid, xform.MapUid, tile) || _atmosphere.IsTileAirBlocked(grid, tile, mapGridComp: gridComp)) { continue;