fix: fix unnecessary devices in shitsilo (#211)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Linq;
|
||||
using Content.Shared._White.ShitSilo;
|
||||
using Content.Shared.Materials;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
@@ -44,6 +45,7 @@ public sealed partial class MaterialStorageControl : BoxContainer
|
||||
}
|
||||
|
||||
var gridStorage = _entityManager.TryGetComponent<TransformComponent>(_owner, out var transformComponent) &&
|
||||
_entityManager.HasComponent<BluespaceSiloComponent>(_owner) &&
|
||||
_entityManager.TryGetComponent<MaterialStorageComponent>(transformComponent.GridUid,
|
||||
out var materialStorageComponent) ? materialStorageComponent : null;
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ using Content.Server.Materials;
|
||||
using Content.Server.Power.Components;
|
||||
using Content.Server.Power.EntitySystems;
|
||||
using Content.Server.Stack;
|
||||
using Content.Shared._White.ShitSilo;
|
||||
using Content.Shared.UserInterface;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.Emag.Components;
|
||||
@@ -164,7 +165,7 @@ namespace Content.Server.Lathe
|
||||
? (int) (-amount * component.MaterialUseMultiplier)
|
||||
: -amount;
|
||||
|
||||
var gridUid =
|
||||
var gridUid = HasComp<BluespaceSiloComponent>(uid) &&
|
||||
TryComp<TransformComponent>(uid, out var transformComponent) ? transformComponent.GridUid : null;
|
||||
|
||||
var gridStorage =
|
||||
|
||||
@@ -5,6 +5,7 @@ using Content.Shared.Popups;
|
||||
using Content.Shared.Stacks;
|
||||
using Content.Server.Power.Components;
|
||||
using Content.Server.Stack;
|
||||
using Content.Shared._White.ShitSilo;
|
||||
using Content.Shared.ActionBlocker;
|
||||
using Content.Shared.Construction;
|
||||
using Content.Shared.Database;
|
||||
@@ -78,7 +79,8 @@ public sealed class MaterialStorageSystem : SharedMaterialStorageSystem
|
||||
volume = sheetsToExtract * volumePerSheet;
|
||||
}
|
||||
|
||||
var gridUid = TryComp<TransformComponent>(uid, out var transformComponent)
|
||||
var gridUid = HasComp<BluespaceSiloComponent>(uid) &&
|
||||
TryComp<TransformComponent>(uid, out var transformComponent)
|
||||
? transformComponent.GridUid
|
||||
: null;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Content.Shared._White.ShitSilo;
|
||||
using Content.Shared.Emag.Systems;
|
||||
using Content.Shared.Materials;
|
||||
using Content.Shared.Research.Prototypes;
|
||||
@@ -45,6 +46,7 @@ public abstract class SharedLatheSystem : EntitySystem
|
||||
var adjustedAmount = AdjustMaterial(needed, recipe.ApplyMaterialDiscount, component.MaterialUseMultiplier);
|
||||
|
||||
var gridUid =
|
||||
HasComp<BluespaceSiloComponent>(uid) &&
|
||||
TryComp<TransformComponent>(uid, out var transformComponent)
|
||||
? transformComponent.GridUid
|
||||
: null;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Linq;
|
||||
using Content.Shared._White.ShitSilo;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Interaction.Components;
|
||||
using Content.Shared.Lathe;
|
||||
@@ -295,7 +296,7 @@ public abstract class SharedMaterialStorageSystem : EntitySystem
|
||||
var multiplier = TryComp<StackComponent>(toInsert, out var stackComponent) ? stackComponent.Count : 1;
|
||||
var totalVolume = 0;
|
||||
|
||||
var gridUid = HasComp<LatheComponent>(receiver) &&
|
||||
var gridUid = HasComp<BluespaceSiloComponent>(receiver) &&
|
||||
TryComp<TransformComponent>(receiver, out var transformComponent)
|
||||
? transformComponent.GridUid
|
||||
: null;
|
||||
|
||||
9
Content.Shared/_White/ShitSilo/BluespaceSiloComponent.cs
Normal file
9
Content.Shared/_White/ShitSilo/BluespaceSiloComponent.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared._White.ShitSilo;
|
||||
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed partial class BluespaceSiloComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
@@ -18,6 +18,7 @@
|
||||
layer:
|
||||
- MachineLayer
|
||||
- type: Lathe
|
||||
- type: BluespaceSilo
|
||||
- type: MaterialStorage
|
||||
- type: Destructible
|
||||
thresholds:
|
||||
@@ -225,6 +226,7 @@
|
||||
- MagazineGrenadeEmpty
|
||||
- GrenadeEMP
|
||||
- GrenadeFlash
|
||||
- type: BluespaceSilo
|
||||
|
||||
- type: entity
|
||||
id: AutolatheHyperConvection
|
||||
@@ -237,6 +239,7 @@
|
||||
- type: Lathe
|
||||
materialUseMultiplier: 0.5
|
||||
timeMultiplier: 1.5
|
||||
- type: BluespaceSilo
|
||||
- type: LatheHeatProducing
|
||||
- type: Machine
|
||||
board: AutolatheHyperConvectionMachineCircuitboard
|
||||
@@ -349,6 +352,7 @@
|
||||
- WeaponAdvancedLaser
|
||||
- WeaponLaserCannon
|
||||
- WeaponXrayCannon
|
||||
- type: BluespaceSilo
|
||||
|
||||
- type: entity
|
||||
id: ProtolatheHyperConvection
|
||||
@@ -361,6 +365,7 @@
|
||||
- type: Lathe
|
||||
materialUseMultiplier: 0.5
|
||||
timeMultiplier: 1.5
|
||||
- type: BluespaceSilo
|
||||
- type: LatheHeatProducing
|
||||
- type: Machine
|
||||
board: ProtolatheHyperConvectionMachineCircuitboard
|
||||
@@ -476,6 +481,7 @@
|
||||
- ArtifactCrusherMachineCircuitboard
|
||||
- TelecomServerCircuitboard
|
||||
- MassMediaCircuitboard
|
||||
- type: BluespaceSilo
|
||||
- type: MaterialStorage
|
||||
whitelist:
|
||||
tags:
|
||||
@@ -588,6 +594,7 @@
|
||||
- HamtrLLeg
|
||||
- HamtrRLeg
|
||||
- VimHarness
|
||||
- type: BluespaceSilo
|
||||
- type: MaterialStorage
|
||||
whitelist:
|
||||
tags:
|
||||
@@ -640,6 +647,7 @@
|
||||
- AbominationCube
|
||||
- SpaceCarpCube
|
||||
- SpaceTickCube
|
||||
- type: BluespaceSilo
|
||||
|
||||
- type: entity
|
||||
id: SecurityTechFab
|
||||
@@ -770,6 +778,7 @@
|
||||
- Sheet
|
||||
- RawMaterial
|
||||
- Ingot
|
||||
- type: BluespaceSilo
|
||||
|
||||
- type: entity
|
||||
id: AmmoTechFab
|
||||
@@ -816,11 +825,12 @@
|
||||
- MagazineBoxMagnumAP
|
||||
- MagazineBoxAntiMateriel
|
||||
- MagazineBoxCaselessRifle
|
||||
- type: BluespaceSilo
|
||||
- type: MaterialStorage
|
||||
whitelist:
|
||||
tags:
|
||||
- Sheet
|
||||
|
||||
-
|
||||
- type: entity
|
||||
id: MedicalTechFab
|
||||
parent: BaseLathe
|
||||
@@ -889,6 +899,7 @@
|
||||
- SyringeBluespace
|
||||
- SyringeCryostasis
|
||||
- ClothingEyesHudMedical
|
||||
- type: BluespaceSilo
|
||||
- type: Machine
|
||||
board: MedicalTechFabCircuitboard
|
||||
- type: StealTarget
|
||||
@@ -1073,6 +1084,7 @@
|
||||
- ClothingOuterWinterCentcom
|
||||
- ClothingOuterWinterSyndie
|
||||
- ClothingOuterWinterSyndieCap
|
||||
- type: BluespaceSilo
|
||||
- type: MaterialStorage
|
||||
whitelist:
|
||||
tags:
|
||||
@@ -1119,6 +1131,7 @@
|
||||
- IngotGold30
|
||||
- IngotSilver30
|
||||
- MaterialBananium10
|
||||
- type: BluespaceSilo
|
||||
|
||||
- type: entity
|
||||
parent: OreProcessor
|
||||
@@ -1147,6 +1160,7 @@
|
||||
- IngotGold30
|
||||
- IngotSilver30
|
||||
- MaterialBananium10
|
||||
- type: BluespaceSilo
|
||||
|
||||
- type: entity
|
||||
parent: BaseLathe
|
||||
@@ -1178,3 +1192,4 @@
|
||||
staticRecipes:
|
||||
- MaterialSheetMeat
|
||||
- SheetPaper
|
||||
- type: BluespaceSilo
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
layer:
|
||||
- TabletopMachineLayer
|
||||
- type: Lathe
|
||||
- type: BluespaceSilo
|
||||
- type: MaterialStorage
|
||||
- type: ActivatableUI
|
||||
key: enum.LatheUiKey.Key
|
||||
|
||||
Reference in New Issue
Block a user