Skip to content

Commit

Permalink
Removes SSJob (Brutally) (#2127)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

SSJob is a vestigial part of the codebase, quickly bandaged to support
our system. I've slowly stripped it away, but I left it in because it
was rooted deeply in a few pieces of code. Today I finally just decided
to rip that out too, since SSjob is continuing to break things to this
day.

Removes:
- SSjob, replacing it with three global lists
- Job datum slot counts
- Gang gamemode (nonfunctional)
- Revs gamemode (nonfunctional)
- Families gamemode (could you ever call this functional)

Adds:
- Display order support for crew consoles, based on either job datum or
order in the .json file
- Returning someone from ajail returns them to their original ship

## Why It's Good For The Game

SSJob breaks a lot, and just isn't used. This is another piece of global
state that's being removed and replaced with something that better fits
us.

## Changelog

:cl:
del: Gang and revs gamemode (the gear remains)
admin: Removes SSjob, occupations are now stored in a global list
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
  • Loading branch information
MarkSuckerberg authored Sep 14, 2023
1 parent 8f756f2 commit 5dc5ca1
Show file tree
Hide file tree
Showing 99 changed files with 196 additions and 2,436 deletions.
84 changes: 46 additions & 38 deletions code/__DEFINES/jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,50 @@
#define DEFAULT_RELIGION "Christianity"
#define DEFAULT_DEITY "Space Jesus"

#define JOB_DISPLAY_ORDER_DEFAULT 0

#define JOB_DISPLAY_ORDER_ASSISTANT 1
#define JOB_DISPLAY_ORDER_CAPTAIN 2
#define JOB_DISPLAY_ORDER_HEAD_OF_PERSONNEL 3
#define JOB_DISPLAY_ORDER_SOLGOV 3.5
#define JOB_DISPLAY_ORDER_QUARTERMASTER 4
#define JOB_DISPLAY_ORDER_CARGO_TECHNICIAN 5
#define JOB_DISPLAY_ORDER_SHAFT_MINER 6
#define JOB_DISPLAY_ORDER_BARTENDER 7
#define JOB_DISPLAY_ORDER_COOK 8
#define JOB_DISPLAY_ORDER_BOTANIST 9
#define JOB_DISPLAY_ORDER_JANITOR 10
#define JOB_DISPLAY_ORDER_CLOWN 11
#define JOB_DISPLAY_ORDER_MIME 12
#define JOB_DISPLAY_ORDER_CURATOR 13
#define JOB_DISPLAY_ORDER_LAWYER 14
#define JOB_DISPLAY_ORDER_CHAPLAIN 15
#define JOB_DISPLAY_ORDER_AI 16
#define JOB_DISPLAY_ORDER_CYBORG 17
#define JOB_DISPLAY_ORDER_CHIEF_ENGINEER 18
#define JOB_DISPLAY_ORDER_STATION_ENGINEER 19
#define JOB_DISPLAY_ORDER_ATMOSPHERIC_TECHNICIAN 20
#define JOB_DISPLAY_ORDER_CHIEF_MEDICAL_OFFICER 21
#define JOB_DISPLAY_ORDER_MEDICAL_DOCTOR 22
#define JOB_DISPLAY_ORDER_CAPTAIN 0
#define JOB_DISPLAY_ORDER_HEAD_OF_PERSONNEL 1
#define JOB_DISPLAY_ORDER_SOLGOV 2

#define JOB_DISPLAY_ORDER_HEAD_OF_SECURITY 10
#define JOB_DISPLAY_ORDER_WARDEN 11
#define JOB_DISPLAY_ORDER_DETECTIVE 12
#define JOB_DISPLAY_ORDER_SECURITY_OFFICER 13
#define JOB_DISPLAY_ORDER_BRIG_PHYS 14

#define JOB_DISPLAY_ORDER_CHIEF_MEDICAL_OFFICER 20
#define JOB_DISPLAY_ORDER_CHEMIST 21
#define JOB_DISPLAY_ORDER_VIROLOGIST 22
#define JOB_DISPLAY_ORDER_PARAMEDIC 23
#define JOB_DISPLAY_ORDER_CHEMIST 24
#define JOB_DISPLAY_ORDER_VIROLOGIST 25
#define JOB_DISPLAY_ORDER_PSYCHOLOGIST 26
#define JOB_DISPLAY_ORDER_RESEARCH_DIRECTOR 27
#define JOB_DISPLAY_ORDER_SCIENTIST 28
#define JOB_DISPLAY_ORDER_ROBOTICIST 29
#define JOB_DISPLAY_ORDER_GENETICIST 30
#define JOB_DISPLAY_ORDER_HEAD_OF_SECURITY 31
#define JOB_DISPLAY_ORDER_WARDEN 32
#define JOB_DISPLAY_ORDER_DETECTIVE 33
#define JOB_DISPLAY_ORDER_SECURITY_OFFICER 34
#define JOB_DISPLAY_ORDER_BRIG_PHYS 35
#define JOB_DISPLAY_ORDER_PRISONER 36
#define JOB_DISPLAY_ORDER_MEDICAL_DOCTOR 24
#define JOB_DISPLAY_ORDER_PSYCHOLOGIST 25

#define JOB_DISPLAY_ORDER_RESEARCH_DIRECTOR 30
#define JOB_DISPLAY_ORDER_SCIENTIST 31
#define JOB_DISPLAY_ORDER_ROBOTICIST 32
#define JOB_DISPLAY_ORDER_GENETICIST 33

#define JOB_DISPLAY_ORDER_CHIEF_ENGINEER 40
#define JOB_DISPLAY_ORDER_STATION_ENGINEER 41
#define JOB_DISPLAY_ORDER_ATMOSPHERIC_TECHNICIAN 42

#define JOB_DISPLAY_ORDER_QUARTERMASTER 50
#define JOB_DISPLAY_ORDER_CARGO_TECHNICIAN 51
#define JOB_DISPLAY_ORDER_SHAFT_MINER 52

#define JOB_DISPLAY_ORDER_BARTENDER 60
#define JOB_DISPLAY_ORDER_COOK 61
#define JOB_DISPLAY_ORDER_BOTANIST 62
#define JOB_DISPLAY_ORDER_JANITOR 63
#define JOB_DISPLAY_ORDER_CLOWN 64
#define JOB_DISPLAY_ORDER_MIME 65
#define JOB_DISPLAY_ORDER_CURATOR 66
#define JOB_DISPLAY_ORDER_LAWYER 67
#define JOB_DISPLAY_ORDER_CHAPLAIN 68
#define JOB_DISPLAY_ORDER_AI 69
#define JOB_DISPLAY_ORDER_CYBORG 70

#define JOB_DISPLAY_ORDER_PRISONER 75

#define JOB_DISPLAY_ORDER_DEFAULT 80

#define JOB_DISPLAY_ORDER_ASSISTANT 999
2 changes: 0 additions & 2 deletions code/__DEFINES/role_preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ GLOBAL_LIST_INIT(special_roles, list(
ROLE_CHANGELING = /datum/game_mode/changeling,
ROLE_WIZARD = /datum/game_mode/wizard,
ROLE_MALF,
ROLE_REV = /datum/game_mode/revolution,
ROLE_ALIEN,
ROLE_PAI,
ROLE_CULTIST = /datum/game_mode/cult,
Expand All @@ -66,7 +65,6 @@ GLOBAL_LIST_INIT(special_roles, list(
ROLE_DEVIL = /datum/game_mode/devil,
ROLE_INTERNAL_AFFAIRS = /datum/game_mode/traitor/internal_affairs,
ROLE_SENTIENCE,
ROLE_FAMILIES = /datum/game_mode/gang,
ROLE_BORER
))

Expand Down
1 change: 0 additions & 1 deletion code/__HELPERS/game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,6 @@ block( \

//First we spawn a dude.
var/mob/living/carbon/human/new_character = new//The mob being spawned.
SSjob.SendToLateJoin(new_character)

G_found.client.prefs.copy_to(new_character)
new_character.dna.update_dna_identity()
Expand Down
7 changes: 7 additions & 0 deletions code/__HELPERS/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@
GLOB.materials_list[D.id] = D
sortList(GLOB.materials_list, /proc/cmp_typepaths_asc)

//Default Jobs
for(var/path in subtypesof(/datum/job))
var/datum/job/new_job = new path()
GLOB.occupations += new_job
GLOB.name_occupations[new_job.name] = new_job
GLOB.type_occupations[path] = new_job

// Keybindings
init_keybindings()

Expand Down
3 changes: 3 additions & 0 deletions code/_globalvars/lists/jobs.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
GLOBAL_LIST_EMPTY(occupations)
GLOBAL_LIST_EMPTY(name_occupations)
GLOBAL_LIST_EMPTY(type_occupations)
29 changes: 0 additions & 29 deletions code/_onclick/hud/families.dm

This file was deleted.

5 changes: 0 additions & 5 deletions code/_onclick/hud/hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
var/atom/movable/screen/healths
var/atom/movable/screen/healthdoll
var/atom/movable/screen/internals
var/atom/movable/screen/wanted/wanted_lvl
/*WS begin
var/atom/movable/screen/spacesuit
WS End - Fuckin' spacesuits. */
// subtypes can override this to force a specific UI style
var/ui_style

Expand Down Expand Up @@ -113,7 +109,6 @@ GLOBAL_LIST_INIT(available_ui_styles, list(

healths = null
healthdoll = null
wanted_lvl = null
internals = null
lingchemdisplay = null
devilsouldisplay = null
Expand Down
204 changes: 0 additions & 204 deletions code/controllers/subsystem/job.dm

This file was deleted.

Loading

0 comments on commit 5dc5ca1

Please sign in to comment.