Skip to content

Commit

Permalink
Fix rest of things
Browse files Browse the repository at this point in the history
  • Loading branch information
GreaseMonk committed Apr 9, 2024
1 parent 0e5f424 commit 69dc9d3
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -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"),
Expand Down Expand Up @@ -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(
Expand All @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions Content.Server/Nyanotrasen/Mail/MailSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -749,11 +750,11 @@ public struct MailRecipient
public string Name;
public string Job;
public string JobIcon;
public HashSet<String> AccessTags;
public HashSet<ProtoId<AccessLevelPrototype>> AccessTags;
public bool MayReceivePriorityMail;
public string Ship;

public MailRecipient(string name, string job, string jobIcon, HashSet<String> accessTags, bool mayReceivePriorityMail, string ship)
public MailRecipient(string name, string job, string jobIcon, HashSet<ProtoId<AccessLevelPrototype>> accessTags, bool mayReceivePriorityMail, string ship)
{
Name = name;
Job = job;
Expand Down
1 change: 1 addition & 0 deletions Content.Server/Procedural/DungeonJob.Generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ private async Task<Dungeon> GeneratePrefabDungeon(PrefabDunGen prefab, EntityUid
var dungeonRotation = _dungeon.GetDungeonRotation(seed);
var dungeonTransform = Matrix3.CreateTransform(_position, dungeonRotation);
var roomPackProtos = new Dictionary<Vector2i, List<DungeonRoomPackPrototype>>();
var fallbackTile = new Tile(_tileDefManager[prefab.Tile].TileId);

foreach (var pack in _prototype.EnumeratePrototypes<DungeonRoomPackPrototype>())
{
Expand Down
14 changes: 7 additions & 7 deletions Content.Server/Shipyard/Systems/ShipyardSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<MobStateComponent>();
var xformQuery = GetEntityQuery<TransformComponent>();
Expand All @@ -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
Expand All @@ -238,7 +238,7 @@ private void CleanupShipyard()
{
ShipyardMap = null;
return;
};
}

_mapManager.DeleteMap(ShipyardMap.Value);
}
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/StationEvents/Events/BluespaceCargoRule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion Content.Server/StationEvents/Events/BluespaceErrorRule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -53,7 +54,7 @@ protected override void Started(EntityUid uid, BluespaceErrorRuleComponent compo
var location = Spawn(null, coords);
if (TryComp<ShuttleComponent>(component.GridUid, out var shuttle))
{
_shuttle.FTLTravel(gridUid, shuttle, location, 5.5f, 55f);
_shuttle.FTLToCoordinates(gridUid, shuttle, location.ToCoordinates(), 5.5f, 55f);
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 69dc9d3

Please sign in to comment.