Refactor how jobs are handed out (#5422)

* Completely refactor how job spawning works

* Remove remains of old system.

* Squash the final bug, cleanup.

* Attempt to fix tests

* Adjusts packed's round-start crew roster, re-enables a bunch of old roles.
Also adds the Central Command Official as a proper role.

* pretty up ui

* refactor StationSystem into the correct folder & namespace.

* remove a log, make sure the lobby gets updated if a new map is spontaneously added.

* re-add accidentally removed log

* We do a little logging

* we do a little resolving

* we do a little documenting

* Renamed OverflowJob to FallbackOverflowJob
Allows stations to configure their own roundstart overflow job list.

* narrator: it did not compile

* oops

* support having no overflow jobs

* filescope for consistency

* small fixes

* Bumps a few role counts for Packed, namely engis

* log moment

* E

* Update Resources/Prototypes/Entities/Objects/Misc/identification_cards.yml

Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>

* Update Content.Server/Maps/GameMapPrototype.cs

Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>

* factored job logic, cleanup.

* e

* Address reviews

* Remove the concept of a "default" grid.
It has no future in our new multi-station world

* why was clickable using that in the first place

* fix bad evil bug that almost slipped through
also adds chemist

* rms obsolete things from chemist

* Adds a sanity fallback

* address reviews

* adds ability to set name

* fuck

* cleanup joingame
This commit is contained in:
Moony
2021-11-26 03:02:46 -06:00
committed by GitHub
parent dfb329d5db
commit ec68226e99
53 changed files with 1148 additions and 705 deletions

View File

@@ -1,3 +1,5 @@
late-join-gui-title = Late Join
late-join-gui-jobs-amount-in-department-tooltip = Jobs in the {$departmentName} department
late-join-gui-department-jobs-label = {$departmentName} jobs
late-join-gui-department-jobs-label = {$departmentName} jobs
late-join-gui-job-slot-capped = {$jobName} ({$amount} open)
late-join-gui-job-slot-uncapped = {$jobName} (No limit)

View File

@@ -98,8 +98,8 @@
idCard: ClownIDCard
penSlot:
startingItem: CrayonOrange # no pink crayon?!?
# Maybe this is a bad idea.
# At least they can't just spam alt-click it.
# Maybe this is a bad idea.
# At least they can't just spam alt-click it.
# You need to remove the ID & alternate between inserting and ejecting
ejectSound: /Audio/Items/bikehorn.ogg
whitelist:
@@ -152,35 +152,35 @@
- type: Icon
state: pda-mime
#- type: entity
# name: Chaplain PDA
# parent: BasePDA
# id: ChaplainPDA
# description: God's chosen PDA.
# components:
# - type: PDA
# idCard: ChaplainIDCard
# - type: Appearance
# visuals:
# - type: PDAVisualizer
# state: pda-chaplain
# - type: Icon
# state: pda-chaplain
- type: entity
name: Chaplain PDA
parent: BasePDA
id: ChaplainPDA
description: God's chosen PDA.
components:
- type: PDA
idCard: ChaplainIDCard
- type: Appearance
visuals:
- type: PDAVisualizer
state: pda-chaplain
- type: Icon
state: pda-chaplain
#- type: entity
# name: Quartermaster PDA
# parent: BasePDA
# id: QuartermasterPDA
# description: PDA for the guy that orders the guns.
# components:
# - type: PDA
# idCard: QuartermasterIDCard
# - type: Appearance
# visuals:
# - type: PDAVisualizer
# state: pda-qm
# - type: Icon
# state: pda-qm
- type: entity
name: Quartermaster PDA
parent: BasePDA
id: QuartermasterPDA
description: PDA for the guy that orders the guns.
components:
- type: PDA
idCard: QuartermasterIDCard
- type: Appearance
visuals:
- type: PDAVisualizer
state: pda-qm
- type: Icon
state: pda-qm
- type: entity
parent: BasePDA
@@ -291,7 +291,6 @@
- type: Icon
state: pda-engineer
- type: entity
parent: BasePDA
id: CMOPDA
@@ -382,20 +381,20 @@
- type: Icon
state: pda-hos
# - type: entity
# parent: BasePDA
# id: WardenPDA
# name: warden PDA
# description: The OS appears to have been jailbroken.
# components:
# - type: PDA
# idCard: WardenIDCard
# - type: Appearance
# visuals:
# - type: PDAVisualizer
# state: pda-warden
# - type: Icon
# state: pda-warden
- type: entity
parent: BasePDA
id: WardenPDA
name: warden PDA
description: The OS appears to have been jailbroken.
components:
- type: PDA
idCard: WardenIDCard
- type: Appearance
visuals:
- type: PDAVisualizer
state: pda-warden
- type: Icon
state: pda-warden
- type: entity
parent: BasePDA

View File

@@ -56,17 +56,17 @@
- type: PresetIdCard
job: SecurityOfficer
# - type: entity
# parent: IDCardStandard
# id: WardenIDCard
# name: warden ID card
# components:
# - type: Sprite
# layers:
# - state: default
# - state: idwarden
# - type: PresetIdCard
# job: Warden
- type: entity
parent: IDCardStandard
id: WardenIDCard
name: warden ID card
components:
- type: Sprite
layers:
- state: default
- state: idwarden
- type: PresetIdCard
job: Warden
- type: entity
parent: IDCardStandard
@@ -116,17 +116,17 @@
- type: PresetIdCard
job: CargoTechnician
#- type: entity
# parent: IDCardStandard
# id: QuartermasterIDCard
# name: quartermaster ID card
# components:
# - type: Sprite
# layers:
# - state: default
# - state: idquartermaster
# - type: PresetIdCard
# job: Quartermaster
- type: entity
parent: IDCardStandard
id: QuartermasterIDCard
name: quartermaster ID card
components:
- type: Sprite
layers:
- state: default
- state: idquartermaster
- type: PresetIdCard
job: Quartermaster
- type: entity
parent: IDCardStandard
@@ -164,19 +164,17 @@
- type: PresetIdCard
job: Mime
#- type: entity
# parent: IDCardStandard
# id: ChaplainIDCard
# name: chaplain ID card
# components:
# - type: Sprite
# layers:
# - state: default
#
# - state: idchaplain
#
# - type: PresetIdCard
# job: Chaplain
- type: entity
parent: IDCardStandard
id: ChaplainIDCard
name: chaplain ID card
components:
- type: Sprite
layers:
- state: default
- state: idchaplain
- type: PresetIdCard
job: Chaplain
- type: entity
parent: IDCardStandard

View File

@@ -5,12 +5,57 @@
minPlayers: 0
maxPlayers: 20
fallback: true
overflowJobs:
- Assistant
availableJobs:
CargoTechnician: [ 1, 2 ]
Assistant: [ -1, -1 ]
Bartender: [ 1, 1 ]
Botanist: [ 2, 2 ]
Chef: [ 1, 1 ]
Clown: [ 1, 1 ]
Janitor: [ 1, 1 ]
Mime: [ 1, 1 ]
Captain: [ 1, 1 ]
HeadOfPersonnel: [ 1, 1 ]
ChiefEngineer: [ 1, 1 ]
StationEngineer: [ 2, 3 ]
ChiefMedicalOfficer: [ 1, 1 ]
MedicalDoctor: [ 2, 3 ]
Chemist: [ 1, 1 ]
ResearchDirector: [ 1, 1 ]
Scientist: [ 2, 3 ]
HeadOfSecurity: [ 1, 1 ]
SecurityOfficer: [ 2, 3 ]
- type: gameMap
id: packedstation
mapName: Packedstation
mapPath: Maps/packedstation.yml
minPlayers: 15
overflowJobs:
- Assistant
availableJobs:
CargoTechnician: [ 2, 3 ]
Assistant: [ -1, -1 ]
Bartender: [ 1, 1 ]
Botanist: [ 2, 2 ]
Chef: [ 1, 1 ]
Clown: [ 1, 1 ]
Janitor: [ 1, 1 ]
Mime: [ 1, 1 ]
Captain: [ 1, 1 ]
HeadOfPersonnel: [ 1, 1 ]
ChiefEngineer: [ 1, 1 ]
StationEngineer: [ 4, 6 ]
ChiefMedicalOfficer: [ 1, 1 ]
MedicalDoctor: [ 3, 4 ]
Chemist: [ 2, 2 ]
ResearchDirector: [ 1, 1 ]
Scientist: [ 3, 4 ]
HeadOfSecurity: [ 1, 1 ]
SecurityOfficer: [ 2, 3 ]
Chaplain: [ 1, 1 ]
- type: gameMap
id: knightship
@@ -18,3 +63,13 @@
mapPath: Maps/knightship.yml
minPlayers: 0
maxPlayers: 8
overflowJobs: []
availableJobs:
Bartender: [ 1, 1 ]
Captain: [ 1, 1 ]
ChiefEngineer: [ 1, 1 ]
StationEngineer: [ 1, 1 ]
ChiefMedicalOfficer: [ 1, 1 ]
MedicalDoctor: [ 1, 1 ]
ResearchDirector: [ 1, 1 ]
Botanist: [ 1, 1 ]

View File

@@ -3,5 +3,8 @@
mapName: Empty
mapPath: Maps/Test/empty.yml
minPlayers: 0
maxPlayers: 0
votable: false
overflowJobs:
- Assistant
availableJobs:
Assistant: [ -1, -1 ]

View File

@@ -1,8 +1,6 @@
- type: job
id: CargoTechnician
name: "cargo technician"
positions: 2
spawnPositions: 1
startingGear: CargoTechGear
departments:
- Cargo

View File

@@ -1,27 +1,25 @@
#- type: job
# id: Quartermaster
# name: "quartermaster"
# positions: 1
# spawnPositions: 1
# startingGear: QuartermasterGear
# departments:
# - Cargo
# icon: "QuarterMaster"
# supervisors: "the head of personnel"
# access:
# - Cargo
# - Quartermaster
# - Maintenance
#
#- type: startingGear
# id: QuartermasterGear
# equipment:
# head: ClothingHeadHatCargosoft
# innerclothing: ClothingUniformJumpsuitQM
# backpack: ClothingBackpackFilled
# shoes: ClothingShoesColorBrown
# idcard: QuartermasterPDA
# ears: ClothingHeadsetCargo
# innerclothingskirt: ClothingUniformJumpskirtQM
# satchel: ClothingBackpackSatchelFilled
# duffelbag: ClothingBackpackDuffelFilled
- type: job
id: Quartermaster
name: "quartermaster"
startingGear: QuartermasterGear
departments:
- Cargo
icon: "QuarterMaster"
supervisors: "the head of personnel"
access:
- Cargo
- Quartermaster
- Maintenance
- type: startingGear
id: QuartermasterGear
equipment:
head: ClothingHeadHatCargosoft
innerclothing: ClothingUniformJumpsuitQM
backpack: ClothingBackpackFilled
shoes: ClothingShoesColorBrown
idcard: QuartermasterPDA
ears: ClothingHeadsetCargo
innerclothingskirt: ClothingUniformJumpskirtQM
satchel: ClothingBackpackSatchelFilled
duffelbag: ClothingBackpackDuffelFilled

View File

@@ -1,7 +1,6 @@
- type: job
id: Assistant
name: "assistant"
positions: -1 # Treated as infinite.
startingGear: AssistantGear
departments:
- Civilian

View File

@@ -1,7 +1,6 @@
- type: job
id: Bartender
name: "bartender"
positions: 1
startingGear: BartenderGear
departments:
- Civilian

View File

@@ -1,8 +1,6 @@
- type: job
id: Botanist
name: "botanist"
positions: 2
spawnPositions: 2
startingGear: BotanistGear
departments:
- Civilian

View File

@@ -1,22 +1,21 @@
#- type: job
# id: Chaplain
# name: "chaplain"
# positions: 1
# startingGear: ChaplainGear
# departments:
# - Civilian
# icon: "Chaplain"
# supervisors: "the head of personnel"
# access:
# - Chapel
# - Maintenance
#- type: startingGear
# id: ChaplainGear
# equipment:
# innerclothing: ClothingUniformJumpsuitChaplain
# backpack: ClothingBackpack
# shoes: ClothingShoesColorBlack
# idcard: ChaplainPDA
# ears: ClothingHeadsetService
# innerclothingskirt: ClothingUniformJumpskirtChaplain
- type: job
id: Chaplain
name: "chaplain"
startingGear: ChaplainGear
departments:
- Civilian
icon: "Chaplain"
supervisors: "the head of personnel"
access:
- Chapel
- Maintenance
- type: startingGear
id: ChaplainGear
equipment:
innerclothing: ClothingUniformJumpsuitChaplain
backpack: ClothingBackpack
shoes: ClothingShoesColorBlack
idcard: ChaplainPDA
ears: ClothingHeadsetService
innerclothingskirt: ClothingUniformJumpskirtChaplain

View File

@@ -1,7 +1,6 @@
- type: job
id: Chef
name: "chef"
positions: 1
startingGear: ChefGear
departments:
- Civilian

View File

@@ -1,7 +1,6 @@
- type: job
id: Clown
name: "clown"
positions: 1
startingGear: ClownGear
departments:
- Civilian

View File

@@ -1,7 +1,6 @@
- type: job
id: Janitor
name: "janitor"
positions: 1
startingGear: JanitorGear
departments:
- Civilian

View File

@@ -1,7 +1,6 @@
- type: job
id: Mime
name: "mime"
positions: 1
startingGear: MimeGear
departments:
- Civilian

View File

@@ -2,7 +2,6 @@
id: Captain
name: "captain"
head: true
positions: 1
startingGear: CaptainGear
departments:
- Command

View File

@@ -1,3 +1,15 @@
- type: job
id: CentralCommandOffical
name: "centcom official"
startingGear: CentcomGear
departments:
- Command
icon: "Nanotrasen"
supervisors: "the head of security"
access:
- Command
- Maintenence
- type: startingGear
id: CentcomGear
equipment:

View File

@@ -1,7 +1,6 @@
- type: job
id: HeadOfPersonnel
name: "head of personnel"
positions: 1
startingGear: HoPGear
departments:
- Command

View File

@@ -2,7 +2,6 @@
id: ChiefEngineer
name: "chief engineer"
head: true
positions: 1
startingGear: ChiefEngineerGear
departments:
- Command

View File

@@ -1,8 +1,6 @@
- type: job
id: StationEngineer
name: "station engineer"
positions: 3
spawnPositions: 2
startingGear: StationEngineerGear
departments:
- Engineering

View File

@@ -1,8 +1,6 @@
- type: job
id: Chemist
name: "chemist"
positions: 2
spawnPositions: 2
startingGear: ChemistGear
departments:
- Medical

View File

@@ -4,7 +4,6 @@
id: ChiefMedicalOfficer
name: "chief medical officer"
head: true
positions: 1
startingGear: CMOGear
departments:
- Command

View File

@@ -1,8 +1,6 @@
- type: job
id: MedicalDoctor
name: "medical doctor"
positions: 3
spawnPositions: 2
startingGear: DoctorGear
departments:
- Medical

View File

@@ -2,7 +2,6 @@
id: ResearchDirector
name: "research director"
head: true
positions: 1
startingGear: ResearchDirectorGear
departments:
- Command

View File

@@ -1,8 +1,6 @@
- type: job
id: Scientist
name: "scientist"
positions: 3
spawnPositions: 2
startingGear: ScientistGear
departments:
- Science

View File

@@ -2,7 +2,6 @@
id: HeadOfSecurity
name: "head of security"
head: true
positions: 1
startingGear: HoSGear
departments:
- Command

View File

@@ -1,8 +1,6 @@
- type: job
id: SecurityOfficer
name: "security officer"
positions: 3
spawnPositions: 2
startingGear: SecurityOfficerGear
departments:
- Security

View File

@@ -1,31 +1,29 @@
# - type: job
# id: Warden
# name: "warden"
# positions: 1
# spawnPositions: 1
# startingGear: WardenGear
# departments:
# - Security
# icon: "Warden"
# supervisors: "the head of security"
# access:
# - Security
# - Brig
# - Maintenance
# - Service
#
# - type: startingGear
# id: WardenGear
# equipment:
# head: ClothingHeadHatWarden
# innerclothing: ClothingUniformJumpsuitWarden
# backpack: ClothingBackpackSecurityFilled
# shoes: ClothingShoesBootsJack
# eyes: ClothingEyesGlassesSecurity
# outerclothing: ClothingOuterCoatWarden
# idcard: WardenPDA
# ears: ClothingHeadsetSecurity
# belt: ClothingBeltSecurityFilled
# innerclothingskirt: ClothingUniformJumpskirtWarden
# satchel: ClothingBackpackSatchelSecurityFilled
# duffelbag: ClothingBackpackDuffelSecurityFilled
- type: job
id: Warden
name: "warden"
startingGear: WardenGear
departments:
- Security
icon: "Warden"
supervisors: "the head of security"
access:
- Security
- Brig
- Maintenance
- Service
- type: startingGear
id: WardenGear
equipment:
head: ClothingHeadHatWarden
innerclothing: ClothingUniformJumpsuitWarden
backpack: ClothingBackpackSecurityFilled
shoes: ClothingShoesBootsJack
eyes: ClothingEyesGlassesSecurity
outerclothing: ClothingOuterCoatWarden
idcard: WardenPDA
ears: ClothingHeadsetSecurity
belt: ClothingBeltSecurityFilled
innerclothingskirt: ClothingUniformJumpskirtWarden
satchel: ClothingBackpackSatchelSecurityFilled
duffelbag: ClothingBackpackDuffelSecurityFilled