Genpop wall lockers (#38102)

* sprites

* genpop wall lockers

* number 5 alive

* slight boilerplate code, thank you slarti
This commit is contained in:
K-Dynamic
2025-06-08 03:51:38 +12:00
committed by GitHub
parent 3ecb0b40a3
commit eb208a2ae8
15 changed files with 239 additions and 76 deletions

View File

@@ -1,14 +1,24 @@
using Content.Shared.Security.Components; using Content.Shared.Security.Components;
using Content.Shared.Security.Systems; using Content.Shared.Security.Systems;
using Content.Shared.Wall;
namespace Content.Server.Security; namespace Content.Server.Security;
public sealed class GenpopSystem : SharedGenpopSystem public sealed class GenpopSystem : SharedGenpopSystem
{ {
private const float GenpopIDEjectDistanceFromWall = 1f;
protected override void CreateId(Entity<GenpopLockerComponent> ent, string name, float sentence, string crime) protected override void CreateId(Entity<GenpopLockerComponent> ent, string name, float sentence, string crime)
{ {
// Default to prisoner locker coordinates for ID spawn
var xform = Transform(ent); var xform = Transform(ent);
var uid = Spawn(ent.Comp.IdCardProto, xform.Coordinates); var spawnCoordinates = xform.Coordinates;
// Offset prisoner wall locker coordinates in wallmount direction for ID spawn; avoids spawning ID inside wall
if (TryComp<WallMountComponent>(ent, out var wallMountComponent))
{
var offset = (wallMountComponent.Direction + xform.LocalRotation - Math.PI / 2).ToVec() * GenpopIDEjectDistanceFromWall;
spawnCoordinates = spawnCoordinates.Offset(offset);
}
var uid = Spawn(ent.Comp.IdCardProto, spawnCoordinates);
ent.Comp.LinkedId = uid; ent.Comp.LinkedId = uid;
IdCard.TryChangeFullName(uid, name); IdCard.TryChangeFullName(uid, name);

View File

@@ -398,11 +398,8 @@
# Genpop Storage # Genpop Storage
- type: entity - type: entity
id: LockerPrisoner id: GenpopBase
parent: LockerBaseSecure abstract: true
name: prisoner closet
description: It's a secure locker for an inmate's personal belongings during their time in prison.
suffix: 1
components: components:
- type: GenpopLocker - type: GenpopLocker
- type: EntityStorageVisuals - type: EntityStorageVisuals
@@ -418,6 +415,19 @@
- type: Lock - type: Lock
locked: false locked: false
useAccess: false useAccess: false
- type: EntityStorage
open: True
removedMasks: 20
- type: PlaceableSurface
isPlaceable: True
- type: entity
parent: [ GenpopBase , LockerBaseSecure ]
id: LockerPrisoner
name: prisoner closet
description: It's a secure locker for an inmate's personal belongings during their time in prison.
suffix: 1
components:
- type: Fixtures - type: Fixtures
fixtures: fixtures:
fix1: fix1:
@@ -439,63 +449,58 @@
hard: True hard: True
restitution: 0 restitution: 0
friction: 0.4 friction: 0.4
- type: EntityStorage
open: True
removedMasks: 20
- type: PlaceableSurface
isPlaceable: True
- type: entity - type: entity
id: LockerPrisoner2
parent: LockerPrisoner parent: LockerPrisoner
id: LockerPrisoner2
suffix: 2 suffix: 2
components: components:
- type: EntityStorageVisuals - type: EntityStorageVisuals
stateDoorClosed: genpop_door_2 stateDoorClosed: genpop_door_2
- type: entity - type: entity
id: LockerPrisoner3
parent: LockerPrisoner parent: LockerPrisoner
id: LockerPrisoner3
suffix: 3 suffix: 3
components: components:
- type: EntityStorageVisuals - type: EntityStorageVisuals
stateDoorClosed: genpop_door_3 stateDoorClosed: genpop_door_3
- type: entity - type: entity
id: LockerPrisoner4
parent: LockerPrisoner parent: LockerPrisoner
id: LockerPrisoner4
suffix: 4 suffix: 4
components: components:
- type: EntityStorageVisuals - type: EntityStorageVisuals
stateDoorClosed: genpop_door_4 stateDoorClosed: genpop_door_4
- type: entity - type: entity
id: LockerPrisoner5
parent: LockerPrisoner parent: LockerPrisoner
id: LockerPrisoner5
suffix: 5 suffix: 5
components: components:
- type: EntityStorageVisuals - type: EntityStorageVisuals
stateDoorClosed: genpop_door_5 stateDoorClosed: genpop_door_5
- type: entity - type: entity
id: LockerPrisoner6
parent: LockerPrisoner parent: LockerPrisoner
id: LockerPrisoner6
suffix: 6 suffix: 6
components: components:
- type: EntityStorageVisuals - type: EntityStorageVisuals
stateDoorClosed: genpop_door_6 stateDoorClosed: genpop_door_6
- type: entity - type: entity
id: LockerPrisoner7
parent: LockerPrisoner parent: LockerPrisoner
id: LockerPrisoner7
suffix: 7 suffix: 7
components: components:
- type: EntityStorageVisuals - type: EntityStorageVisuals
stateDoorClosed: genpop_door_7 stateDoorClosed: genpop_door_7
- type: entity - type: entity
id: LockerPrisoner8
parent: LockerPrisoner parent: LockerPrisoner
id: LockerPrisoner8
suffix: 8 suffix: 8
components: components:
- type: EntityStorageVisuals - type: EntityStorageVisuals

View File

@@ -195,6 +195,11 @@
SheetSteel1: SheetSteel1:
min: 1 min: 1
max: 1 max: 1
- type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: generic
stateDoorOpen: generic_open
stateDoorClosed: generic_door
- type: Construction - type: Construction
graph: ClosetWall graph: ClosetWall
node: done node: done

View File

@@ -4,7 +4,6 @@
name: maintenance wall closet name: maintenance wall closet
description: It's a storage unit. description: It's a storage unit.
components: components:
- type: Appearance
- type: EntityStorageVisuals - type: EntityStorageVisuals
stateBaseClosed: generic stateBaseClosed: generic
stateDoorOpen: generic_open stateDoorOpen: generic_open
@@ -16,7 +15,6 @@
parent: BaseWallCloset parent: BaseWallCloset
description: It's a storage unit for emergency breath masks and O2 tanks. description: It's a storage unit for emergency breath masks and O2 tanks.
components: components:
- type: Appearance
- type: EntityStorageVisuals - type: EntityStorageVisuals
stateBaseClosed: emergency stateBaseClosed: emergency
stateDoorOpen: emergency_open stateDoorOpen: emergency_open
@@ -28,7 +26,6 @@
name: emergency nitrogen wall closet name: emergency nitrogen wall closet
description: It's full of life-saving equipment. Assuming, that is, that you breathe nitrogen. description: It's full of life-saving equipment. Assuming, that is, that you breathe nitrogen.
components: components:
- type: Appearance
- type: EntityStorageVisuals - type: EntityStorageVisuals
stateBaseClosed: n2 stateBaseClosed: n2
stateDoorOpen: n2_open stateDoorOpen: n2_open
@@ -40,7 +37,6 @@
parent: BaseWallCloset parent: BaseWallCloset
description: It's a storage unit for fire-fighting supplies. description: It's a storage unit for fire-fighting supplies.
components: components:
- type: Appearance
- type: EntityStorageVisuals - type: EntityStorageVisuals
stateBaseClosed: fire stateBaseClosed: fire
stateDoorOpen: fire_open stateDoorOpen: fire_open
@@ -52,7 +48,6 @@
name: blue wall closet name: blue wall closet
description: "A wardrobe packed with stylish blue clothing." description: "A wardrobe packed with stylish blue clothing."
components: components:
- type: Appearance
- type: EntityStorageVisuals - type: EntityStorageVisuals
stateBaseClosed: generic stateBaseClosed: generic
stateDoorOpen: generic_open stateDoorOpen: generic_open
@@ -64,7 +59,6 @@
name: pink wall closet name: pink wall closet
description: "A wardrobe packed with fabulous pink clothing." description: "A wardrobe packed with fabulous pink clothing."
components: components:
- type: Appearance
- type: EntityStorageVisuals - type: EntityStorageVisuals
stateBaseClosed: generic stateBaseClosed: generic
stateDoorOpen: generic_open stateDoorOpen: generic_open
@@ -76,7 +70,6 @@
name: black wall closet name: black wall closet
description: "A wardrobe packed with stylish black clothing." description: "A wardrobe packed with stylish black clothing."
components: components:
- type: Appearance
- type: EntityStorageVisuals - type: EntityStorageVisuals
stateBaseClosed: generic stateBaseClosed: generic
stateDoorOpen: generic_open stateDoorOpen: generic_open
@@ -88,7 +81,6 @@
name: green wall closet name: green wall closet
description: "A wardrobe packed with stylish green clothing." description: "A wardrobe packed with stylish green clothing."
components: components:
- type: Appearance
- type: EntityStorageVisuals - type: EntityStorageVisuals
stateBaseClosed: generic stateBaseClosed: generic
stateDoorOpen: generic_open stateDoorOpen: generic_open
@@ -99,7 +91,6 @@
parent: BaseWallCloset parent: BaseWallCloset
name: prison wall closet name: prison wall closet
components: components:
- type: Appearance
- type: EntityStorageVisuals - type: EntityStorageVisuals
stateBaseClosed: generic stateBaseClosed: generic
stateDoorOpen: generic_open stateDoorOpen: generic_open
@@ -111,7 +102,6 @@
name: yellow wall closet name: yellow wall closet
description: "A wardrobe packed with stylish yellow clothing." description: "A wardrobe packed with stylish yellow clothing."
components: components:
- type: Appearance
- type: EntityStorageVisuals - type: EntityStorageVisuals
stateBaseClosed: generic stateBaseClosed: generic
stateDoorOpen: generic_open stateDoorOpen: generic_open
@@ -123,7 +113,6 @@
name: white wall closet name: white wall closet
description: "A wardrobe packed with stylish white clothing." description: "A wardrobe packed with stylish white clothing."
components: components:
- type: Appearance
- type: EntityStorageVisuals - type: EntityStorageVisuals
stateBaseClosed: generic stateBaseClosed: generic
stateDoorOpen: generic_open stateDoorOpen: generic_open
@@ -135,7 +124,6 @@
name: grey wall closet name: grey wall closet
description: "A wardrobe packed with a tide of grey clothing." description: "A wardrobe packed with a tide of grey clothing."
components: components:
- type: Appearance
- type: EntityStorageVisuals - type: EntityStorageVisuals
stateBaseClosed: generic stateBaseClosed: generic
stateDoorOpen: generic_open stateDoorOpen: generic_open
@@ -147,7 +135,6 @@
name: mixed wall closet name: mixed wall closet
description: "A wardrobe packed with a mix of colorful clothing." description: "A wardrobe packed with a mix of colorful clothing."
components: components:
- type: Appearance
- type: EntityStorageVisuals - type: EntityStorageVisuals
stateBaseClosed: generic stateBaseClosed: generic
stateDoorOpen: generic_open stateDoorOpen: generic_open
@@ -158,7 +145,6 @@
parent: BaseWallCloset parent: BaseWallCloset
name: atmospherics wall closet name: atmospherics wall closet
components: components:
- type: Appearance
- type: EntityStorageVisuals - type: EntityStorageVisuals
stateBaseClosed: generic stateBaseClosed: generic
stateDoorOpen: generic_open stateDoorOpen: generic_open
@@ -169,7 +155,6 @@
parent: BaseWallLocker parent: BaseWallLocker
name: medical wall locker name: medical wall locker
components: components:
- type: Appearance
- type: EntityStorageVisuals - type: EntityStorageVisuals
stateBaseClosed: med stateBaseClosed: med
stateDoorOpen: med_open stateDoorOpen: med_open
@@ -183,10 +168,72 @@
name: emergency shuttle emergency wall locker name: emergency shuttle emergency wall locker
description: It's emergencies all the way down. description: It's emergencies all the way down.
components: components:
- type: Appearance
- type: EntityStorageVisuals - type: EntityStorageVisuals
stateBaseClosed: eng stateBaseClosed: eng
stateDoorOpen: eng_open stateDoorOpen: eng_open
stateDoorClosed: eng_evac_door stateDoorClosed: eng_evac_door
- type: AccessReader - type: AccessReader
access: [["Engineering"]] access: [["Engineering"]]
- type: entity
parent: [ GenpopBase , BaseWallLocker ]
id: LockerWallBasePrisoner
name: prisoner wall closet
description: It's a secure locker for an inmate's personal belongings during their time in prison.
suffix: 1
- type: entity
parent: LockerWallBasePrisoner
id: LockerWallPrisoner2
suffix: 2
components:
- type: EntityStorageVisuals
stateDoorClosed: genpop_door_2
- type: entity
parent: LockerWallBasePrisoner
id: LockerWallPrisoner3
suffix: 3
components:
- type: EntityStorageVisuals
stateDoorClosed: genpop_door_3
- type: entity
parent: LockerWallBasePrisoner
id: LockerWallPrisoner4
suffix: 4
components:
- type: EntityStorageVisuals
stateDoorClosed: genpop_door_4
- type: entity
parent: LockerWallBasePrisoner
id: LockerWallPrisoner5
suffix: 5
components:
- type: EntityStorageVisuals
stateDoorClosed: genpop_door_5
- type: entity
parent: LockerWallBasePrisoner
id: LockerWallPrisoner6
suffix: 6
components:
- type: EntityStorageVisuals
stateDoorClosed: genpop_door_6
- type: entity
parent: LockerWallBasePrisoner
id: LockerWallPrisoner7
suffix: 7
components:
- type: EntityStorageVisuals
stateDoorClosed: genpop_door_7
- type: entity
parent: LockerWallBasePrisoner
id: LockerWallPrisoner8
suffix: 8
components:
- type: EntityStorageVisuals
stateDoorClosed: genpop_door_8

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 563 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 563 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 561 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 536 B

View File

@@ -1,44 +1,140 @@
{ {
"version": 1, "version": 1,
"license": "CC-BY-SA-3.0", "license": "CC-BY-SA-3.0",
"copyright": "Taken from shiptest at commmit https://github.com/shiptest-ss13/Shiptest/commit/440a15fb476a20d77ba28c1fe315c1b659032ce8, edited by Alekshhh, N2 lockers edited by Lamrr, Evac lockers by EmoGarbage404 (GitHub)", "copyright": "Taken from shiptest at commmit https://github.com/shiptest-ss13/Shiptest/commit/440a15fb476a20d77ba28c1fe315c1b659032ce8, edited by Alekshhh, N2 lockers edited by Lamrr, Evac lockers by EmoGarbage404 (GitHub), genpop* derived from Wizards Den SS14 by K-Dynamic (github)",
"size": { "size": {
"x": 32, "x": 32,
"y": 32 "y": 32
}, },
"states": [ "states": [
{ "name": "atmos_door" }, {
{ "name": "black_door" }, "name": "atmos_door"
{ "name": "blue_door" }, },
{ "name": "emergency" }, {
{ "name": "emergency_door" }, "name": "black_door"
{ "name": "emergency_open" }, },
{ "name": "fire" }, {
{ "name": "fire_door" }, "name": "blue_door"
{ "name": "fire_open" }, },
{ "name": "generic" }, {
{ "name": "generic_door" }, "name": "emergency"
{ "name": "generic_icon" }, },
{ "name": "generic_open" }, {
{ "name": "gray_door" }, "name": "emergency_door"
{ "name": "green_door" }, },
{ "name": "locked" }, {
{ "name": "med" }, "name": "emergency_open"
{ "name": "med_door" }, },
{ "name": "med_open" }, {
{ "name": "mixed_door" }, "name": "fire"
{ "name": "n2" }, },
{ "name": "n2_door" }, {
{ "name": "n2_open" }, "name": "fire_door"
{ "name": "orange_door" }, },
{ "name": "pink_door" }, {
{ "name": "red_door" }, "name": "fire_open"
{ "name": "unlocked" }, },
{ "name": "welded" }, {
{ "name": "white_door" }, "name": "generic"
{ "name": "yellow_door" }, },
{ "name": "eng" }, {
{ "name": "eng_open" }, "name": "generic_door"
{ "name": "eng_evac_door" } },
] {
"name": "generic_icon"
},
{
"name": "generic_open"
},
{
"name": "gray_door"
},
{
"name": "green_door"
},
{
"name": "locked"
},
{
"name": "med"
},
{
"name": "med_door"
},
{
"name": "med_open"
},
{
"name": "mixed_door"
},
{
"name": "n2"
},
{
"name": "n2_door"
},
{
"name": "n2_open"
},
{
"name": "orange_door"
},
{
"name": "pink_door"
},
{
"name": "red_door"
},
{
"name": "unlocked"
},
{
"name": "welded"
},
{
"name": "white_door"
},
{
"name": "yellow_door"
},
{
"name": "eng"
},
{
"name": "eng_open"
},
{
"name": "eng_evac_door"
},
{
"name": "genpop"
},
{
"name": "genpop_open"
},
{
"name": "genpop_door_1"
},
{
"name": "genpop_door_2"
},
{
"name": "genpop_door_3"
},
{
"name": "genpop_door_4"
},
{
"name": "genpop_door_5"
},
{
"name": "genpop_door_6"
},
{
"name": "genpop_door_7"
},
{
"name": "genpop_door_8"
}
]
} }