From 6574e1f78340d7a41c68e9f6a3992caff7563251 Mon Sep 17 00:00:00 2001 From: Dvir Date: Sat, 11 Jan 2025 00:03:23 +0200 Subject: [PATCH 1/3] Comments --- .../Recipes/Construction/Graphs/furniture/seats.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/furniture/seats.yml b/Resources/Prototypes/Recipes/Construction/Graphs/furniture/seats.yml index 18dcaf04031..91431c05c79 100644 --- a/Resources/Prototypes/Recipes/Construction/Graphs/furniture/seats.yml +++ b/Resources/Prototypes/Recipes/Construction/Graphs/furniture/seats.yml @@ -192,7 +192,7 @@ - tool: Screwing doAfter: 1 - #Frontier: fancy wooden chairs + # Frontier: fancy wooden chairs - to: chairWoodFancyBlack steps: - material: FloorCarpetBlack @@ -237,7 +237,7 @@ steps: - material: FloorCarpetWhite amount: 1 - #End Frontier + # End Frontier - node: chairMeat entity: ChairMeat @@ -432,3 +432,4 @@ steps: - tool: Prying doAfter: 1 + # End Frontier From 6bb0e9956f42a92c318ff4652fed2a8404d44c5d Mon Sep 17 00:00:00 2001 From: Dvir Date: Sat, 11 Jan 2025 15:38:57 +0200 Subject: [PATCH 2/3] Make sure chairs wont claim your soul --- .../Construction/Graphs/furniture/seats.yml | 188 +++++++++++------- 1 file changed, 117 insertions(+), 71 deletions(-) diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/furniture/seats.yml b/Resources/Prototypes/Recipes/Construction/Graphs/furniture/seats.yml index 91431c05c79..c02b1ff1bd8 100644 --- a/Resources/Prototypes/Recipes/Construction/Graphs/furniture/seats.yml +++ b/Resources/Prototypes/Recipes/Construction/Graphs/furniture/seats.yml @@ -88,6 +88,72 @@ - material: Cloth amount: 1 + # Frontier: fancy wooden chairs + - to: chairWoodFancyBlack + steps: + - material: WoodPlank + amount: 3 + doAfter: 1 + - material: FloorCarpetBlack + amount: 1 + - to: chairWoodFancyBlue + steps: + - material: WoodPlank + amount: 3 + doAfter: 1 + - material: FloorCarpetBlue + amount: 1 + - to: chairWoodFancyCyan + steps: + - material: WoodPlank + amount: 3 + doAfter: 1 + - material: FloorCarpetCyan + amount: 1 + - to: chairWoodFancyGreen + steps: + - material: WoodPlank + amount: 3 + doAfter: 1 + - material: FloorCarpetGreen + amount: 1 + - to: chairWoodFancyOrange + steps: + - material: WoodPlank + amount: 3 + doAfter: 1 + - material: FloorCarpetOrange + amount: 1 + - to: chairWoodFancyPink + steps: + - material: WoodPlank + amount: 3 + doAfter: 1 + - material: FloorCarpetPink + amount: 1 + - to: chairWoodFancyPurple + steps: + - material: WoodPlank + amount: 3 + doAfter: 1 + - material: FloorCarpetPurple + amount: 1 + - to: chairWoodFancyRed + steps: + - material: WoodPlank + amount: 3 + doAfter: 1 + - material: FloorCarpetRed + amount: 1 + - to: chairWoodFancyWhite + steps: + - material: WoodPlank + amount: 3 + doAfter: 1 + - material: FloorCarpetWhite + amount: 1 + # End Frontier + - node: chair entity: Chair edges: @@ -192,53 +258,6 @@ - tool: Screwing doAfter: 1 - # Frontier: fancy wooden chairs - - to: chairWoodFancyBlack - steps: - - material: FloorCarpetBlack - amount: 1 - - - to: chairWoodFancyBlue - steps: - - material: FloorCarpetBlue - amount: 1 - - - to: chairWoodFancyCyan - steps: - - material: FloorCarpetCyan - amount: 1 - - - to: chairWoodFancyGreen - steps: - - material: FloorCarpetGreen - amount: 1 - - - to: chairWoodFancyOrange - steps: - - material: FloorCarpetOrange - amount: 1 - - - to: chairWoodFancyPurple - steps: - - material: FloorCarpetPurple - amount: 1 - - - to: chairWoodFancyPink - steps: - - material: FloorCarpetPink - amount: 1 - - - to: chairWoodFancyRed - steps: - - material: FloorCarpetRed - amount: 1 - - - to: chairWoodFancyWhite - steps: - - material: FloorCarpetWhite - amount: 1 - # End Frontier - - node: chairMeat entity: ChairMeat edges: @@ -328,108 +347,135 @@ - node: chairWoodFancyBlack entity: ChairWoodFancyBlack edges: - - to: chairWood + - to: start completed: + - !type:SpawnPrototype + prototype: MaterialWoodPlank1 + amount: 3 - !type:SpawnPrototype prototype: FloorCarpetItemBlack amount: 1 steps: - - tool: Prying + - tool: Screwing doAfter: 1 - node: chairWoodFancyBlue entity: ChairWoodFancyBlue edges: - - to: chairWood + - to: start completed: + - !type:SpawnPrototype + prototype: MaterialWoodPlank1 + amount: 3 - !type:SpawnPrototype prototype: FloorCarpetItemBlue amount: 1 steps: - - tool: Prying + - tool: Screwing doAfter: 1 - node: chairWoodFancyCyan entity: ChairWoodFancyCyan edges: - - to: chairWood + - to: start completed: + - !type:SpawnPrototype + prototype: MaterialWoodPlank1 + amount: 3 - !type:SpawnPrototype prototype: FloorCarpetItemCyan amount: 1 steps: - - tool: Prying + - tool: Screwing doAfter: 1 - node: chairWoodFancyGreen entity: ChairWoodFancyGreen edges: - - to: chairWood + - to: start completed: + - !type:SpawnPrototype + prototype: MaterialWoodPlank1 + amount: 3 - !type:SpawnPrototype prototype: FloorCarpetItemGreen amount: 1 steps: - - tool: Prying + - tool: Screwing doAfter: 1 - node: chairWoodFancyOrange entity: ChairWoodFancyOrange edges: - - to: chairWood + - to: start completed: + - !type:SpawnPrototype + prototype: MaterialWoodPlank1 + amount: 3 - !type:SpawnPrototype prototype: FloorCarpetItemOrange amount: 1 steps: - - tool: Prying + - tool: Screwing doAfter: 1 - - node: chairWoodFancyPink - entity: ChairWoodFancyPink + - node: chairWoodFancyPurple + entity: ChairWoodFancyPurple edges: - - to: chairWood + - to: start completed: - !type:SpawnPrototype - prototype: FloorCarpetItemPink + prototype: MaterialWoodPlank1 + amount: 3 + - !type:SpawnPrototype + prototype: FloorCarpetItemPurple amount: 1 steps: - - tool: Prying + - tool: Screwing doAfter: 1 - - node: chairWoodFancyPurple - entity: ChairWoodFancyPurple + - node: chairWoodFancyPink + entity: ChairWoodFancyPink edges: - - to: chairWood + - to: start completed: - !type:SpawnPrototype - prototype: FloorCarpetItemPurple + prototype: MaterialWoodPlank1 + amount: 3 + - !type:SpawnPrototype + prototype: FloorCarpetItemPink amount: 1 steps: - - tool: Prying + - tool: Screwing doAfter: 1 - node: chairWoodFancyRed entity: ChairWoodFancyRed edges: - - to: chairWood + - to: start completed: + - !type:SpawnPrototype + prototype: MaterialWoodPlank1 + amount: 3 - !type:SpawnPrototype prototype: FloorCarpetItemRed amount: 1 steps: - - tool: Prying + - tool: Screwing doAfter: 1 - node: chairWoodFancyWhite entity: ChairWoodFancyWhite edges: - - to: chairWood + - to: start completed: + - !type:SpawnPrototype + prototype: MaterialWoodPlank1 + amount: 3 - !type:SpawnPrototype prototype: FloorCarpetItemWhite amount: 1 steps: - - tool: Prying + - tool: Screwing doAfter: 1 # End Frontier From 30b2919312a52473d5cec28e232d39844c51a457 Mon Sep 17 00:00:00 2001 From: Whatstone Date: Sat, 11 Jan 2025 13:09:44 -0500 Subject: [PATCH 3/3] Empty strap condition, fancy chair graphs --- .../Construction/Conditions/NFStrapEmpty.cs | 44 ++++ .../construction/conditions/strap-buckled.ftl | 3 + .../Construction/Graphs/furniture/seats.yml | 203 ++++++++---------- 3 files changed, 139 insertions(+), 111 deletions(-) create mode 100644 Content.Server/_NF/Construction/Conditions/NFStrapEmpty.cs create mode 100644 Resources/Locale/en-US/_NF/construction/conditions/strap-buckled.ftl diff --git a/Content.Server/_NF/Construction/Conditions/NFStrapEmpty.cs b/Content.Server/_NF/Construction/Conditions/NFStrapEmpty.cs new file mode 100644 index 00000000000..79143f64ed7 --- /dev/null +++ b/Content.Server/_NF/Construction/Conditions/NFStrapEmpty.cs @@ -0,0 +1,44 @@ +using Content.Shared.Construction; +using JetBrains.Annotations; +using Content.Shared.Examine; +using Content.Shared.Buckle.Components; + +namespace Content.Server.Construction.Conditions; + +[UsedImplicitly] +[DataDefinition] +public sealed partial class NFStrapEmpty : IGraphCondition +{ + public bool Condition(EntityUid uid, IEntityManager entityManager) + { + if (!entityManager.TryGetComponent(uid, out StrapComponent? strap)) + return true; // No strap, nothing can be buckled. + + return strap.BuckledEntities.Count == 0; + } + + public bool DoExamine(ExaminedEvent args) + { + var entity = args.Examined; + + var entMan = IoCManager.Resolve(); + + if (!entMan.TryGetComponent(entity, out StrapComponent? strap)) return false; + + if (strap.BuckledEntities.Count > 0) + { + args.PushMarkup(Loc.GetString("construction-examine-condition-nf-strap-empty", ("entityName", entMan.GetComponent(entity).EntityName)) + "\n"); + return true; + } + + return false; + } + + public IEnumerable GenerateGuideEntry() + { + yield return new ConstructionGuideEntry() + { + Localization = "construction-step-condition-nf-strap-empty" + }; + } +} \ No newline at end of file diff --git a/Resources/Locale/en-US/_NF/construction/conditions/strap-buckled.ftl b/Resources/Locale/en-US/_NF/construction/conditions/strap-buckled.ftl new file mode 100644 index 00000000000..6edbcc47363 --- /dev/null +++ b/Resources/Locale/en-US/_NF/construction/conditions/strap-buckled.ftl @@ -0,0 +1,3 @@ +# NFBuckled +construction-examine-condition-nf-strap-empty = Unbuckle everything from the {$entityName}. +construction-step-condition-nf-strap-empty = Nothing must be buckled. diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/furniture/seats.yml b/Resources/Prototypes/Recipes/Construction/Graphs/furniture/seats.yml index c02b1ff1bd8..ff4647e483a 100644 --- a/Resources/Prototypes/Recipes/Construction/Graphs/furniture/seats.yml +++ b/Resources/Prototypes/Recipes/Construction/Graphs/furniture/seats.yml @@ -88,72 +88,6 @@ - material: Cloth amount: 1 - # Frontier: fancy wooden chairs - - to: chairWoodFancyBlack - steps: - - material: WoodPlank - amount: 3 - doAfter: 1 - - material: FloorCarpetBlack - amount: 1 - - to: chairWoodFancyBlue - steps: - - material: WoodPlank - amount: 3 - doAfter: 1 - - material: FloorCarpetBlue - amount: 1 - - to: chairWoodFancyCyan - steps: - - material: WoodPlank - amount: 3 - doAfter: 1 - - material: FloorCarpetCyan - amount: 1 - - to: chairWoodFancyGreen - steps: - - material: WoodPlank - amount: 3 - doAfter: 1 - - material: FloorCarpetGreen - amount: 1 - - to: chairWoodFancyOrange - steps: - - material: WoodPlank - amount: 3 - doAfter: 1 - - material: FloorCarpetOrange - amount: 1 - - to: chairWoodFancyPink - steps: - - material: WoodPlank - amount: 3 - doAfter: 1 - - material: FloorCarpetPink - amount: 1 - - to: chairWoodFancyPurple - steps: - - material: WoodPlank - amount: 3 - doAfter: 1 - - material: FloorCarpetPurple - amount: 1 - - to: chairWoodFancyRed - steps: - - material: WoodPlank - amount: 3 - doAfter: 1 - - material: FloorCarpetRed - amount: 1 - - to: chairWoodFancyWhite - steps: - - material: WoodPlank - amount: 3 - doAfter: 1 - - material: FloorCarpetWhite - amount: 1 - # End Frontier - - node: chair entity: Chair edges: @@ -257,6 +191,62 @@ steps: - tool: Screwing doAfter: 1 + # Frontier: fancy wooden chairs + - to: chairWoodFancyBlack + conditions: + - !type:NFStrapEmpty + steps: + - material: FloorCarpetBlack + amount: 1 + - to: chairWoodFancyBlue + conditions: + - !type:NFStrapEmpty + steps: + - material: FloorCarpetBlue + amount: 1 + - to: chairWoodFancyCyan + conditions: + - !type:NFStrapEmpty + steps: + - material: FloorCarpetCyan + amount: 1 + - to: chairWoodFancyGreen + conditions: + - !type:NFStrapEmpty + steps: + - material: FloorCarpetGreen + amount: 1 + - to: chairWoodFancyOrange + conditions: + - !type:NFStrapEmpty + steps: + - material: FloorCarpetOrange + amount: 1 + - to: chairWoodFancyPink + conditions: + - !type:NFStrapEmpty + steps: + - material: FloorCarpetPink + amount: 1 + - to: chairWoodFancyPurple + conditions: + - !type:NFStrapEmpty + steps: + - material: FloorCarpetPurple + amount: 1 + - to: chairWoodFancyRed + conditions: + - !type:NFStrapEmpty + steps: + - material: FloorCarpetRed + amount: 1 + - to: chairWoodFancyWhite + conditions: + - !type:NFStrapEmpty + steps: + - material: FloorCarpetWhite + amount: 1 + # End Frontier - node: chairMeat entity: ChairMeat @@ -347,135 +337,126 @@ - node: chairWoodFancyBlack entity: ChairWoodFancyBlack edges: - - to: start + - to: chairWood + conditions: + - !type:NFStrapEmpty completed: - - !type:SpawnPrototype - prototype: MaterialWoodPlank1 - amount: 3 - !type:SpawnPrototype prototype: FloorCarpetItemBlack amount: 1 steps: - - tool: Screwing + - tool: Prying doAfter: 1 - node: chairWoodFancyBlue entity: ChairWoodFancyBlue edges: - - to: start + - to: chairWood + conditions: + - !type:NFStrapEmpty completed: - - !type:SpawnPrototype - prototype: MaterialWoodPlank1 - amount: 3 - !type:SpawnPrototype prototype: FloorCarpetItemBlue amount: 1 steps: - - tool: Screwing + - tool: Prying doAfter: 1 - node: chairWoodFancyCyan entity: ChairWoodFancyCyan edges: - - to: start + - to: chairWood + conditions: + - !type:NFStrapEmpty completed: - - !type:SpawnPrototype - prototype: MaterialWoodPlank1 - amount: 3 - !type:SpawnPrototype prototype: FloorCarpetItemCyan amount: 1 steps: - - tool: Screwing + - tool: Prying doAfter: 1 - node: chairWoodFancyGreen entity: ChairWoodFancyGreen edges: - - to: start + - to: chairWood + conditions: + - !type:NFStrapEmpty completed: - - !type:SpawnPrototype - prototype: MaterialWoodPlank1 - amount: 3 - !type:SpawnPrototype prototype: FloorCarpetItemGreen amount: 1 steps: - - tool: Screwing + - tool: Prying doAfter: 1 - node: chairWoodFancyOrange entity: ChairWoodFancyOrange edges: - - to: start + - to: chairWood + conditions: + - !type:NFStrapEmpty completed: - - !type:SpawnPrototype - prototype: MaterialWoodPlank1 - amount: 3 - !type:SpawnPrototype prototype: FloorCarpetItemOrange amount: 1 steps: - - tool: Screwing + - tool: Prying doAfter: 1 - node: chairWoodFancyPurple entity: ChairWoodFancyPurple edges: - - to: start + - to: chairWood + conditions: + - !type:NFStrapEmpty completed: - - !type:SpawnPrototype - prototype: MaterialWoodPlank1 - amount: 3 - !type:SpawnPrototype prototype: FloorCarpetItemPurple amount: 1 steps: - - tool: Screwing + - tool: Prying doAfter: 1 - node: chairWoodFancyPink entity: ChairWoodFancyPink edges: - - to: start + - to: chairWood + conditions: + - !type:NFStrapEmpty completed: - - !type:SpawnPrototype - prototype: MaterialWoodPlank1 - amount: 3 - !type:SpawnPrototype prototype: FloorCarpetItemPink amount: 1 steps: - - tool: Screwing + - tool: Prying doAfter: 1 - node: chairWoodFancyRed entity: ChairWoodFancyRed edges: - - to: start + - to: chairWood + conditions: + - !type:NFStrapEmpty completed: - - !type:SpawnPrototype - prototype: MaterialWoodPlank1 - amount: 3 - !type:SpawnPrototype prototype: FloorCarpetItemRed amount: 1 steps: - - tool: Screwing + - tool: Prying doAfter: 1 - node: chairWoodFancyWhite entity: ChairWoodFancyWhite edges: - - to: start + - to: chairWood + conditions: + - !type:NFStrapEmpty completed: - - !type:SpawnPrototype - prototype: MaterialWoodPlank1 - amount: 3 - !type:SpawnPrototype prototype: FloorCarpetItemWhite amount: 1 steps: - - tool: Screwing + - tool: Prying doAfter: 1 # End Frontier