From 81e41f8e8d000f6d420ce67134dc7eb49b0034ca Mon Sep 17 00:00:00 2001 From: BombasterDS <115770678+BombasterDS@users.noreply.github.com> Date: Sun, 16 Jun 2024 03:50:55 +1000 Subject: [PATCH] Mannequin (#29004) * Mannequin * rsi license fix * damage container fix * container fix hope this works * layers fix + appearance comp (mb it help?) * maybe fixed? * one day it will work... * can't even understand why test failing... (maybe fix?) * last try? --- .../Medical/SuitSensors/SuitSensorSystem.cs | 2 +- .../Structures/Decoration/mannequin.yml | 95 ++++++++++++++++++ .../mannequin_inventory_template.yml | 64 ++++++++++++ .../Graphs/furniture/mannequin.yml | 31 ++++++ .../Recipes/Construction/furniture.yml | 18 ++++ .../Decoration/mannequin.rsi/mannequin.png | Bin 0 -> 1274 bytes .../Decoration/mannequin.rsi/meta.json | 15 +++ 7 files changed, 224 insertions(+), 1 deletion(-) create mode 100644 Resources/Prototypes/Entities/Structures/Decoration/mannequin.yml create mode 100644 Resources/Prototypes/InventoryTemplates/mannequin_inventory_template.yml create mode 100644 Resources/Prototypes/Recipes/Construction/Graphs/furniture/mannequin.yml create mode 100644 Resources/Textures/Structures/Decoration/mannequin.rsi/mannequin.png create mode 100644 Resources/Textures/Structures/Decoration/mannequin.rsi/meta.json diff --git a/Content.Server/Medical/SuitSensors/SuitSensorSystem.cs b/Content.Server/Medical/SuitSensors/SuitSensorSystem.cs index 1acbf292f0..e0917f32a8 100644 --- a/Content.Server/Medical/SuitSensors/SuitSensorSystem.cs +++ b/Content.Server/Medical/SuitSensors/SuitSensorSystem.cs @@ -308,7 +308,7 @@ public sealed class SuitSensorSystem : EntitySystem return null; // check if sensor is enabled and worn by user - if (sensor.Mode == SuitSensorMode.SensorOff || sensor.User == null || transform.GridUid == null) + if (sensor.Mode == SuitSensorMode.SensorOff || sensor.User == null || !HasComp(sensor.User) || transform.GridUid == null) return null; // try to get mobs id from ID slot diff --git a/Resources/Prototypes/Entities/Structures/Decoration/mannequin.yml b/Resources/Prototypes/Entities/Structures/Decoration/mannequin.yml new file mode 100644 index 0000000000..4a2b0d3c3f --- /dev/null +++ b/Resources/Prototypes/Entities/Structures/Decoration/mannequin.yml @@ -0,0 +1,95 @@ +- type: entity + id: Mannequin + parent: BaseStructureDynamic + name: mannequin + description: It can wear any clothing with style. + components: + - type: Appearance + - type: Sprite + sprite: Structures/Decoration/mannequin.rsi + state: mannequin + noRot: true + layers: + - map: [ "mannequin" ] + sprite: Structures/Decoration/mannequin.rsi + state: mannequin + - map: [ "jumpsuit" ] + - map: [ "outerClothing" ] + - map: [ "eyes" ] + - map: [ "neck" ] + - map: [ "back" ] + - map: [ "mask" ] + - map: [ "head" ] + - type: Rotatable + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeCircle + radius: 0.2 + density: 200 + mask: + - MachineMask + layer: + - MidImpassable + - BulletImpassable + - type: InteractionOutline + - type: Construction + graph: Mannequin + node: mannequin + - type: Damageable + damageContainer: Inorganic + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 200 + behaviors: + - !type:PlaySoundBehavior + sound: + collection: WoodDestroy + - !type:EmptyAllContainersBehaviour + - !type:DoActsBehavior + acts: [ "Destruction" ] + - type: ContainerContainer + containers: + jumpsuit: !type:ContainerSlot + showEnts: False + occludes: False + ent: null + outerClothing: !type:ContainerSlot + showEnts: False + occludes: False + ent: null + neck: !type:ContainerSlot + showEnts: False + occludes: False + ent: null + mask: !type:ContainerSlot + showEnts: False + occludes: False + ent: null + eyes: !type:ContainerSlot + showEnts: False + occludes: False + ent: null + head: !type:ContainerSlot + showEnts: False + occludes: False + ent: null + suitstorage: !type:ContainerSlot + showEnts: False + occludes: False + ent: null + back: !type:ContainerSlot + showEnts: False + occludes: False + ent: null + - type: Inventory + templateId: mannequin + - type: InventorySlots + - type: Strippable + - type: UserInterface + interfaces: + enum.StrippingUiKey.Key: + type: StrippableBoundUserInterface \ No newline at end of file diff --git a/Resources/Prototypes/InventoryTemplates/mannequin_inventory_template.yml b/Resources/Prototypes/InventoryTemplates/mannequin_inventory_template.yml new file mode 100644 index 0000000000..80b9c6eea4 --- /dev/null +++ b/Resources/Prototypes/InventoryTemplates/mannequin_inventory_template.yml @@ -0,0 +1,64 @@ +- type: inventoryTemplate + id: mannequin + slots: + - name: jumpsuit + slotTexture: uniform + slotFlags: INNERCLOTHING + stripTime: 3 + uiWindowPos: 0,1 + strippingWindowPos: 1,2 + displayName: Jumpsuit + - name: outerClothing + slotTexture: suit + slotFlags: OUTERCLOTHING + stripTime: 3 + uiWindowPos: 1,1 + strippingWindowPos: 2,2 + displayName: Suit + - name: neck + slotTexture: neck + slotFlags: NECK + stripTime: 3 + uiWindowPos: 0,2 + strippingWindowPos: 0,1 + displayName: Neck + - name: mask + stripTime: 3 + slotTexture: mask + slotFlags: MASK + uiWindowPos: 1,2 + strippingWindowPos: 1,1 + displayName: Mask + - name: eyes + slotTexture: glasses + slotFlags: EYES + stripTime: 3 + uiWindowPos: 0,3 + strippingWindowPos: 0,0 + displayName: Eyes + - name: head + slotTexture: head + slotFlags: HEAD + stripTime: 3 + uiWindowPos: 1,3 + strippingWindowPos: 1,0 + displayName: Head + - name: suitstorage + slotTexture: suit_storage + slotFlags: SUITSTORAGE + slotGroup: MainHotbar + stripTime: 3 + uiWindowPos: 2,0 + strippingWindowPos: 1,3 + dependsOn: outerClothing + dependsOnComponents: + - type: AllowSuitStorage + displayName: Suit Storage + - name: back + slotTexture: back + fullTextureName: template_small + slotFlags: BACK + stripTime: 3 + uiWindowPos: 3,0 + strippingWindowPos: 0,2 + displayName: Back diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/furniture/mannequin.yml b/Resources/Prototypes/Recipes/Construction/Graphs/furniture/mannequin.yml new file mode 100644 index 0000000000..f83a3b1e95 --- /dev/null +++ b/Resources/Prototypes/Recipes/Construction/Graphs/furniture/mannequin.yml @@ -0,0 +1,31 @@ +- type: constructionGraph + id: Mannequin + start: start + graph: + - node: start + actions: + - !type:DestroyEntity {} + edges: + - to: mannequin + completed: + - !type:SnapToGrid { } + steps: + - material: WoodPlank + amount: 5 + - material: MetalRod + amount: 2 + doAfter: 2 + - node: mannequin + entity: Mannequin + edges: + - to: start + completed: + - !type:SpawnPrototype + prototype: MaterialWoodPlank + amount: 5 + - !type:SpawnPrototype + prototype: PartRodMetal + amount: 2 + steps: + - tool: Screwing + doAfter: 3 diff --git a/Resources/Prototypes/Recipes/Construction/furniture.yml b/Resources/Prototypes/Recipes/Construction/furniture.yml index 5f7ec9c92d..ea11a09b96 100644 --- a/Resources/Prototypes/Recipes/Construction/furniture.yml +++ b/Resources/Prototypes/Recipes/Construction/furniture.yml @@ -902,3 +902,21 @@ canBuildInImpassable: false conditions: - !type:TileNotBlocked + +- type: construction + id: Mannequin + name: mannequin + description: Wooden mannequin designed for clothing displaying + graph: Mannequin + startNode: start + targetNode: mannequin + category: construction-category-furniture + icon: + sprite: Structures/Decoration/mannequin.rsi + state: mannequin + objectType: Structure + placementMode: SnapgridCenter + canRotate: true + canBuildInImpassable: false + conditions: + - !type:TileNotBlocked \ No newline at end of file diff --git a/Resources/Textures/Structures/Decoration/mannequin.rsi/mannequin.png b/Resources/Textures/Structures/Decoration/mannequin.rsi/mannequin.png new file mode 100644 index 0000000000000000000000000000000000000000..3f362c698ba49c09b3391db5fc4814a982e0e6d2 GIT binary patch literal 1274 zcmVPx(v`IukRCt{2TEB1GMil-;(}aG6m2DLcVhBMbw-ykfj^H9g5oC}(Ws^MyNHQ9& zHUr*_OhqTJ9{OK2e}LP;=+?BZJ2hxwr%)BAjw(|WDMq4r9TX~}NU6G`cyergfFSZj z@_YB`-FwG-2TU-*l}3p5#;x@n0RT;@;M?yHnV-XoufKXkjGBtG;)ySQk(K;T`X-vn z85(a&06=((u)F;w$y}dWNx^!nyMANkr}6+zsi0AL?dm*l zva#wSc%JKxtU``MAV2 z6O59dDh2?+&cg>pmSq5d(y#ykVhDkc|6YEzVWC(vp*AdE{8Xy#JbXYhi5Mc&Q>a#} z_(wM}9~BXuo`T+N;ra0^?Cl5V2|@4=eQ`IrS#Jj+z1c!^da83xkRk-dKlBhVw3>q) zfP>sVHv<|7LGe??fNt_};7vtwoSz%!!1G}+v;e!$4njYbl!4bAya+B8?mjyR{qe8X zx0C0FiQoP@rRJyd0993Ci%`}Zoe$8?!$G-!H-EPXGvW3;?%Xi(%ga+He(HCDdQC-H zk0241I&EdW0WpNY1+e)s7jw0<@>6+$EX%l^oOg5{01{CNx0CY_1D*=WvW)vn$<9A- zVNxL>2Z4J)~H^a2(*(ouIpB2;|&<}=b z1wI7oHFaPXVBu$45z?D2S6f&VxCFtOu;|DF-N!8a)S4C6oG%@Qg^uz(-U!FdKhPN7 z7zID|>+og6M1XM{@WH|!f8&Y+qvB`wfWHmrH*buJe=-DUk-wKE`Fl>c^J=@S{1Z%Y z$-q2!-rmTOh#W_`cme={)&soo^huu7RRy|I@x{+{(>H}jNT*&I3SP60m%0fy<<*xAT7asRfw5k%aYDcU5QO5}zqW_?qll z9%tpJzN_-8IMVt&6MwxnvONma0_aM`-WTM6T`A@Pug16O(V0$A+KAQa)O|6R9JKwRtSq-2? zVJ%B+!Fz3pC+4Ybp!R@IrFw_ZM(;Tfc-gR=@UB`70+j&vv~w7Pg2X7fuKa=swE#Tx zJr6K@fMz<6HGWe87oQ()Y61Gqxj)nx!1O5198cu$hnU#5$+YN)C({tPh-r|e^8kYY z2QP}QF{hdBc3ul2UN(q=fTI)lOWOZ|N&v48@(g~%a0j+kwi{m4O`dCl{ieIT*Cj8+ z{(!O71}_UH0*u>$af4Za!djNJS7*k%KcM%R7R*zai?Tn!FRuI$pw63i9sau?-{)Mf kwxH0x55VU0Y8w{+0jj;5&U!?FnE(I)07*qoM6N<$f=H@g6951J literal 0 HcmV?d00001 diff --git a/Resources/Textures/Structures/Decoration/mannequin.rsi/meta.json b/Resources/Textures/Structures/Decoration/mannequin.rsi/meta.json new file mode 100644 index 0000000000..8edc1539e9 --- /dev/null +++ b/Resources/Textures/Structures/Decoration/mannequin.rsi/meta.json @@ -0,0 +1,15 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Made By BombasterDS", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "mannequin", + "directions": 4 + } + ] +} -- 2.51.2