From: BombasterDS <115770678+BombasterDS@users.noreply.github.com> Date: Sat, 15 Jun 2024 17:50:55 +0000 (+1000) Subject: Mannequin (#29004) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=81e41f8e8d000f6d420ce67134dc7eb49b0034ca;p=space-station-14.git 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? --- 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 0000000000..3f362c698b Binary files /dev/null and b/Resources/Textures/Structures/Decoration/mannequin.rsi/mannequin.png differ 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 + } + ] +}