From a7571ac45bd1432a438d1d3b62c7c5b70deabcb9 Mon Sep 17 00:00:00 2001 From: MisterMecky Date: Tue, 28 Mar 2023 07:04:24 +0800 Subject: [PATCH] Add cardboard material (#14701) * add cardboard material * missing stack visualizers * add crafting recipes * cardboard crate * license thing * rename various things --- .../catalog/cargo/cargo-materials.ftl | 3 ++ .../catalog/fills/crates/materials-crates.ftl | 3 ++ .../Catalog/Cargo/cargo_materials.yml | 10 ++++++ .../Catalog/Fills/Crates/materials.yml | 9 +++++ .../Entities/Objects/Materials/materials.yml | 31 ++++++++++++++++++ .../Prototypes/Entities/Objects/Misc/box.yml | 5 +++ .../Structures/Storage/Closets/big_boxes.yml | 5 +++ .../Reagents/Materials/materials.yml | 8 +++++ .../Crafting/Graphs/storage/bigbox.yml | 15 +++++++++ .../Crafting/Graphs/storage/cardboardbox.yml | 15 +++++++++ .../Prototypes/Recipes/Crafting/crates.yml | 22 +++++++++++++ .../Prototypes/Stacks/Materials/materials.yml | 7 ++++ .../Materials/materials.rsi/cardboard.png | Bin 0 -> 330 bytes .../Materials/materials.rsi/cardboard_2.png | Bin 0 -> 365 bytes .../Materials/materials.rsi/cardboard_3.png | Bin 0 -> 363 bytes .../Objects/Materials/materials.rsi/meta.json | 11 ++++++- 16 files changed, 143 insertions(+), 1 deletion(-) create mode 100644 Resources/Prototypes/Recipes/Crafting/Graphs/storage/bigbox.yml create mode 100644 Resources/Prototypes/Recipes/Crafting/Graphs/storage/cardboardbox.yml create mode 100644 Resources/Textures/Objects/Materials/materials.rsi/cardboard.png create mode 100644 Resources/Textures/Objects/Materials/materials.rsi/cardboard_2.png create mode 100644 Resources/Textures/Objects/Materials/materials.rsi/cardboard_3.png diff --git a/Resources/Locale/en-US/prototypes/catalog/cargo/cargo-materials.ftl b/Resources/Locale/en-US/prototypes/catalog/cargo/cargo-materials.ftl index 46a3131135..802b71eda9 100644 --- a/Resources/Locale/en-US/prototypes/catalog/cargo/cargo-materials.ftl +++ b/Resources/Locale/en-US/prototypes/catalog/cargo/cargo-materials.ftl @@ -16,6 +16,9 @@ ent-MaterialPlasteel = { ent-CrateMaterialPlasteel } ent-MaterialPlasma = { ent-CrateMaterialPlasma } .desc = { ent-CrateMaterialPlasma.desc } +ent-CardboardMaterial = { ent-CrateMaterialCardboard } + .desc = { ent-CrateMaterialCardboard.desc } + ent-MaterialFuelTank = { ent-WeldingFuelTankFull } .desc = { ent-WeldingFuelTankFull.desc } diff --git a/Resources/Locale/en-US/prototypes/catalog/fills/crates/materials-crates.ftl b/Resources/Locale/en-US/prototypes/catalog/fills/crates/materials-crates.ftl index 2477e9a532..505220730f 100644 --- a/Resources/Locale/en-US/prototypes/catalog/fills/crates/materials-crates.ftl +++ b/Resources/Locale/en-US/prototypes/catalog/fills/crates/materials-crates.ftl @@ -18,3 +18,6 @@ ent-CrateMaterialPlasteel = Plasteel crate ent-CrateMaterialPlasma = Solid plasma crate .desc = 90 sheets of plasma. + +ent-CrateMaterialCardboard = Cardboard crate + .desc = 60 pieces of cardboard. diff --git a/Resources/Prototypes/Catalog/Cargo/cargo_materials.yml b/Resources/Prototypes/Catalog/Cargo/cargo_materials.yml index 36953b3abc..00f6e6a422 100644 --- a/Resources/Prototypes/Catalog/Cargo/cargo_materials.yml +++ b/Resources/Prototypes/Catalog/Cargo/cargo_materials.yml @@ -58,6 +58,16 @@ category: Materials group: market +- type: cargoProduct + id: CardboardMaterial + icon: + sprite: Objects/Materials/materials.rsi + state: cardboard_3 + product: CrateMaterialCardboard + cost: 750 + category: Materials + group: market + - type: cargoProduct id: MaterialFuelTank icon: diff --git a/Resources/Prototypes/Catalog/Fills/Crates/materials.yml b/Resources/Prototypes/Catalog/Fills/Crates/materials.yml index 69aa37df88..b4cafc8a34 100644 --- a/Resources/Prototypes/Catalog/Fills/Crates/materials.yml +++ b/Resources/Prototypes/Catalog/Fills/Crates/materials.yml @@ -63,6 +63,15 @@ - id: SheetPlasma amount: 3 +- type: entity + id: CrateMaterialCardboard + parent: CrateGenericSteel + components: + - type: StorageFill + contents: + - id: MaterialCardboard + amount: 2 + #- type: entity # id: CrateMaterialHFuelTank # name: fueltank crate diff --git a/Resources/Prototypes/Entities/Objects/Materials/materials.yml b/Resources/Prototypes/Entities/Objects/Materials/materials.yml index f6f1b9efc7..e0956d4cd2 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/materials.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/materials.yml @@ -25,6 +25,37 @@ - !type:DoActsBehavior acts: [ "Destruction" ] +- type: entity + parent: MaterialBase + id: MaterialCardboard + name: cardboard + suffix: Full + components: + - type: Material + materials: + Cardboard: 100 + - type: Stack + stackType: Cardboard + - type: Sprite + state: cardboard_3 + - type: Appearance + visuals: + - type: StackVisualizer + stackLayers: + - cardboard + - cardboard_2 + - cardboard_3 + +- type: entity + parent: MaterialCardboard + id: MaterialCardboard1 + suffix: Single + components: + - type: Sprite + state: cardboard + - type: Stack + count: 1 + - type: entity parent: MaterialBase id: MaterialCloth diff --git a/Resources/Prototypes/Entities/Objects/Misc/box.yml b/Resources/Prototypes/Entities/Objects/Misc/box.yml index 75d0f60e04..5f3e1e6cd9 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/box.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/box.yml @@ -15,3 +15,8 @@ - type: ContainerContainer containers: storagebase: !type:Container + - type: Construction + graph: BoxCardboard + node: boxcardboard + containers: + - entity_storage diff --git a/Resources/Prototypes/Entities/Structures/Storage/Closets/big_boxes.yml b/Resources/Prototypes/Entities/Structures/Storage/Closets/big_boxes.yml index bc7cecab44..d3e8247403 100644 --- a/Resources/Prototypes/Entities/Structures/Storage/Closets/big_boxes.yml +++ b/Resources/Prototypes/Entities/Structures/Storage/Closets/big_boxes.yml @@ -50,6 +50,11 @@ tags: - DoorBumpOpener - type: InteractionOutline + - type: Construction + graph: BaseBigBox + node: basebigbox + containers: + - entity_storage - type: entity id: StealthBox diff --git a/Resources/Prototypes/Reagents/Materials/materials.yml b/Resources/Prototypes/Reagents/Materials/materials.yml index 6c2eea38a8..faaa2523ec 100644 --- a/Resources/Prototypes/Reagents/Materials/materials.yml +++ b/Resources/Prototypes/Reagents/Materials/materials.yml @@ -6,6 +6,14 @@ color: "#8A9A5B" price: 0.1 +- type: material + id: Cardboard + stackEntity: MaterialCardboard1 + name: materials-cardboard + icon: { sprite: /Textures/Objects/Materials/materials.rsi, state: cardboard } + color: "#70736c" + price: 0.05 + - type: material id: Cloth stackEntity: MaterialCloth1 diff --git a/Resources/Prototypes/Recipes/Crafting/Graphs/storage/bigbox.yml b/Resources/Prototypes/Recipes/Crafting/Graphs/storage/bigbox.yml new file mode 100644 index 0000000000..eef5d5c553 --- /dev/null +++ b/Resources/Prototypes/Recipes/Crafting/Graphs/storage/bigbox.yml @@ -0,0 +1,15 @@ +- type: constructionGraph + id: BaseBigBox + start: start + graph: + - node: start + edges: + - to: basebigbox + steps: + - material: Cardboard + amount: 5 + doAfter: 5 + + + - node: basebigbox + entity: BaseBigBox \ No newline at end of file diff --git a/Resources/Prototypes/Recipes/Crafting/Graphs/storage/cardboardbox.yml b/Resources/Prototypes/Recipes/Crafting/Graphs/storage/cardboardbox.yml new file mode 100644 index 0000000000..527f6b5247 --- /dev/null +++ b/Resources/Prototypes/Recipes/Crafting/Graphs/storage/cardboardbox.yml @@ -0,0 +1,15 @@ +- type: constructionGraph + id: BoxCardboard + start: start + graph: + - node: start + edges: + - to: boxcardboard + steps: + - material: Cardboard + amount: 1 + doAfter: 4 + + + - node: boxcardboard + entity: BoxCardboard \ No newline at end of file diff --git a/Resources/Prototypes/Recipes/Crafting/crates.yml b/Resources/Prototypes/Recipes/Crafting/crates.yml index 23a8e0a8b1..a55d6211e7 100644 --- a/Resources/Prototypes/Recipes/Crafting/crates.yml +++ b/Resources/Prototypes/Recipes/Crafting/crates.yml @@ -30,3 +30,25 @@ description: A plastic crate for storing things. icon: { sprite: Structures/Storage/Crates/plastic.rsi, state: icon } objectType: Structure + +- type: construction + name: cardboard box + id: BaseBigBox + graph: BaseBigBox + startNode: start + targetNode: basebigbox + category: construction-category-storage + description: A big box for storing things or hiding in. + icon: { sprite: Structures/Storage/closet.rsi, state: cardboard } + objectType: Structure + +- type: construction + name: cardboard box + id: BoxCardboard + graph: BoxCardboard + startNode: start + targetNode: boxcardboard + category: construction-category-storage + description: A small box for storing things. + icon: { sprite: Objects/Storage/boxes.rsi, state: box } + objectType: Item \ No newline at end of file diff --git a/Resources/Prototypes/Stacks/Materials/materials.yml b/Resources/Prototypes/Stacks/Materials/materials.yml index f2aad5f56f..253c61b4f5 100644 --- a/Resources/Prototypes/Stacks/Materials/materials.yml +++ b/Resources/Prototypes/Stacks/Materials/materials.yml @@ -12,6 +12,13 @@ spawn: MaterialWoodPlank1 maxCount: 30 +- type: stack + id: Cardboard + name: cardboard + icon: { sprite: /Textures/Objects/Materials/materials.rsi, state: cardboard } + spawn: MaterialCardboard1 + maxCount: 30 + - type: stack id: Cloth name: cloth diff --git a/Resources/Textures/Objects/Materials/materials.rsi/cardboard.png b/Resources/Textures/Objects/Materials/materials.rsi/cardboard.png new file mode 100644 index 0000000000000000000000000000000000000000..c12334e09f2dfe00f1170e13c94c6b9fc9a89acb GIT binary patch literal 330 zcmV-Q0k!^#P)Px$1W80eR9J=Wmaz_kFc5}+3`8XaW1`?>A}mh6goE*k2?LMeWYok#XDulZOmqSq zC@nOG!G0rm-2KCUcLfxRe@Ejb?DpHYOoK3p8hhv>MLd6n;c(Qdah9bxpDx_IL941i zKnc)*W}{h_3EQ4@D*k*v5XY1m4}(Z6P3ZZn+9W~8pGS| zj?J1;7hiiI3?gmr%%sjPi{tfB`@J~RLhk{YbIf}W^gabjfY2UbO-LhV<#Z_lG84ix cph5uvAHm&L*yG6ujQ{`u07*qoM6N<$f|-+p*#H0l literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Materials/materials.rsi/cardboard_2.png b/Resources/Textures/Objects/Materials/materials.rsi/cardboard_2.png new file mode 100644 index 0000000000000000000000000000000000000000..54f6f9d8b9d104ce89d576d28b0836279eb88334 GIT binary patch literal 365 zcmV-z0h0cSP)Px$CrLy>R9J=Wmd%R7KoEp067dI77S_a*V1ghB`w||+Cl(JLdBwkM zSPx4gEa~(lLlAN5I-Tl|P~9|O^y#v=g5hZJtJ7dIo+kFNRZKj;gHoxSs&Nopv0AR# zxPx$B}qg#ScUgv~?1y2!i0`7C;C0#~qrkd)AzQ zx&~M&CxrOcS+MP!(07SvKpIHgfY4J6d_onQ0hYj(Ql!;%DDo?%T;r~RTDk7ou(meP zbUoBH-0k-0wi&$mdIwh9Wgr1j@OWJVt$N3^;dq!uGQi`N6HtNoU#Y59BCTF5uqNQF zYC=0