ShitSilo (#184)
* add: prototypes for silo and silo ports * add: ShitSilo * fix: remove useless components * fix: fix material storage system * git commit * fix: it just works * fix: fix unsupported grids * add: all standart maps support * fix: fix material whitelist * fix: add missing maps * cleanup and fix * standardization
This commit is contained in:
@@ -78,7 +78,17 @@ public sealed class MaterialStorageSystem : SharedMaterialStorageSystem
|
||||
volume = sheetsToExtract * volumePerSheet;
|
||||
}
|
||||
|
||||
if (volume <= 0 || !TryChangeMaterialAmount(uid, msg.Material, -volume))
|
||||
var gridUid = TryComp<TransformComponent>(uid, out var transformComponent)
|
||||
? transformComponent.GridUid
|
||||
: null;
|
||||
|
||||
var gridStorage = gridUid.HasValue &&
|
||||
TryComp<MaterialStorageComponent>(gridUid, out var materialStorageComponent)
|
||||
? materialStorageComponent
|
||||
: null;
|
||||
|
||||
|
||||
if (volume <= 0 || !TryChangeMaterialAmount(uid, msg.Material, -volume, gridUid: gridUid, gridStorage: gridStorage))
|
||||
return;
|
||||
|
||||
var mats = SpawnMultipleFromMaterial(volume, material, Transform(uid).Coordinates, out _);
|
||||
|
||||
Reference in New Issue
Block a user