Skip to content

Commit

Permalink
Kills off SSjob, changes suit sensor ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkSuckerberg committed Jul 5, 2023
1 parent ce61469 commit 469e9a8
Show file tree
Hide file tree
Showing 19 changed files with 136 additions and 225 deletions.
82 changes: 46 additions & 36 deletions code/__DEFINES/jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +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_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_PRISONER 35
#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
5 changes: 5 additions & 0 deletions code/__HELPERS/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@
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()
new_job.register()

// 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)
100 changes: 0 additions & 100 deletions code/controllers/subsystem/job.dm

This file was deleted.

3 changes: 2 additions & 1 deletion code/controllers/subsystem/mapping.dm
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,15 @@ SUBSYSTEM_DEF(mapping)
var/value = job_slot_list[job]
var/slots
if(isnum(value))
job_slot = SSjob.GetJob(job)
job_slot = GLOB.name_occupations[job]
slots = value
else if(islist(value))
var/datum/outfit/job_outfit = text2path(value["outfit"])
if(isnull(job_outfit))
stack_trace("Invalid job outfit! [value["outfit"]] on [S.name]'s config! Defaulting to assistant clothing.")
job_outfit = /datum/outfit/job/assistant
job_slot = new /datum/job(job, job_outfit)
job_slot.display_order = length(S.job_slots)
job_slot.wiki_page = value["wiki_page"]
job_slot.officer = value["officer"]
slots = value["slots"]
Expand Down
43 changes: 43 additions & 0 deletions code/controllers/subsystem/overmap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,49 @@ SUBSYSTEM_DEF(overmap)
ship_count++
return ship_count

/datum/controller/subsystem/overmap/proc/get_manifest()
var/list/manifest_out = list()
for(var/datum/overmap/ship/controlled/ship as anything in controlled_ships)
if(!length(ship.manifest))
continue
manifest_out["[ship.name] ([ship.source_template.short_name])"] = list()
for(var/crewmember in ship.manifest)
var/datum/job/crewmember_job = ship.manifest[crewmember]
manifest_out["[ship.name] ([ship.source_template.short_name])"] += list(list(
"name" = crewmember,
"rank" = crewmember_job.name,
"officer" = crewmember_job.officer
))

return manifest_out

/datum/controller/subsystem/overmap/proc/get_manifest_html(monochrome = FALSE)
var/list/manifest = get_manifest()
var/dat = {"
<head><style>
.manifest {border-collapse:collapse;}
.manifest td, th {border:1px solid [monochrome ? "black":"#DEF; background-color:white; color:black"]; padding:.25em}
.manifest th {height: 2em; [monochrome ? "border-top-width: 3px":"background-color: #48C; color:white"]}
.manifest tr.head th { [monochrome ? "border-top-width: 1px":"background-color: #488;"] }
.manifest tr.alt td {[monochrome ? "border-top-width: 2px":"background-color: #DEF"]}
</style></head>
<table class="manifest" width='350px'>
<tr class='head'><th>Name</th><th>Rank</th></tr>
"}
for(var/department in manifest)
var/list/entries = manifest[department]
dat += "<tr><th colspan=3>[department]</th></tr>"
var/even = FALSE
for(var/entry in entries)
var/list/entry_list = entry
dat += "<tr[even ? " class='alt'" : ""]><td>[entry_list["name"]]</td><td>[entry_list["rank"]]</td></tr>"
even = !even

dat += "</table>"
dat = replacetext(dat, "\n", "")
dat = replacetext(dat, "\t", "")
return dat

/datum/controller/subsystem/overmap/Recover()
if(istype(SSovermap.overmap_objects))
overmap_objects = SSovermap.overmap_objects
Expand Down
2 changes: 1 addition & 1 deletion code/datums/world_topic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@

/datum/world_topic/manifest/Run(list/input)
. = list()
var/list/manifest = SSjob.get_manifest()
var/list/manifest = SSovermap.get_manifest()
for(var/department in manifest)
var/list/entries = manifest[department]
var/list/dept_entries = list()
Expand Down
5 changes: 5 additions & 0 deletions code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1635,3 +1635,8 @@
else
//We inline a MAPTEXT() here, because there's no good way to statically add to a string like this
active_hud.screentip_text.maptext = "<span class='maptext' style='text-align: center; font-size: 32px; color: [user.client.prefs.screentip_color]'>[name]</span>"

///Called whenever a player is spawned on the same turf as this atom.
/atom/proc/join_player_here(mob/M)
// By default, just place the mob on the same turf as the marker or whatever.
M.forceMove(get_turf(src))
Loading

0 comments on commit 469e9a8

Please sign in to comment.