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.Systems;
using Content.Shared.Wall;
namespace Content.Server.Security;
public sealed class GenpopSystem : SharedGenpopSystem
{
private const float GenpopIDEjectDistanceFromWall = 1f;
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 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;
IdCard.TryChangeFullName(uid, name);

View File

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

View File

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

View File

@@ -4,7 +4,6 @@
name: maintenance wall closet
description: It's a storage unit.
components:
- type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: generic
stateDoorOpen: generic_open
@@ -16,7 +15,6 @@
parent: BaseWallCloset
description: It's a storage unit for emergency breath masks and O2 tanks.
components:
- type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: emergency
stateDoorOpen: emergency_open
@@ -28,7 +26,6 @@
name: emergency nitrogen wall closet
description: It's full of life-saving equipment. Assuming, that is, that you breathe nitrogen.
components:
- type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: n2
stateDoorOpen: n2_open
@@ -40,7 +37,6 @@
parent: BaseWallCloset
description: It's a storage unit for fire-fighting supplies.
components:
- type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: fire
stateDoorOpen: fire_open
@@ -52,7 +48,6 @@
name: blue wall closet
description: "A wardrobe packed with stylish blue clothing."
components:
- type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: generic
stateDoorOpen: generic_open
@@ -64,7 +59,6 @@
name: pink wall closet
description: "A wardrobe packed with fabulous pink clothing."
components:
- type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: generic
stateDoorOpen: generic_open
@@ -76,7 +70,6 @@
name: black wall closet
description: "A wardrobe packed with stylish black clothing."
components:
- type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: generic
stateDoorOpen: generic_open
@@ -88,7 +81,6 @@
name: green wall closet
description: "A wardrobe packed with stylish green clothing."
components:
- type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: generic
stateDoorOpen: generic_open
@@ -99,7 +91,6 @@
parent: BaseWallCloset
name: prison wall closet
components:
- type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: generic
stateDoorOpen: generic_open
@@ -111,7 +102,6 @@
name: yellow wall closet
description: "A wardrobe packed with stylish yellow clothing."
components:
- type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: generic
stateDoorOpen: generic_open
@@ -123,7 +113,6 @@
name: white wall closet
description: "A wardrobe packed with stylish white clothing."
components:
- type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: generic
stateDoorOpen: generic_open
@@ -135,7 +124,6 @@
name: grey wall closet
description: "A wardrobe packed with a tide of grey clothing."
components:
- type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: generic
stateDoorOpen: generic_open
@@ -147,7 +135,6 @@
name: mixed wall closet
description: "A wardrobe packed with a mix of colorful clothing."
components:
- type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: generic
stateDoorOpen: generic_open
@@ -158,7 +145,6 @@
parent: BaseWallCloset
name: atmospherics wall closet
components:
- type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: generic
stateDoorOpen: generic_open
@@ -169,7 +155,6 @@
parent: BaseWallLocker
name: medical wall locker
components:
- type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: med
stateDoorOpen: med_open
@@ -183,10 +168,72 @@
name: emergency shuttle emergency wall locker
description: It's emergencies all the way down.
components:
- type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: eng
stateDoorOpen: eng_open
stateDoorClosed: eng_evac_door
- type: AccessReader
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,
"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)",
"size": {
"x": 32,
"y": 32
},
"states": [
{ "name": "atmos_door" },
{ "name": "black_door" },
{ "name": "blue_door" },
{ "name": "emergency" },
{ "name": "emergency_door" },
{ "name": "emergency_open" },
{ "name": "fire" },
{ "name": "fire_door" },
{ "name": "fire_open" },
{ "name": "generic" },
{ "name": "generic_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" }
]
"version": 1,
"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), genpop* derived from Wizards Den SS14 by K-Dynamic (github)",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "atmos_door"
},
{
"name": "black_door"
},
{
"name": "blue_door"
},
{
"name": "emergency"
},
{
"name": "emergency_door"
},
{
"name": "emergency_open"
},
{
"name": "fire"
},
{
"name": "fire_door"
},
{
"name": "fire_open"
},
{
"name": "generic"
},
{
"name": "generic_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"
}
]
}