The Flatpacker 1001 can now make flatpacks for computers. (#23471)

* moved ComputerBoardComponent to Content.Shared

* made flatpacker accept computer boards

* made flatpack system and ui function with computer boards

* fixed it so that flatpacks of computers are correctly coloured to fit their computer board colour

* unhardcoded the computer flatpack assembly cost

* Combined GetFlatpackCreationCost(...) with GetflatpackCreationCostForComputer(...)

* removed code duplication in SharedFlatpackSystem

* removed code duplication from FlatpackCreatorMenu.xaml.cs

* remove code duplication from FlatpackSystem (on the server)

* fixed indentation error
This commit is contained in:
SpeltIncorrectyl
2024-01-04 04:23:47 +00:00
committed by GitHub
parent f533a1a543
commit 082bde40ca
7 changed files with 97 additions and 35 deletions

View File

@@ -42,9 +42,17 @@ public sealed partial class FlatpackCreatorComponent : Component
/// <summary>
/// A default cost applied to all flatpacks outside of the cost of constructing the machine.
/// This one is applied to machines specifically.
/// </summary>
[DataField]
public Dictionary<ProtoId<MaterialPrototype>, int> BaseMaterialCost = new();
public Dictionary<ProtoId<MaterialPrototype>, int> BaseMachineCost = new();
/// <summary>
/// A default cost applied to all flatpacks outside of the cost of constructing the machine.
/// This one is applied to computers specifically.
/// </summary>
[DataField]
public Dictionary<ProtoId<MaterialPrototype>, int> BaseComputerCost = new();
[DataField, ViewVariables(VVAccess.ReadWrite)]
public string SlotId = "board_slot";