Mannequin (#253)

* mannequin

* fix

* fix2

* Update mannequin.yml

---------

Co-authored-by: Ed <96445749+TheShuEd@users.noreply.github.com>
This commit is contained in:
Nim
2024-06-21 23:17:49 +03:00
committed by GitHub
parent d973969a02
commit 3492a7892a
7 changed files with 279 additions and 1 deletions

View File

@@ -5,6 +5,8 @@ ent-CP14WallmountWeb = паутина
.desc = Паутина, прилипшая к темным углам, в которой сидят крошечные паучки.
ent-CP14WallmountWoodenBoards = доски
.desc = Прибиты к стене. Зачем? не совсем ясно.
ent-CP14Mannequin = манекен
.desc = Удобная подставка для одежды или доспехов.
# Doors
ent-CP14BaseWoodDoor = деревянная дверь

View File

@@ -0,0 +1,120 @@
- type: entity
id: CP14Mannequin
parent: Mannequin
name: mannequin
description: A handy stand for clothing or armour.
components:
- type: Appearance
- type: Sprite
sprite: _CP14/Structures/Decoration/mannequin.rsi
state: mannequin
noRot: true
layers:
- map: [ "mannequin" ]
sprite: _CP14/Structures/Decoration/mannequin.rsi
state: mannequin
- map: [ "shirt" ]
- map: [ "pants" ]
- map: [ "gloves" ]
- map: [ "shoes" ]
- map: [ "cloak" ]
- map: [ "eyes" ]
- map: [ "belt1" ]
- map: [ "belt2" ]
- 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: CP14Mannequin
node: CP14mannequin
- 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:
shirt: !type:ContainerSlot
showEnts: False
occludes: False
ent: null
pants: !type:ContainerSlot
showEnts: False
occludes: False
ent: null
gloves: !type:ContainerSlot
showEnts: False
occludes: False
ent: null
shoes: !type:ContainerSlot
showEnts: False
occludes: False
ent: null
cloak: !type:ContainerSlot
showEnts: False
occludes: False
ent: null
eyes: !type:ContainerSlot
showEnts: False
occludes: False
ent: null
belt1: !type:ContainerSlot
showEnts: False
occludes: False
ent: null
belt2: !type:ContainerSlot
showEnts: False
occludes: False
ent: null
neck: !type:ContainerSlot
showEnts: False
occludes: False
ent: null
back: !type:ContainerSlot
showEnts: False
occludes: False
ent: null
mask: !type:ContainerSlot
showEnts: False
occludes: False
ent: null
head: !type:ContainerSlot
showEnts: False
occludes: False
ent: null
keys: !type:ContainerSlot
showEnts: False
occludes: False
ent: null
- type: Inventory
templateId: CP14mannequin
- type: InventorySlots
- type: Strippable
- type: UserInterface
interfaces:
enum.StrippingUiKey.Key:
type: StrippableBoundUserInterface

View File

@@ -0,0 +1,96 @@
- type: inventoryTemplate
id: CP14mannequin
slots:
# Left hotbar
# 0, y
- name: neck
slotTexture: neck
slotFlags: NECK
uiWindowPos: 0,2
strippingWindowPos: 1,2
displayName: Neck
- name: eyes
slotTexture: eyes
slotFlags: EYES
uiWindowPos: 0,3
strippingWindowPos: 0,1
displayName: Eyes
# 1, y
- name: shoes
slotTexture: shoes
slotFlags: FEET
uiWindowPos: 1,0
strippingWindowPos: 1,5
displayName: Shoes
- name: pants
slotTexture: pants
slotFlags: PANTS
uiWindowPos: 1,1
strippingWindowPos: 1,4
displayName: Pants
- name: shirt
slotTexture: shirt
slotFlags: SHIRT
uiWindowPos: 1,2
strippingWindowPos: 1,3
displayName: Shirt
- name: head
slotTexture: head
slotFlags: HEAD
uiWindowPos: 1,3
strippingWindowPos: 1,1
displayName: Head
# 2, y
- name: gloves
slotTexture: gloves
slotFlags: GLOVES
uiWindowPos: 2,0
strippingWindowPos: 0,2
displayName: Gloves
- name: cloak
slotTexture: cloak
slotFlags: CLOAK
uiWindowPos: 2,2
strippingWindowPos: 2,2
displayName: Cloak
- name: mask
slotTexture: mask
slotFlags: MASK
uiWindowPos: 2,3
strippingWindowPos: 2,1
displayName: Mask
# Main hotbar
- name: belt1
slotTexture: belt
slotFlags: BELT
slotGroup: SecondHotbar
uiWindowPos: 0,0
strippingWindowPos: 0,4
dependsOn: pants
displayName: Belt
- name: keys
slotTexture: keys
slotFlags: KEYS
slotGroup: SecondHotbar
uiWindowPos: 0,0
strippingWindowPos: 2,5
dependsOn: pants
displayName: Keys
stripHidden: true
- name: back
slotTexture: back
slotFlags: BACK
slotGroup: SecondHotbar
uiWindowPos: 0,0
strippingWindowPos: 0,5
displayName: Back
# Right hand
# Left hand
- name: belt2
slotTexture: belt
slotFlags: BELT
slotGroup: MainHotbar
uiWindowPos: 2,0
strippingWindowPos: 2,4
dependsOn: pants
displayName: Belt

View File

@@ -0,0 +1,26 @@
- type: constructionGraph
id: CP14Mannequin
start: start
graph:
- node: start
actions:
- !type:DestroyEntity {}
edges:
- to: CP14mannequin
completed:
- !type:SnapToGrid { }
steps:
- material: CP14WoodenPlanks
amount: 5
doAfter: 3
- node: CP14mannequin
entity: CP14Mannequin
edges:
- to: start
completed:
- !type:SpawnPrototype
prototype: CP14WoodenPlanks1
amount: 5
steps:
- tool: CP14Hammering
doAfter: 3

View File

@@ -88,4 +88,23 @@
placementMode: SnapgridCenter
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked
- !type:TileNotBlocked
- type: construction
crystallPunkAllowed: true
id: CP14Mannequin
name: mannequin
description: Wooden mannequin designed for clothing displaying.
graph: CP14Mannequin
startNode: start
targetNode: CP14mannequin
category: construction-category-furniture
icon:
sprite: _CP14/Structures/Decoration/mannequin.rsi
state: mannequin
objectType: Structure
placementMode: SnapgridCenter
canRotate: true
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -0,0 +1,15 @@
{
"version": 1,
"license": "All rights reserved for the CrystallPunk14 project only",
"copyright": "Created by TheShuEd (Github) for CrystallPunk14",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "mannequin",
"directions": 4
}
]
}