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);
# 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
- 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:
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
SheetSteel1:
min: 1
max: 1
+ - type: Appearance
+ - type: EntityStorageVisuals
+ stateBaseClosed: generic
+ stateDoorOpen: generic_open
+ stateDoorClosed: generic_door
- type: Construction
graph: ClosetWall
node: done
name: maintenance wall closet
description: It's a storage unit.
components:
- - type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: generic
stateDoorOpen: generic_open
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
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
parent: BaseWallCloset
description: It's a storage unit for fire-fighting supplies.
components:
- - type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: fire
stateDoorOpen: fire_open
name: blue wall closet
description: "A wardrobe packed with stylish blue clothing."
components:
- - type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: generic
stateDoorOpen: generic_open
name: pink wall closet
description: "A wardrobe packed with fabulous pink clothing."
components:
- - type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: generic
stateDoorOpen: generic_open
name: black wall closet
description: "A wardrobe packed with stylish black clothing."
components:
- - type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: generic
stateDoorOpen: generic_open
name: green wall closet
description: "A wardrobe packed with stylish green clothing."
components:
- - type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: generic
stateDoorOpen: generic_open
parent: BaseWallCloset
name: prison wall closet
components:
- - type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: generic
stateDoorOpen: generic_open
name: yellow wall closet
description: "A wardrobe packed with stylish yellow clothing."
components:
- - type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: generic
stateDoorOpen: generic_open
name: white wall closet
description: "A wardrobe packed with stylish white clothing."
components:
- - type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: generic
stateDoorOpen: generic_open
name: grey wall closet
description: "A wardrobe packed with a tide of grey clothing."
components:
- - type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: generic
stateDoorOpen: generic_open
name: mixed wall closet
description: "A wardrobe packed with a mix of colorful clothing."
components:
- - type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: generic
stateDoorOpen: generic_open
parent: BaseWallCloset
name: atmospherics wall closet
components:
- - type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: generic
stateDoorOpen: generic_open
parent: BaseWallLocker
name: medical wall locker
components:
- - type: Appearance
- type: EntityStorageVisuals
stateBaseClosed: med
stateDoorOpen: med_open
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
{
- "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"
+ }
+ ]
}