Fix master merge (#9254)

This commit is contained in:
metalgearsloth
2022-06-28 23:39:48 +10:00
committed by GitHub
parent 20e27e2c7d
commit 5885e108ae

View File

@@ -293,14 +293,13 @@ public sealed partial class CargoSystem
var possibleNames = _protoMan.Index<DatasetPrototype>(prototype.NameDataset).Values; var possibleNames = _protoMan.Index<DatasetPrototype>(prototype.NameDataset).Values;
var name = _random.Pick(possibleNames); var name = _random.Pick(possibleNames);
var (_, gridId) = _loader.LoadBlueprint(CargoMap.Value, prototype.Path.ToString()); var (_, shuttleUid) = _loader.LoadBlueprint(CargoMap.Value, prototype.Path.ToString());
var shuttleUid = _mapManager.GetGridEuid(gridId!.Value); var xform = Transform(shuttleUid!.Value);
var xform = Transform(shuttleUid); MetaData(shuttleUid!.Value).EntityName = name;
MetaData(shuttleUid).EntityName = name;
// TODO: Something better like a bounds check. // TODO: Something better like a bounds check.
xform.LocalPosition += 100 * _index; xform.LocalPosition += 100 * _index;
var comp = EnsureComp<CargoShuttleComponent>(shuttleUid); var comp = EnsureComp<CargoShuttleComponent>(shuttleUid!.Value);
comp.Station = component.Owner; comp.Station = component.Owner;
comp.Coordinates = xform.Coordinates; comp.Coordinates = xform.Coordinates;
@@ -308,7 +307,7 @@ public sealed partial class CargoSystem
comp.NextCall = _timing.CurTime + TimeSpan.FromSeconds(comp.Cooldown); comp.NextCall = _timing.CurTime + TimeSpan.FromSeconds(comp.Cooldown);
UpdateShuttleCargoConsoles(comp); UpdateShuttleCargoConsoles(comp);
_index++; _index++;
_sawmill.Info($"Added cargo shuttle to {ToPrettyString(shuttleUid)}"); _sawmill.Info($"Added cargo shuttle to {ToPrettyString(shuttleUid!.Value)}");
} }
private void SellPallets(CargoShuttleComponent component, StationBankAccountComponent bank) private void SellPallets(CargoShuttleComponent component, StationBankAccountComponent bank)