From f3ceaa2680354a9b5b1083d2ef71e39e79f8287f Mon Sep 17 00:00:00 2001 From: Mark Suckerberg Date: Sun, 2 Jul 2023 23:21:40 -0500 Subject: [PATCH 1/5] strips away a lot of jobcode and ALL of revs --- code/__DEFINES/role_preferences.dm | 1 - code/controllers/subsystem/job.dm | 43 +- code/datums/components/art.dm | 13 - code/datums/mind.dm | 19 - .../dynamic/dynamic_rulesets_latejoin.dm | 76 --- .../dynamic/dynamic_rulesets_roundstart.dm | 84 --- code/game/gamemodes/game_mode.dm | 3 - code/game/gamemodes/revolution/revolution.dm | 232 -------- code/game/machinery/computer/card.dm | 141 ----- code/game/machinery/cryopod.dm | 2 +- code/game/objects/items/grenades/plastic.dm | 2 - .../items/implants/implant_mindshield.dm | 11 - code/game/objects/structures/statues.dm | 1 - code/modules/admin/topic.dm | 7 - code/modules/admin/verbs/one_click_antag.dm | 29 - code/modules/admin/verbs/randomverbs.dm | 4 +- .../abductor/machinery/experiment.dm | 2 - code/modules/antagonists/cult/cult.dm | 11 - .../antagonists/revolution/revolution.dm | 539 ------------------ code/modules/antagonists/wizard/wizard.dm | 3 - code/modules/assembly/flash.dm | 21 - code/modules/events/devil.dm | 4 +- code/modules/events/fake_virus.dm | 2 +- code/modules/events/heart_attack.dm | 2 +- code/modules/events/pirates.dm | 8 - code/modules/jobs/job_types/_job.dm | 11 - code/modules/jobs/job_types/ai.dm | 2 - code/modules/jobs/job_types/assistant.dm | 2 - .../jobs/job_types/atmospheric_technician.dm | 2 - code/modules/jobs/job_types/bartender.dm | 2 - code/modules/jobs/job_types/botanist.dm | 2 - code/modules/jobs/job_types/brig_physician.dm | 2 - code/modules/jobs/job_types/captain.dm | 2 - .../jobs/job_types/cargo_technician.dm | 2 - code/modules/jobs/job_types/chaplain.dm | 2 - code/modules/jobs/job_types/chemist.dm | 2 - code/modules/jobs/job_types/chief_engineer.dm | 2 - .../jobs/job_types/chief_medical_officer.dm | 2 - code/modules/jobs/job_types/clown.dm | 2 - code/modules/jobs/job_types/cook.dm | 2 - code/modules/jobs/job_types/curator.dm | 2 - code/modules/jobs/job_types/cyborg.dm | 2 - code/modules/jobs/job_types/detective.dm | 2 - code/modules/jobs/job_types/geneticist.dm | 4 +- .../jobs/job_types/head_of_personnel.dm | 2 - .../jobs/job_types/head_of_security.dm | 2 - code/modules/jobs/job_types/janitor.dm | 2 - code/modules/jobs/job_types/lawyer.dm | 2 - code/modules/jobs/job_types/medical_doctor.dm | 2 - code/modules/jobs/job_types/mime.dm | 2 - code/modules/jobs/job_types/paramedic.dm | 2 - code/modules/jobs/job_types/prisoner.dm | 2 - code/modules/jobs/job_types/psychologist.dm | 2 - code/modules/jobs/job_types/quartermaster.dm | 2 - .../jobs/job_types/research_director.dm | 2 - code/modules/jobs/job_types/roboticist.dm | 2 - code/modules/jobs/job_types/scientist.dm | 2 - .../jobs/job_types/security_officer.dm | 2 - code/modules/jobs/job_types/shaft_miner.dm | 2 - code/modules/jobs/job_types/solgov_rep.dm | 2 - .../jobs/job_types/station_engineer.dm | 2 - code/modules/jobs/job_types/virologist.dm | 2 - code/modules/jobs/job_types/warden.dm | 2 - .../modules/mob/dead/new_player/new_player.dm | 3 +- .../mob/living/carbon/human/species.dm | 5 - code/modules/mob/living/silicon/login.dm | 3 - code/modules/mob/login.dm | 2 - code/modules/mob/mob_helpers.dm | 3 - .../computers/machinery/console_presets.dm | 1 - .../chemistry/reagents/alcohol_reagents.dm | 9 - .../nanites/nanite_programs/buffing.dm | 5 +- .../spell_types/pointed/mind_transfer.dm | 2 +- shiptest.dme | 3 - 73 files changed, 16 insertions(+), 1367 deletions(-) delete mode 100644 code/game/gamemodes/revolution/revolution.dm delete mode 100644 code/modules/antagonists/revolution/revolution.dm diff --git a/code/__DEFINES/role_preferences.dm b/code/__DEFINES/role_preferences.dm index 6fe70f5419b4..0cbca56696fd 100644 --- a/code/__DEFINES/role_preferences.dm +++ b/code/__DEFINES/role_preferences.dm @@ -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, diff --git a/code/controllers/subsystem/job.dm b/code/controllers/subsystem/job.dm index e02621dd2b66..d39cc5daedce 100644 --- a/code/controllers/subsystem/job.dm +++ b/code/controllers/subsystem/job.dm @@ -6,9 +6,6 @@ SUBSYSTEM_DEF(job) var/list/occupations = list() //List of all jobs var/list/datum/job/name_occupations = list() //Dict of all jobs, keys are titles var/list/type_occupations = list() //Dict of all jobs, keys are types - var/list/prioritized_jobs = list() - - var/overflow_role = "Assistant" /datum/controller/subsystem/job/Initialize(timeofday) if(!occupations.len) @@ -55,59 +52,29 @@ SUBSYSTEM_DEF(job) SetupOccupations() return -/datum/controller/subsystem/job/proc/handle_auto_deadmin_roles(client/C, rank) - if(!C?.holder) - return TRUE - var/datum/job/job = GetJob(rank) - - var/timegate_expired = FALSE - // allow only forcing deadminning in the first X seconds of the round if auto_deadmin_timegate is set in config - var/timegate = CONFIG_GET(number/auto_deadmin_timegate) - if(timegate && (world.time - SSticker.round_start_time > timegate)) - timegate_expired = TRUE - - if(!job) - return - if((job.auto_deadmin_role_flags & DEADMIN_POSITION_HEAD) && ((CONFIG_GET(flag/auto_deadmin_heads) && !timegate_expired) || (C.prefs?.toggles & DEADMIN_POSITION_HEAD))) - return C.holder.auto_deadmin() - else if((job.auto_deadmin_role_flags & DEADMIN_POSITION_SECURITY) && ((CONFIG_GET(flag/auto_deadmin_security) && !timegate_expired) || (C.prefs?.toggles & DEADMIN_POSITION_SECURITY))) - return C.holder.auto_deadmin() - else if((job.auto_deadmin_role_flags & DEADMIN_POSITION_SILICON) && ((CONFIG_GET(flag/auto_deadmin_silicons) && !timegate_expired) || (C.prefs?.toggles & DEADMIN_POSITION_SILICON))) //in the event there's ever psuedo-silicon roles added, ie synths. - return C.holder.auto_deadmin() - /datum/controller/subsystem/job/Recover() set waitfor = FALSE var/oldjobs = SSjob.occupations sleep(20) - for (var/datum/job/J in oldjobs) - INVOKE_ASYNC(src, .proc/RecoverJob, J) - -/datum/controller/subsystem/job/proc/RecoverJob(datum/job/J) - var/datum/job/newjob = GetJob(J.name) - if (!istype(newjob)) - return - newjob.total_positions = J.total_positions - newjob.spawn_positions = J.spawn_positions - newjob.current_positions = J.current_positions -/atom/proc/JoinPlayerHere(mob/M, buckle) +/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)) -/obj/structure/chair/JoinPlayerHere(mob/M, buckle) +/obj/structure/chair/join_player_here(mob/M) // Placing a mob in a chair will attempt to buckle it, or else fall back to default. - if (buckle && isliving(M) && buckle_mob(M, FALSE, FALSE)) + if (isliving(M) && buckle_mob(M, FALSE, FALSE)) return ..() /datum/controller/subsystem/job/proc/SendToLateJoin(mob/M, buckle = TRUE, atom/destination) if(destination) - destination.JoinPlayerHere(M, buckle) + destination.join_player_here(M, buckle) return TRUE if(M.mind && M.mind.assigned_role && length(GLOB.jobspawn_overrides[M.mind.assigned_role])) //We're doing something special today. destination = pick(GLOB.jobspawn_overrides[M.mind.assigned_role]) - destination.JoinPlayerHere(M, FALSE) + destination.join_player_here(M, FALSE) return TRUE var/msg = "Unable to send mob [M] to late join!" diff --git a/code/datums/components/art.dm b/code/datums/components/art.dm index 0683426ea1c2..13249a19e736 100644 --- a/code/datums/components/art.dm +++ b/code/datums/components/art.dm @@ -51,16 +51,3 @@ if(!do_after(M, 20, target = parent)) return on_obj_examine(source, M) - -/datum/component/art/rev - -/datum/component/art/rev/apply_moodlet(mob/M, impress) - M.visible_message( - "[M] stops to inspect [parent].", - "You take in [parent], inspecting the fine craftsmanship of the proletariat." - ) - - if(M.mind && M.mind.has_antag_datum(/datum/antagonist/rev)) - SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "artgreat", /datum/mood_event/artgreat) - else - SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "artbad", /datum/mood_event/artbad) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 97def620c708..97eb2762c8d0 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -345,13 +345,6 @@ special_role = null remove_antag_equip() -/datum/mind/proc/remove_rev() - var/datum/antagonist/rev/rev = has_antag_datum(/datum/antagonist/rev) - if(rev) - remove_antag_datum(rev.type) - special_role = null - - /datum/mind/proc/remove_antag_equip() var/list/Mob_Contents = current.get_contents() for(var/obj/item/I in Mob_Contents) @@ -365,7 +358,6 @@ remove_nukeop() remove_wizard() remove_cultist() - remove_rev() /datum/mind/proc/equip_traitor(employer = "The Syndicate", silent = FALSE, datum/antagonist/uplink_owner) if(!current) @@ -441,10 +433,6 @@ if(iscultist(creator)) SSticker.mode.add_cultist(src) - else if(is_revolutionary(creator)) - var/datum/antagonist/rev/converter = creator.mind.has_antag_datum(/datum/antagonist/rev,TRUE) - converter.add_revolutionary(src,FALSE) - else if(is_nuclear_operative(creator)) var/datum/antagonist/nukeop/converter = creator.mind.has_antag_datum(/datum/antagonist/nukeop,TRUE) var/datum/antagonist/nukeop/N = new() @@ -722,13 +710,6 @@ to_chat(current, "You catch a glimpse of the Realm of Nar'Sie, The Geometer of Blood. You now see how flimsy your world is, you see that it should be open to the knowledge of Nar'Sie.") to_chat(current, "Assist your new brethren in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back.") -/datum/mind/proc/make_Rev() - var/datum/antagonist/rev/head/head = new() - head.give_flash = TRUE - head.give_hud = TRUE - add_antag_datum(head) - special_role = ROLE_REV_HEAD - /datum/mind/proc/AddSpell(obj/effect/proc_holder/spell/S) spell_list += S S.action.Grant(current) diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm index 04d7a42f4373..228df9bd35f1 100644 --- a/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm +++ b/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm @@ -68,79 +68,3 @@ high_population_requirement = 10 repeatable = TRUE flags = TRAITOR_RULESET - -////////////////////////////////////////////// -// // -// REVOLUTIONARY PROVOCATEUR // -// // -////////////////////////////////////////////// - -/datum/dynamic_ruleset/latejoin/provocateur - name = "Provocateur" - persistent = TRUE - antag_datum = /datum/antagonist/rev/head - antag_flag = ROLE_REV_HEAD - antag_flag_override = ROLE_REV - restricted_roles = list("AI", "Cyborg", "Prisoner", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "SolGov Representative") - enemy_roles = list("AI", "Cyborg", "Security Officer","Detective","Head of Security", "Captain", "Warden") - required_enemies = list(2,2,1,1,1,1,1,0,0,0) - required_candidates = 1 - weight = 2 - delay = 1 MINUTES // Prevents rule start while head is offstation. - cost = 20 - requirements = list(101,101,70,40,30,20,20,20,20,20) - high_population_requirement = 50 - flags = HIGHLANDER_RULESET - blocking_rules = list(/datum/dynamic_ruleset/roundstart/revs) - var/required_heads_of_staff = 3 - var/finished = FALSE - /// How much threat should be injected when the revolution wins? - var/revs_win_threat_injection = 20 - var/datum/team/revolution/revolution - -/datum/dynamic_ruleset/latejoin/provocateur/ready(forced=FALSE) - if (forced) - required_heads_of_staff = 1 - if(!..()) - return FALSE - var/head_check = 0 - for(var/mob/player in mode.current_players[CURRENT_LIVING_PLAYERS]) - if (player.mind.assigned_role in GLOB.command_positions) - head_check++ - return (head_check >= required_heads_of_staff) - -/datum/dynamic_ruleset/latejoin/provocateur/execute() - var/mob/M = pick(candidates) // This should contain a single player, but in case. - if(check_eligible(M.mind)) // Didnt die/run off z-level/get implanted since leaving shuttle. - assigned += M.mind - M.mind.special_role = antag_flag - revolution = new() - var/datum/antagonist/rev/head/new_head = new() - new_head.give_flash = TRUE - new_head.give_hud = TRUE - new_head.remove_clumsy = TRUE - new_head = M.mind.add_antag_datum(new_head, revolution) - revolution.update_objectives() - revolution.update_heads() - return TRUE - else - log_game("DYNAMIC: [ruletype] [name] discarded [M.name] from head revolutionary due to ineligibility.") - log_game("DYNAMIC: [ruletype] [name] failed to get any eligible headrevs. Refunding [cost] threat.") - return FALSE - -/datum/dynamic_ruleset/latejoin/provocateur/rule_process() - var/winner = revolution.process_victory(revs_win_threat_injection) - if (isnull(winner)) - return - - finished = winner - return RULESET_STOP_PROCESSING - -/// Checks for revhead loss conditions and other antag datums. -/datum/dynamic_ruleset/latejoin/provocateur/proc/check_eligible(datum/mind/M) - if(!considered_afk(M) && considered_alive(M) && !M.antag_datums?.len && !HAS_TRAIT(M, TRAIT_MINDSHIELD)) - return TRUE - return FALSE - -/datum/dynamic_ruleset/latejoin/provocateur/round_result() - revolution.round_result(finished) diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm index 1ca947178911..61ae80615592 100644 --- a/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm +++ b/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm @@ -330,90 +330,6 @@ SSticker.mode_result = "halfwin - interrupted" SSticker.news_report = OPERATIVE_SKIRMISH -////////////////////////////////////////////// -// // -// REVS // -// // -////////////////////////////////////////////// - -/datum/dynamic_ruleset/roundstart/revs - name = "Revolution" - persistent = TRUE - antag_flag = ROLE_REV_HEAD - antag_flag_override = ROLE_REV - antag_datum = /datum/antagonist/rev/head - minimum_required_age = 14 - restricted_roles = list("AI", "Cyborg", "Prisoner", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "SolGov Representative") - required_candidates = 3 - weight = 2 - delay = 7 MINUTES - cost = 35 - requirements = list(101,101,70,40,30,20,10,10,10,10) - high_population_requirement = 10 - antag_cap = list(3,3,3,3,3,3,3,3,3,3) - flags = HIGHLANDER_RULESET - blocking_rules = list(/datum/dynamic_ruleset/latejoin/provocateur) - // I give up, just there should be enough heads with 35 players... - minimum_players = 35 - /// How much threat should be injected when the revolution wins? - var/revs_win_threat_injection = 20 - var/datum/team/revolution/revolution - var/finished = FALSE - -/datum/dynamic_ruleset/roundstart/revs/pre_execute() - . = ..() - var/max_candidates = antag_cap[indice_pop] - mode.antags_rolled += max_candidates - for(var/i = 1 to max_candidates) - if(candidates.len <= 0) - break - var/mob/M = pick_n_take(candidates) - assigned += M.mind - M.mind.restricted_roles = restricted_roles - M.mind.special_role = antag_flag - GLOB.pre_setup_antags += M.mind - return TRUE - -/datum/dynamic_ruleset/roundstart/revs/execute() - revolution = new() - for(var/datum/mind/M in assigned) - GLOB.pre_setup_antags -= M - if(check_eligible(M)) - var/datum/antagonist/rev/head/new_head = new antag_datum() - new_head.give_flash = TRUE - new_head.give_hud = TRUE - new_head.remove_clumsy = TRUE - M.add_antag_datum(new_head,revolution) - else - assigned -= M - log_game("DYNAMIC: [ruletype] [name] discarded [M.name] from head revolutionary due to ineligibility.") - if(revolution.members.len) - revolution.update_objectives() - revolution.update_heads() - return TRUE - log_game("DYNAMIC: [ruletype] [name] failed to get any eligible headrevs. Refunding [cost] threat.") - return FALSE - -/datum/dynamic_ruleset/roundstart/revs/clean_up() - qdel(revolution) - ..() - -/datum/dynamic_ruleset/roundstart/revs/rule_process() - var/winner = revolution.process_victory(revs_win_threat_injection) - if (isnull(winner)) - return - - finished = winner - return RULESET_STOP_PROCESSING - -/// Checks for revhead loss conditions and other antag datums. -/datum/dynamic_ruleset/roundstart/revs/proc/check_eligible(datum/mind/M) - if(!considered_afk(M) && considered_alive(M) && !M.antag_datums?.len && !HAS_TRAIT(M, TRAIT_MINDSHIELD)) - return TRUE - return FALSE - -/datum/dynamic_ruleset/roundstart/revs/round_result() - revolution.round_result(finished) // Admin only rulesets. The threat requirement is 101 so it is not possible to roll them. diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 21d632d68e19..c96b1e792f32 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -427,9 +427,6 @@ /datum/game_mode/proc/remove_antag_for_borging(datum/mind/newborgie) SSticker.mode.remove_cultist(newborgie, 0, 0) - var/datum/antagonist/rev/rev = newborgie.has_antag_datum(/datum/antagonist/rev) - if(rev) - rev.remove_revolutionary(TRUE) /datum/game_mode/proc/generate_station_goals() var/list/possible = list() diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm deleted file mode 100644 index 9c0d6fc8c905..000000000000 --- a/code/game/gamemodes/revolution/revolution.dm +++ /dev/null @@ -1,232 +0,0 @@ -// To add a rev to the list of revolutionaries, make sure it's rev (with if(SSticker.mode.name == "revolution)), -// then call SSticker.mode:add_revolutionary(_THE_PLAYERS_MIND_) -// nothing else needs to be done, as that proc will check if they are a valid target. -// Just make sure the converter is a head before you call it! -// To remove a rev (from brainwashing or w/e), call SSticker.mode:remove_revolutionary(_THE_PLAYERS_MIND_), -// this will also check they're not a head, so it can just be called freely -// If the game somtimes isn't registering a win properly, then SSticker.mode.check_win() isn't being called somewhere. - - -/datum/game_mode/revolution - name = "revolution" - config_tag = "revolution" - report_type = "revolution" - antag_flag = ROLE_REV - false_report_weight = 10 - restricted_jobs = list("Security Officer", "Warden", "Detective", "AI", "Cyborg","Captain", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer", "Brig Physician", "SolGov Representative", "Prisoner") //WS edit - Brig Physicians, SolGov Rep - required_jobs = list(list("Captain"=1),list("Head of Personnel"=1),list("Head of Security"=1),list("Chief Engineer"=1),list("Research Director"=1),list("Chief Medical Officer"=1)) //Any head present - required_players = 20 - required_enemies = 1 - recommended_enemies = 3 - enemy_minimum_age = 14 - - announce_span = "Revolution" - announce_text = "Some crewmembers are attempting a coup!\n\ - Revolutionaries: Expand your cause and overthrow the heads of staff by execution or otherwise.\n\ - Crew: Prevent the revolutionaries from taking over the station." - - var/finished = 0 - var/check_counter = 0 - var/max_headrevs = 3 - var/datum/team/revolution/revolution - var/list/datum/mind/headrev_candidates = list() - var/end_when_heads_dead = TRUE - -/////////////////////////////////////////////////////////////////////////////// -//Gets the round setup, cancelling if there's not enough players at the start// -/////////////////////////////////////////////////////////////////////////////// -/datum/game_mode/revolution/pre_setup() - - if(CONFIG_GET(flag/protect_roles_from_antagonist)) - restricted_jobs += protected_jobs - - if(CONFIG_GET(flag/protect_assistant_from_antagonist)) - restricted_jobs += "Assistant" - - for (var/i=1 to max_headrevs) - if (antag_candidates.len==0) - break - var/datum/mind/lenin = antag_pick(antag_candidates) - antag_candidates -= lenin - headrev_candidates += lenin - lenin.restricted_roles = restricted_jobs - - if(headrev_candidates.len < required_enemies) - setup_error = "Not enough headrev candidates" - return FALSE - - for(var/antag in headrev_candidates) - GLOB.pre_setup_antags += antag - return TRUE - -/datum/game_mode/revolution/post_setup() - var/list/heads = SSjob.get_living_heads() - var/list/sec = SSjob.get_living_sec() - var/weighted_score = min(max(round(heads.len - ((8 - sec.len) / 3)),1),max_headrevs) - - for(var/datum/mind/rev_mind in headrev_candidates) //People with return to lobby may still be in the lobby. Let's pick someone else in that case. - if(isnewplayer(rev_mind.current)) - headrev_candidates -= rev_mind - var/list/newcandidates = shuffle(antag_candidates) - if(newcandidates.len == 0) - continue - for(var/M in newcandidates) - var/datum/mind/lenin = M - antag_candidates -= lenin - newcandidates -= lenin - if(isnewplayer(lenin.current)) //We don't want to make the same mistake again - continue - else - var/mob/Nm = lenin.current - if(Nm.job in restricted_jobs) //Don't make the HOS a replacement revhead - antag_candidates += lenin //Let's let them keep antag chance for other antags - continue - - headrev_candidates += lenin - break - - while(weighted_score < headrev_candidates.len) //das vi danya - var/datum/mind/trotsky = pick(headrev_candidates) - antag_candidates += trotsky - headrev_candidates -= trotsky - - revolution = new() - - for(var/datum/mind/rev_mind in headrev_candidates) - log_game("[key_name(rev_mind)] has been selected as a head rev") - var/datum/antagonist/rev/head/new_head = new() - new_head.give_flash = TRUE - new_head.give_hud = TRUE - new_head.remove_clumsy = TRUE - rev_mind.add_antag_datum(new_head,revolution) - GLOB.pre_setup_antags -= rev_mind - - revolution.update_objectives() - revolution.update_heads() - - ..() - - -/datum/game_mode/revolution/process() - check_counter++ - if(check_counter >= 5) - if(!finished) - SSticker.mode.check_win() - check_counter = 0 - return FALSE - -////////////////////////////////////// -//Checks if the revs have won or not// -////////////////////////////////////// -/datum/game_mode/revolution/check_win() - if(check_rev_victory()) - finished = 1 - else if(check_heads_victory()) - finished = 2 - return - -/////////////////////////////// -//Checks if the round is over// -/////////////////////////////// -/datum/game_mode/revolution/check_finished() - if(CONFIG_GET(keyed_list/continuous)["revolution"]) - return ..() - if(finished != 0 && end_when_heads_dead) - return TRUE - else - return ..() - -/////////////////////////////////////////////////// -//Deals with converting players to the revolution// -/////////////////////////////////////////////////// -/proc/is_revolutionary(mob/M) - return M.mind?.has_antag_datum(/datum/antagonist/rev) - -/proc/is_head_revolutionary(mob/M) - return M.mind?.has_antag_datum(/datum/antagonist/rev/head) - -////////////////////////// -//Checks for rev victory// -////////////////////////// -/datum/game_mode/revolution/proc/check_rev_victory() - for(var/datum/objective/mutiny/objective in revolution.objectives) - if(!(objective.check_completion())) - return FALSE - return TRUE - -///////////////////////////// -//Checks for a head victory// -///////////////////////////// -/datum/game_mode/revolution/proc/check_heads_victory() - for(var/datum/mind/rev_mind in revolution.head_revolutionaries()) - if(!considered_afk(rev_mind) && considered_alive(rev_mind)) - if(ishuman(rev_mind.current) || ismonkey(rev_mind.current)) - return FALSE - return TRUE - - -/datum/game_mode/revolution/set_round_result() - ..() - if(finished == 1) - SSticker.mode_result = "win - heads killed" - SSticker.news_report = REVS_WIN - else if(finished == 2) - SSticker.mode_result = "loss - rev heads killed" - SSticker.news_report = REVS_LOSE - -//TODO What should be displayed for revs in non-rev rounds -/datum/game_mode/revolution/special_report() - if(finished == 1) - return "
The heads of staff were killed or exiled! The revolutionaries win!
" - else if(finished == 2) - return "
The heads of staff managed to stop the revolution!
" - -/datum/game_mode/revolution/generate_report() - return "Employee unrest has spiked in recent weeks, with several attempted mutinies on heads of staff. Some crew have been observed using flashbulb devices to blind their colleagues, \ - who then follow their orders without question and work towards dethroning departmental leaders. Watch for behavior such as this with caution. If the crew attempts a mutiny, you and \ - your heads of staff are fully authorized to execute them using lethal weaponry - they will be later cloned and interrogated at Central Command." - -/datum/game_mode/revolution/extended - name = "extended_revolution" - config_tag = "extended_revolution" - end_when_heads_dead = FALSE - -/datum/game_mode/revolution/speedy - name = "speedy_revolution" - config_tag = "speedy_revolution" - end_when_heads_dead = FALSE - var/endtime = null - var/fuckingdone = FALSE - -/datum/game_mode/revolution/speedy/pre_setup() - endtime = world.time + 20 MINUTES - return ..() - -/datum/game_mode/revolution/speedy/process() - . = ..() - if(check_counter == 0) - if (world.time > endtime && !fuckingdone) - fuckingdone = TRUE - for (var/obj/machinery/nuclearbomb/N in GLOB.nuke_list) - if (!N.timing) - N.timer_set = 200 - N.set_safety() - N.set_active() - - -/datum/game_mode/revolution/generate_credit_text() - var/list/round_credits = list() - var/len_before_addition - - round_credits += "

The Disgruntled Revolutionaries:

" - len_before_addition = round_credits.len - for(var/datum/mind/headrev in revolution.head_revolutionaries()) - round_credits += "

[headrev.name] as a revolutionary leader

" - for(var/datum/mind/grunt in (revolution.members - revolution.head_revolutionaries())) - round_credits += "

[grunt.name] as a grunt of the revolution

" - if(len_before_addition == round_credits.len) - round_credits += list("

The revolutionaries were all destroyed as martyrs!

", "

We couldn't identify their remains!

") - round_credits += "
" - - round_credits += ..() - return round_credits diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index a95f8c4b51cb..adb4e80a47b7 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -123,31 +123,6 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) /obj/machinery/computer/card/proc/job_blacklisted(jobtitle) return (jobtitle in blacklisted) -//Logic check for Topic() if you can open the job -/obj/machinery/computer/card/proc/can_open_job(datum/job/job) - if(job) - if(!job_blacklisted(job.name)) - if((job.total_positions <= GLOB.player_list.len * (max_relative_positions / 100))) - var/delta = (world.time / 10) - GLOB.time_last_changed_position - if((change_position_cooldown < delta) || (opened_positions[job.name] < 0)) - return JOB_ALLOWED - return JOB_COOLDOWN - return JOB_MAX_POSITIONS - return JOB_DENIED - -//Logic check for Topic() if you can close the job -/obj/machinery/computer/card/proc/can_close_job(datum/job/job) - if(job) - if(!job_blacklisted(job.name)) - if(job.total_positions > job.current_positions) - var/delta = (world.time / 10) - GLOB.time_last_changed_position - if((change_position_cooldown < delta) || (opened_positions[job.name] > 0)) - return JOB_ALLOWED - return JOB_COOLDOWN - return JOB_MAX_POSITIONS - return JOB_DENIED - - /obj/machinery/computer/card/proc/id_insert(mob/user, obj/item/inserting_item, obj/item/target) var/obj/item/card/id/card_to_insert = inserting_item var/holder_item = FALSE @@ -209,63 +184,6 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) dat += {"[t.fields["name"]] - [t.fields["rank"]]
"} dat += "Print

Access ID modification console.
" - else if(mode == 2) - // JOB MANAGEMENT - dat += {"Return - - "} - for(var/datum/job/job in SSjob.occupations) - dat += "" - if(job.name in blacklisted) - continue - dat += {" - - " - dat += "
JobSlotsOpen jobClose jobPrioritize
[job.name][job.current_positions]/[job.total_positions]"} - switch(can_open_job(job)) - if(JOB_ALLOWED) - if(authenticated == AUTHENTICATED_ALL) - dat += "Open Position
" - else - dat += "Open Position" - if(JOB_COOLDOWN) - var/time_to_wait = round(change_position_cooldown - ((world.time / 10) - GLOB.time_last_changed_position), 1) - var/mins = round(time_to_wait / 60) - var/seconds = time_to_wait - (60*mins) - dat += "Cooldown ongoing: [mins]:[(seconds < 10) ? "0[seconds]" : "[seconds]"]" - else - dat += "Denied" - dat += "
" - switch(can_close_job(job)) - if(JOB_ALLOWED) - if(authenticated == AUTHENTICATED_ALL) - dat += "Close Position" - else - dat += "Close Position" - if(JOB_COOLDOWN) - var/time_to_wait = round(change_position_cooldown - ((world.time / 10) - GLOB.time_last_changed_position), 1) - var/mins = round(time_to_wait / 60) - var/seconds = time_to_wait - (60*mins) - dat += "Cooldown ongoing: [mins]:[(seconds < 10) ? "0[seconds]" : "[seconds]"]" - else - dat += "Denied" - dat += "" - switch(job.total_positions) - if(0) - dat += "Denied" - else - if(authenticated == AUTHENTICATED_ALL) - if(job in SSjob.prioritized_jobs) - dat += "Deprioritize" - else - if(SSjob.prioritized_jobs.len < 5) - dat += "Prioritize" - else - dat += "Denied" - else - dat += "Prioritize" - - dat += "
" else var/list/header = list() @@ -286,7 +204,6 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) Target: Remove [target_name] || Confirm Identity: Remove [scan_name]
Access Crew Manifest
- [!target_dept ? "Job Management
" : ""] Unique Ship Access: [ship.unique_ship_access?"Enabled":"Disabled"] [ship.unique_ship_access?"Disable":"Enable"]
Print Silicon Access Chip Print Log Out"} @@ -370,8 +287,6 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) else if (!authenticated) body = {"Log In

Access Crew Manifest

"} - if(!target_dept) - body += "Job Management
" dat = list("", header.Join(), body, "
") var/datum/browser/popup = new(user, "id_com", src.name, 900, 620) @@ -545,62 +460,6 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) mode = 3; playsound(src, "terminal_type", 25, FALSE) - if("make_job_available") - // MAKE ANOTHER JOB POSITION AVAILABLE FOR LATE JOINERS - if(authenticated && !target_dept) - var/edit_job_target = href_list["job"] - var/datum/job/j = SSjob.GetJob(edit_job_target) - if(!j) - updateUsrDialog() - return 0 - if(can_open_job(j) != 1) - updateUsrDialog() - return 0 - if(opened_positions[edit_job_target] >= 0) - GLOB.time_last_changed_position = world.time / 10 - j.total_positions++ - opened_positions[edit_job_target]++ - playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE) - - if("make_job_unavailable") - // MAKE JOB POSITION UNAVAILABLE FOR LATE JOINERS - if(authenticated && !target_dept) - var/edit_job_target = href_list["job"] - var/datum/job/j = SSjob.GetJob(edit_job_target) - if(!j) - updateUsrDialog() - return 0 - if(can_close_job(j) != 1) - updateUsrDialog() - return 0 - //Allow instant closing without cooldown if a position has been opened before - if(opened_positions[edit_job_target] <= 0) - GLOB.time_last_changed_position = world.time / 10 - j.total_positions-- - opened_positions[edit_job_target]-- - playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, FALSE) - - if ("prioritize_job") - // TOGGLE WHETHER JOB APPEARS AS PRIORITIZED IN THE LOBBY - if(authenticated && !target_dept) - var/priority_target = href_list["job"] - var/datum/job/j = SSjob.GetJob(priority_target) - if(!j) - updateUsrDialog() - return 0 - var/priority = TRUE - if(j in SSjob.prioritized_jobs) - SSjob.prioritized_jobs -= j - priority = FALSE - else if(j.total_positions <= j.current_positions) - to_chat(usr, "[j.name] has had all positions filled. Open up more slots before prioritizing it.") - updateUsrDialog() - return - else - SSjob.prioritized_jobs += j - to_chat(usr, "[j.name] has been successfully [priority ? "prioritized" : "unprioritized"]. Potential employees will notice your request.") - playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE) - if ("print") if (!(printing)) printing = 1 diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 5b2129794210..2f209d8f124a 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -194,7 +194,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/computer/cryopod/retro, 17) message_admins("Cryopod in [get_area(src)] could not find control computer!") last_no_computer_message = world.time -/obj/machinery/cryopod/JoinPlayerHere(mob/M, buckle) +/obj/machinery/cryopod/join_player_here(mob/M) . = ..() close_machine(M, TRUE) diff --git a/code/game/objects/items/grenades/plastic.dm b/code/game/objects/items/grenades/plastic.dm index a1b169189d3f..7ca2ad751a65 100644 --- a/code/game/objects/items/grenades/plastic.dm +++ b/code/game/objects/items/grenades/plastic.dm @@ -124,8 +124,6 @@ message_say = "FOR THE HIVE!" else if(UM.has_antag_datum(/datum/antagonist/cult)) message_say = "FOR NAR'SIE!" - else if(UM.has_antag_datum(/datum/antagonist/rev)) - message_say = "VIVA LA REVOLUTION!" else if(UM.has_antag_datum(/datum/antagonist/brother)) message_say = "FOR MY BROTHER!" else if(UM.has_antag_datum(/datum/antagonist/ninja)) diff --git a/code/game/objects/items/implants/implant_mindshield.dm b/code/game/objects/items/implants/implant_mindshield.dm index 78732e7e944c..121fa9f0c234 100644 --- a/code/game/objects/items/implants/implant_mindshield.dm +++ b/code/game/objects/items/implants/implant_mindshield.dm @@ -27,17 +27,6 @@ target.mind.remove_antag_datum(/datum/antagonist/brainwashed) deconverted = TRUE - if(target.mind.has_antag_datum(/datum/antagonist/rev/head)|| target.mind.unconvertable) - if(!silent) - target.visible_message("[target] seems to resist the implant!", "You feel something interfering with your mental conditioning, but you resist it!") - removed(target, 1) - qdel(src) - return TRUE //the implant is still used - - var/datum/antagonist/rev/rev = target.mind.has_antag_datum(/datum/antagonist/rev) - if(rev) - deconverted = TRUE - rev.remove_revolutionary(FALSE, user) if(!silent) if(target.mind in SSticker.mode.cult) to_chat(target, "You feel something interfering with your mental conditioning, but you resist it!") diff --git a/code/game/objects/structures/statues.dm b/code/game/objects/structures/statues.dm index a98cf5ef40a3..f43a7a95f8fd 100644 --- a/code/game/objects/structures/statues.dm +++ b/code/game/objects/structures/statues.dm @@ -299,4 +299,3 @@ name = "\improper Karl Marx bust" desc = "A bust depicting a certain 19th century economist. You get the feeling a specter is haunting the sector." icon_state = "marx" - art_type = /datum/component/art/rev diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 056e5c168f03..d30c7d0b0c37 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -78,13 +78,6 @@ else message_admins("[key_name_admin(usr)] tried to create changelings. Unfortunately, there were no candidates available.") log_admin("[key_name(usr)] failed to create changelings.") - if("revs") - if(src.makeRevs()) - message_admins("[key_name(usr)] started a revolution.") - log_admin("[key_name(usr)] started a revolution.") - else - message_admins("[key_name_admin(usr)] tried to start a revolution. Unfortunately, there were no candidates available.") - log_admin("[key_name(usr)] failed to start a revolution.") if("cult") if(src.makeCult()) message_admins("[key_name(usr)] started a cult.") diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index 2b7bf06d2d6d..72091fbe0469 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -13,7 +13,6 @@ var/dat = {" Make Traitors
Make Changelings
- Make Revs
Make Cult
Make Blob
Make Wizard (Requires Ghosts)
@@ -101,34 +100,6 @@ return 0 -/datum/admins/proc/makeRevs() - - var/datum/game_mode/revolution/temp = new - if(CONFIG_GET(flag/protect_roles_from_antagonist)) - temp.restricted_jobs += temp.protected_jobs - - if(CONFIG_GET(flag/protect_assistant_from_antagonist)) - temp.restricted_jobs += "Assistant" - - var/list/mob/living/carbon/human/candidates = list() - var/mob/living/carbon/human/H = null - - for(var/mob/living/carbon/human/applicant in GLOB.player_list) - if(isReadytoRumble(applicant, ROLE_REV)) - if(temp.age_check(applicant.client)) - if(!(applicant.job in temp.restricted_jobs)) - candidates += applicant - - if(candidates.len) - var/numRevs = min(candidates.len, 3) - - for(var/i = 0, iYou are now a revolutionary! Help your cause. Do not harm your fellow freedom fighters. You can identify your comrades by the red \"R\" icons, and your leaders by the blue \"R\" icons. Help them kill the heads to win the revolution!") - owner.announce_objectives() - -/datum/antagonist/rev/create_team(datum/team/revolution/new_team) - if(!new_team) - //For now only one revolution at a time - for(var/datum/antagonist/rev/head/H in GLOB.antagonists) - if(!H.owner) - continue - if(H.rev_team) - rev_team = H.rev_team - return - rev_team = new /datum/team/revolution - rev_team.update_objectives() - rev_team.update_heads() - return - if(!istype(new_team)) - stack_trace("Wrong team type passed to [type] initialization.") - rev_team = new_team - -/datum/antagonist/rev/get_team() - return rev_team - -/datum/antagonist/rev/proc/create_objectives() - objectives |= rev_team.objectives - -/datum/antagonist/rev/proc/remove_objectives() - objectives -= rev_team.objectives - -//Bump up to head_rev -/datum/antagonist/rev/proc/promote() - var/old_team = rev_team - var/datum/mind/old_owner = owner - silent = TRUE - owner.remove_antag_datum(/datum/antagonist/rev) - var/datum/antagonist/rev/head/new_revhead = new() - new_revhead.silent = TRUE - old_owner.add_antag_datum(new_revhead,old_team) - new_revhead.silent = FALSE - to_chat(old_owner, "You have proved your devotion to revolution! You are a head revolutionary now!") - -/datum/antagonist/rev/get_admin_commands() - . = ..() - .["Promote"] = CALLBACK(src,.proc/admin_promote) - -/datum/antagonist/rev/proc/admin_promote(mob/admin) - var/datum/mind/O = owner - promote() - message_admins("[key_name_admin(admin)] has head-rev'ed [O].") - log_admin("[key_name(admin)] has head-rev'ed [O].") - -/datum/antagonist/rev/head/admin_add(datum/mind/new_owner,mob/admin) - give_flash = TRUE - give_hud = TRUE - remove_clumsy = TRUE - new_owner.add_antag_datum(src) - message_admins("[key_name_admin(admin)] has head-rev'ed [key_name_admin(new_owner)].") - log_admin("[key_name(admin)] has head-rev'ed [key_name(new_owner)].") - to_chat(new_owner.current, "You are a member of the revolutionaries' leadership now!") - -/datum/antagonist/rev/head/get_admin_commands() - . = ..() - . -= "Promote" - .["Take flash"] = CALLBACK(src,.proc/admin_take_flash) - .["Give flash"] = CALLBACK(src,.proc/admin_give_flash) - .["Repair flash"] = CALLBACK(src,.proc/admin_repair_flash) - .["Demote"] = CALLBACK(src,.proc/admin_demote) - -/datum/antagonist/rev/head/proc/admin_take_flash(mob/admin) - var/list/L = owner.current.get_contents() - var/obj/item/assembly/flash/handheld/flash = locate() in L - if (!flash) - to_chat(admin, "Deleting flash failed!") - return - qdel(flash) - -/datum/antagonist/rev/head/proc/admin_give_flash(mob/admin) - //This is probably overkill but making these impact state annoys me - var/old_give_flash = give_flash - var/old_give_hud = give_hud - var/old_remove_clumsy = remove_clumsy - give_flash = TRUE - give_hud = FALSE - remove_clumsy = FALSE - equip_rev() - give_flash = old_give_flash - give_hud = old_give_hud - remove_clumsy = old_remove_clumsy - -/datum/antagonist/rev/head/proc/admin_repair_flash(mob/admin) - var/list/L = owner.current.get_contents() - var/obj/item/assembly/flash/handheld/flash = locate() in L - if (!flash) - to_chat(admin, "Repairing flash failed!") - else - flash.burnt_out = FALSE - flash.update_icon() - -/datum/antagonist/rev/head/proc/admin_demote(datum/mind/target,mob/user) - message_admins("[key_name_admin(user)] has demoted [key_name_admin(owner)] from head revolutionary.") - log_admin("[key_name(user)] has demoted [key_name(owner)] from head revolutionary.") - demote() - -/datum/antagonist/rev/head - name = "Head Revolutionary" - antag_hud_name = "rev_head" - var/remove_clumsy = FALSE - var/give_flash = FALSE - var/give_hud = TRUE - -/datum/antagonist/rev/head/on_removal() - if(give_hud) - var/mob/living/carbon/C = owner.current - var/obj/item/organ/cyberimp/eyes/hud/security/syndicate/S = C.getorganslot(ORGAN_SLOT_HUD) - if(S) - S.Remove(C) - return ..() - -/datum/antagonist/rev/head/antag_listing_name() - return ..() + "(Leader)" - -/datum/antagonist/rev/proc/can_be_converted(mob/living/candidate) - if(!candidate.mind) - return FALSE - if(!can_be_owned(candidate.mind)) - return FALSE - var/mob/living/carbon/C = candidate //Check to see if the potential rev is implanted - if(!istype(C)) //Can't convert simple animals - return FALSE - return TRUE - -/datum/antagonist/rev/proc/add_revolutionary(datum/mind/rev_mind,stun = TRUE) - if(!can_be_converted(rev_mind.current)) - return FALSE - if(stun) - if(iscarbon(rev_mind.current)) - var/mob/living/carbon/carbon_mob = rev_mind.current - carbon_mob.silent = max(carbon_mob.silent, 5) - carbon_mob.flash_act(1, 1) - rev_mind.current.Stun(100) - rev_mind.add_antag_datum(/datum/antagonist/rev,rev_team) - rev_mind.special_role = ROLE_REV - return TRUE - -/datum/antagonist/rev/head/proc/demote() - var/datum/mind/old_owner = owner - var/old_team = rev_team - silent = TRUE - owner.remove_antag_datum(/datum/antagonist/rev/head) - var/datum/antagonist/rev/new_rev = new /datum/antagonist/rev() - new_rev.silent = TRUE - old_owner.add_antag_datum(new_rev,old_team) - new_rev.silent = FALSE - to_chat(old_owner, "Revolution has been disappointed of your leader traits! You are a regular revolutionary now!") - -/// Checks if the revolution succeeded, and lets them know. -/datum/antagonist/rev/proc/announce_victorious() - . = rev_team.check_rev_victory() - - if (!.) - return - - to_chat(owner, "[victory_message]") - var/policy = get_policy(ROLE_REV_SUCCESSFUL) - if (policy) - to_chat(owner, policy) - -/datum/antagonist/rev/farewell() - if (announce_victorious()) - return - - if(ishuman(owner.current) || ismonkey(owner.current)) - owner.current.visible_message("[owner.current] looks like [owner.current.p_theyve()] just remembered [owner.current.p_their()] real allegiance!", null, null, null, owner.current) - to_chat(owner, "You are no longer a brainwashed revolutionary! Your memory is hazy from the time you were a rebel...the only thing you remember is the name of the one who brainwashed you....") - else if(issilicon(owner.current)) - owner.current.visible_message("The frame beeps contentedly, purging the hostile memory engram from the MMI before initalizing it.", null, null, null, owner.current) - to_chat(owner, "The frame's firmware detects and deletes your neural reprogramming! You remember nothing but the name of the one who flashed you.") - -/datum/antagonist/rev/head/farewell() - if (announce_victorious()) - return - - if((ishuman(owner.current) || ismonkey(owner.current))) - if(owner.current.stat != DEAD) - owner.current.visible_message("[owner.current] looks like [owner.current.p_theyve()] just remembered [owner.current.p_their()] real allegiance!", null, null, null, owner.current) - to_chat(owner, "You have given up your cause of overthrowing the command staff. You are no longer a Head Revolutionary.") - else - to_chat(owner, "The sweet release of death. You are no longer a Head Revolutionary.") - else if(issilicon(owner.current)) - owner.current.visible_message("The frame beeps contentedly, suppressing the disloyal personality traits from the MMI before initalizing it.", null, null, null, owner.current) - to_chat(owner, "The frame's firmware detects and suppresses your unwanted personality traits! You feel more content with the leadership around these parts.") - -//blunt trauma deconversions call this through species.dm spec_attacked_by() -/datum/antagonist/rev/proc/remove_revolutionary(borged, deconverter) - log_attack("[key_name(owner.current)] has been deconverted from the revolution by [ismob(deconverter) ? key_name(deconverter) : deconverter]!") - if(borged) - message_admins("[ADMIN_LOOKUPFLW(owner.current)] has been borged while being a [name]") - owner.special_role = null - if(iscarbon(owner.current) && deconverter != DECONVERTER_REVS_WIN) - var/mob/living/carbon/C = owner.current - C.Unconscious(100) - owner.remove_antag_datum(type) - -/datum/antagonist/rev/head/remove_revolutionary(borged,deconverter) - if(borged || deconverter == DECONVERTER_STATION_WIN || deconverter == DECONVERTER_REVS_WIN) - . = ..() - -/datum/antagonist/rev/head/equip_rev() - var/mob/living/carbon/C = owner.current - if(!ishuman(C) && !ismonkey(C)) - return - - if(give_flash) - var/obj/item/assembly/flash/handheld/T = new(C) - var/list/slots = list ( - "backpack" = ITEM_SLOT_BACKPACK, - "left pocket" = ITEM_SLOT_LPOCKET, - "right pocket" = ITEM_SLOT_RPOCKET - ) - var/where = C.equip_in_one_of_slots(T, slots) - if (!where) - to_chat(C, "The Syndicate were unfortunately unable to get you a flash.") - else - to_chat(C, "The flash in your [where] will help you to persuade the crew to join your cause.") - - if(give_hud) - var/obj/item/organ/cyberimp/eyes/hud/security/syndicate/S = new() - S.Insert(C) - to_chat(C, "Your eyes have been implanted with a cybernetic security HUD which will help you keep track of who is mindshield-implanted, and therefore unable to be recruited.") - -/// "Enemy of the Revolutionary", given to heads and security when the revolution wins -/datum/antagonist/revolution_enemy - name = "Enemy of the Revolution" - show_in_antagpanel = FALSE - -/datum/antagonist/revolution_enemy/on_gain() - owner.special_role = "revolution enemy" - - var/datum/objective/survive/survive = new /datum/objective/survive - survive.owner = owner - survive.explanation_text = "The station has been overrun by revolutionaries, stay alive until the end." - objectives += survive - - return ..() - -/datum/team/revolution - name = "Revolution" - var/max_headrevs = 3 - var/list/ex_headrevs = list() // Dynamic removes revs on loss, used to keep a list for the roundend report. - var/list/ex_revs = list() - -/datum/team/revolution/proc/update_objectives(initial = FALSE) - var/untracked_heads = SSjob.get_all_heads() - for(var/datum/objective/mutiny/O in objectives) - untracked_heads -= O.target - for(var/datum/mind/M in untracked_heads) - var/datum/objective/mutiny/new_target = new() - new_target.team = src - new_target.target = M - new_target.update_explanation_text() - objectives += new_target - for(var/datum/mind/M in members) - var/datum/antagonist/rev/R = M.has_antag_datum(/datum/antagonist/rev) - R.objectives |= objectives - - addtimer(CALLBACK(src,.proc/update_objectives),HEAD_UPDATE_PERIOD,TIMER_UNIQUE) - -/datum/team/revolution/proc/head_revolutionaries() - . = list() - for(var/datum/mind/M in members) - if(M.has_antag_datum(/datum/antagonist/rev/head)) - . += M - -/datum/team/revolution/proc/update_heads() - if(SSticker.HasRoundStarted()) - var/list/datum/mind/head_revolutionaries = head_revolutionaries() - var/list/datum/mind/heads = SSjob.get_all_heads() - var/list/sec = SSjob.get_all_sec() - - if(head_revolutionaries.len < max_headrevs && head_revolutionaries.len < round(heads.len - ((8 - sec.len) / 3))) - var/list/datum/mind/non_heads = members - head_revolutionaries - var/list/datum/mind/promotable = list() - var/list/datum/mind/nonhuman_promotable = list() - for(var/datum/mind/khrushchev in non_heads) - if(khrushchev.current && !khrushchev.current.incapacitated() && !HAS_TRAIT(khrushchev.current, TRAIT_RESTRAINED) && khrushchev.current.client) - if(ROLE_REV in khrushchev.current.client.prefs.be_special) - if(ishuman(khrushchev.current)) - promotable += khrushchev - else - nonhuman_promotable += khrushchev - if(!promotable.len && nonhuman_promotable.len) //if only nonhuman revolutionaries remain, promote one of them to the leadership. - promotable = nonhuman_promotable - if(promotable.len) - var/datum/mind/new_leader = pick(promotable) - var/datum/antagonist/rev/rev = new_leader.has_antag_datum(/datum/antagonist/rev) - rev.promote() - - addtimer(CALLBACK(src,.proc/update_heads),HEAD_UPDATE_PERIOD,TIMER_UNIQUE) - -/datum/team/revolution/proc/save_members() - ex_headrevs = get_antag_minds(/datum/antagonist/rev/head, TRUE) - ex_revs = get_antag_minds(/datum/antagonist/rev, TRUE) - -/// Checks if revs have won -/datum/team/revolution/proc/check_rev_victory() - for(var/datum/objective/mutiny/objective in objectives) - if(!(objective.check_completion())) - return FALSE - return TRUE - -/// Checks if heads have won -/datum/team/revolution/proc/check_heads_victory() - for(var/datum/mind/rev_mind in head_revolutionaries()) - if(!considered_afk(rev_mind) && considered_alive(rev_mind)) - if(ishuman(rev_mind.current)) - return FALSE - return TRUE - -/// Updates the state of the world depending on if revs won or loss. -/// Returns who won, at which case this method should no longer be called. -/// If revs_win_injection_amount is passed, then that amount of threat will be added if the revs win. -/datum/team/revolution/proc/process_victory(revs_win_injection_amount) - if (check_rev_victory()) - . = REVOLUTION_VICTORY - else if (check_heads_victory()) - . = STATION_VICTORY - else - return - - save_members() - - // Remove everyone as a revolutionary - for (var/_rev_mind in members) - var/datum/mind/rev_mind = _rev_mind - if (rev_mind.has_antag_datum(/datum/antagonist/rev)) - var/datum/antagonist/rev/rev_antag = rev_mind.has_antag_datum(/datum/antagonist/rev) - rev_antag.remove_revolutionary(FALSE, . == STATION_VICTORY ? DECONVERTER_STATION_WIN : DECONVERTER_REVS_WIN) - LAZYADD(rev_mind.special_statuses, "Former [(rev_mind in ex_headrevs) ? "head revolutionary" : "revolutionary"]") - - if (. == STATION_VICTORY) - // If the revolution was quelled, make rev heads unable to be revived through pods - for (var/_rev_head_mind in ex_revs) - var/datum/mind/rev_head_mind = _rev_head_mind - var/mob/living/carbon/rev_head_body = rev_head_mind.current - if(istype(rev_head_body) && rev_head_body.stat == DEAD) - rev_head_body.makeUncloneable() - - priority_announce("It appears the mutiny has been quelled. Please return yourself and your incapacitated colleagues to work. \ - We have remotely blacklisted the head revolutionaries in your medical records to prevent accidental revival.", null, 'sound/ai/attention.ogg', null, "Central Command Loyalty Monitoring Division") - else - for (var/_player in GLOB.player_list) - var/mob/player = _player - var/datum/mind/mind = player.mind - - if (isnull(mind)) - continue - - if (!(mind.assigned_role in GLOB.command_positions + GLOB.security_positions)) - continue - - var/mob/living/carbon/target_body = mind.current - - mind.add_antag_datum(/datum/antagonist/revolution_enemy) - - if (!istype(target_body)) - continue - - if (target_body.stat == DEAD) - target_body.makeUncloneable() - else - mind.announce_objectives() - - if (revs_win_injection_amount) - var/datum/game_mode/dynamic/dynamic = SSticker.mode - dynamic.create_threat(revs_win_injection_amount) - dynamic.threat_log += "[worldtime2text()]: Revolution victory. Added [revs_win_injection_amount] threat." - - priority_announce("A recent assessment of your station has marked your station as a severe risk area for high ranking Nanotrasen officials. \ - For the safety of our staff, we have blacklisted your station for new employment of security and command. \ - [pick(world.file2list("strings/anti_union_propaganda.txt"))]", null, 'sound/ai/attention.ogg', null, "Central Command Loyalty Monitoring Division") - -/// Mutates the ticker to report that the revs have won -/datum/team/revolution/proc/round_result(finished) - if (finished == REVOLUTION_VICTORY) - SSticker.mode_result = "win - heads killed" - SSticker.news_report = REVS_WIN - else if (finished == STATION_VICTORY) - SSticker.mode_result = "loss - rev heads killed" - SSticker.news_report = REVS_LOSE - -/datum/team/revolution/roundend_report() - if(!members.len && !ex_headrevs.len) - return - - var/list/result = list() - - result += "
" - - var/list/targets = list() - var/list/datum/mind/headrevs - var/list/datum/mind/revs - if(ex_headrevs.len) - headrevs = ex_headrevs - else - headrevs = get_antag_minds(/datum/antagonist/rev/head, TRUE) - - if(ex_revs.len) - revs = ex_revs - else - revs = get_antag_minds(/datum/antagonist/rev, TRUE) - - var/num_revs = 0 - var/num_survivors = 0 - for(var/mob/living/carbon/survivor in GLOB.alive_mob_list) - if(survivor.ckey) - num_survivors += 1 - if ((survivor.mind in revs) || (survivor.mind in headrevs)) - num_revs += 1 - - if(num_survivors) - result += "Command's Approval Rating: [100 - round((num_revs/num_survivors)*100, 0.1)]%
" - - if(headrevs.len) - var/list/headrev_part = list() - headrev_part += "The head revolutionaries were:" - headrev_part += printplayerlist(headrevs) - result += headrev_part.Join("
") - - if(revs.len) - var/list/rev_part = list() - rev_part += "The revolutionaries were:" - rev_part += printplayerlist(revs) - result += rev_part.Join("
") - - var/list/heads = SSjob.get_all_heads() - if(heads.len) - var/head_text = "The heads of staff were:" - head_text += "
    " - for(var/datum/mind/head in heads) - var/target = (head in targets) - head_text += "
  • " - if(target) - head_text += "Target" - head_text += "[printplayer(head, 1)]
  • " - head_text += "

" - result += head_text - - result += "
" - - return result.Join() - -/datum/team/revolution/antag_listing_entry() - var/common_part = "" - var/list/parts = list() - parts += "[antag_listing_name()]
" - parts += "" - - var/list/heads = get_team_antags(/datum/antagonist/rev/head,TRUE) - - for(var/datum/antagonist/A in heads | get_team_antags()) - parts += A.antag_listing_entry() - - parts += "
" - parts += antag_listing_footer() - common_part = parts.Join() - - var/heads_report = "Heads of Staff
" - heads_report += "" - for(var/datum/mind/N in SSjob.get_living_heads()) - var/mob/M = N.current - if(M) - heads_report += "" - heads_report += "" - heads_report += "" - var/turf/mob_loc = get_turf(M) - heads_report += "" - else - heads_report += "" - heads_report += "" - heads_report += "
[M.real_name][M.client ? "" : " (No Client)"][M.stat == DEAD ? " (DEAD)" : ""]PMFLW[mob_loc.loc]
[N.name]([N.key])Head body destroyed!PM
" - return common_part + heads_report - -/datum/team/revolution/is_gamemode_hero() - return SSticker.mode.name == "revolution" - -#undef DECONVERTER_STATION_WIN -#undef DECONVERTER_REVS_WIN diff --git a/code/modules/antagonists/wizard/wizard.dm b/code/modules/antagonists/wizard/wizard.dm index e05e4e83d1c3..528fd33db5d4 100644 --- a/code/modules/antagonists/wizard/wizard.dm +++ b/code/modules/antagonists/wizard/wizard.dm @@ -56,9 +56,6 @@ /datum/antagonist/wizard/proc/send_to_lair() if(!owner || !owner.current) return - if(!GLOB.wizardstart.len) - SSjob.SendToLateJoin(owner.current) - to_chat(owner, "HOT INSERTION, GO GO GO") owner.current.forceMove(pick(GLOB.wizardstart)) /datum/antagonist/wizard/proc/create_objectives() diff --git a/code/modules/assembly/flash.dm b/code/modules/assembly/flash.dm index 3b61fbdd3317..d44b51dbed68 100644 --- a/code/modules/assembly/flash.dm +++ b/code/modules/assembly/flash.dm @@ -130,7 +130,6 @@ var/diff = power * CONFUSION_STACK_MAX_MULTIPLIER - M.confused M.confused += min(power, diff) if(user) - terrible_conversion_proc(M, user) visible_message("[user] blinds [M] with the flash!") to_chat(user, "You blind [M] with the flash!") to_chat(M, "[user] blinds you with the flash!") @@ -187,26 +186,6 @@ return AOE_flash() -/obj/item/assembly/flash/proc/terrible_conversion_proc(mob/living/carbon/H, mob/user) - if(istype(H) && H.stat != DEAD) - if(user.mind) - var/datum/antagonist/rev/head/converter = user.mind.has_antag_datum(/datum/antagonist/rev/head) - if(!converter) - return - if(!H.client) - to_chat(user, "This mind is so vacant that it is not susceptible to influence!") - return - if(H.stat != CONSCIOUS) - to_chat(user, "They must be conscious before you can convert [H.p_them()]!") - return - if(converter.add_revolutionary(H.mind)) - if(prob(1) || SSevents.holidays && SSevents.holidays[APRIL_FOOLS]) - H.say("You son of a bitch! I'm in.", forced = "That son of a bitch! They're in.") - times_used -- //Flashes less likely to burn out for headrevs when used for conversion - else - to_chat(user, "This mind seems resistant to the flash!") - - /obj/item/assembly/flash/cyborg /obj/item/assembly/flash/cyborg/attack(mob/living/M, mob/user) diff --git a/code/modules/events/devil.dm b/code/modules/events/devil.dm index 99ec2a6856de..656888f068bc 100644 --- a/code/modules/events/devil.dm +++ b/code/modules/events/devil.dm @@ -32,7 +32,7 @@ spawned_mobs += devil message_admins("[ADMIN_LOOKUPFLW(devil)] has been made into a devil by an event.") log_game("[key_name(devil)] was spawned as a devil by an event.") - var/datum/job/jobdatum = SSjob.GetJob("Assistant") + var/datum/job/jobdatum = new /datum/job/assistant() devil.job = jobdatum.name jobdatum.equip(devil) return SUCCESSFUL_SPAWN @@ -40,8 +40,6 @@ /proc/create_event_devil(spawn_loc) var/mob/living/carbon/human/new_devil = new(spawn_loc) - if(!spawn_loc) - SSjob.SendToLateJoin(new_devil) var/datum/preferences/A = new() //Randomize appearance for the devil. A.copy_to(new_devil) new_devil.dna.update_dna_identity() diff --git a/code/modules/events/fake_virus.dm b/code/modules/events/fake_virus.dm index e2a68a937d71..0e21622c72c5 100644 --- a/code/modules/events/fake_virus.dm +++ b/code/modules/events/fake_virus.dm @@ -6,7 +6,7 @@ /datum/round_event/fake_virus/start() var/list/fake_virus_victims = list() for(var/mob/living/carbon/human/victim in shuffle(GLOB.player_list)) - if(victim.stat == DEAD || HAS_TRAIT(victim, TRAIT_CRITICAL_CONDITION) || !SSjob.GetJob(victim.mind.assigned_role) || (victim.mind.assigned_role in GLOB.nonhuman_positions)) + if(victim.stat == DEAD || HAS_TRAIT(victim, TRAIT_CRITICAL_CONDITION) || (victim.mind.assigned_role in GLOB.nonhuman_positions)) continue fake_virus_victims += victim diff --git a/code/modules/events/heart_attack.dm b/code/modules/events/heart_attack.dm index 3c947107efa6..35d8c4b141e1 100644 --- a/code/modules/events/heart_attack.dm +++ b/code/modules/events/heart_attack.dm @@ -10,7 +10,7 @@ for(var/mob/living/carbon/human/victim as anything in shuffle(GLOB.human_list)) if(!victim.client || victim.stat == DEAD || HAS_TRAIT(victim, TRAIT_CRITICAL_CONDITION) || !victim.can_heartattack() || victim.has_status_effect(STATUS_EFFECT_EXERCISED) || (/datum/disease/heart_failure in victim.diseases) || victim.undergoing_cardiac_arrest()) continue - if(!SSjob.GetJob(victim.mind.assigned_role) || (victim.mind.assigned_role in GLOB.nonhuman_positions))//only crewmembers can get one, a bit unfair for some ghost roles and it wastes the event + if(victim.mind.assigned_role in GLOB.nonhuman_positions) continue if(victim.satiety <= -60) //Multiple junk food items recently heart_attack_contestants[victim] = 3 diff --git a/code/modules/events/pirates.dm b/code/modules/events/pirates.dm index 691785c5670a..1c47348f18b4 100644 --- a/code/modules/events/pirates.dm +++ b/code/modules/events/pirates.dm @@ -304,14 +304,6 @@ unit_name = "hostage" export_types = list(/mob/living/carbon/human) -/datum/export/pirate/ransom/find_loot() - var/list/head_minds = SSjob.get_living_heads() - var/list/head_mobs = list() - for(var/datum/mind/M in head_minds) - head_mobs += M.current - if(head_mobs.len) - return pick(head_mobs) - /datum/export/pirate/ransom/get_cost(atom/movable/AM) var/mob/living/carbon/human/H = AM if(H.stat != CONSCIOUS || !H.mind || !H.mind.assigned_role) //mint condition only diff --git a/code/modules/jobs/job_types/_job.dm b/code/modules/jobs/job_types/_job.dm index 550b496344ff..93181f40ee18 100644 --- a/code/modules/jobs/job_types/_job.dm +++ b/code/modules/jobs/job_types/_job.dm @@ -15,15 +15,6 @@ //Bitflags for the job var/auto_deadmin_role_flags = NONE - //How many players can be this job - var/total_positions = 0 - - //How many players can spawn in as this job - var/spawn_positions = 0 - - //How many players have this job - var/current_positions = 0 - //If you have the use_age_restriction_for_jobs config option enabled and the database set up, this option will add a requirement for players to be at least minimal_player_age days old. (meaning they first signed in at least that many days before.) var/minimal_player_age = 0 @@ -95,8 +86,6 @@ if(living_mob.client.holder) if(CONFIG_GET(flag/auto_deadmin_players) || (living_mob.client.prefs?.toggles & DEADMIN_ALWAYS)) living_mob.client.holder.auto_deadmin() - else - SSjob.handle_auto_deadmin_roles(living_mob.client, name) radio_help_message(living_mob) //WS Begin - Wikilinks diff --git a/code/modules/jobs/job_types/ai.dm b/code/modules/jobs/job_types/ai.dm index e3df96314769..146a21b35be8 100644 --- a/code/modules/jobs/job_types/ai.dm +++ b/code/modules/jobs/job_types/ai.dm @@ -1,8 +1,6 @@ /datum/job/ai name = "AI" auto_deadmin_role_flags = DEADMIN_POSITION_SILICON - total_positions = 1 - spawn_positions = 1 minimal_player_age = 30 display_order = JOB_DISPLAY_ORDER_AI var/do_special_check = TRUE diff --git a/code/modules/jobs/job_types/assistant.dm b/code/modules/jobs/job_types/assistant.dm index c1e73a823d10..edc78dcf66e8 100644 --- a/code/modules/jobs/job_types/assistant.dm +++ b/code/modules/jobs/job_types/assistant.dm @@ -3,8 +3,6 @@ Assistant */ /datum/job/assistant name = "Assistant" - total_positions = 5 - spawn_positions = 5 access = list() //See /datum/job/assistant/get_access() minimal_access = list() //See /datum/job/assistant/get_access() outfit = /datum/outfit/job/assistant diff --git a/code/modules/jobs/job_types/atmospheric_technician.dm b/code/modules/jobs/job_types/atmospheric_technician.dm index fc5df18a1d17..6c00643f011f 100644 --- a/code/modules/jobs/job_types/atmospheric_technician.dm +++ b/code/modules/jobs/job_types/atmospheric_technician.dm @@ -1,7 +1,5 @@ /datum/job/atmos name = "Atmospheric Technician" - total_positions = 3 - spawn_positions = 2 wiki_page = "Guide_to_Atmospherics" //WS Edit - Wikilinks/Warning outfit = /datum/outfit/job/atmos diff --git a/code/modules/jobs/job_types/bartender.dm b/code/modules/jobs/job_types/bartender.dm index c08a9bb262f8..06d0f92afab8 100644 --- a/code/modules/jobs/job_types/bartender.dm +++ b/code/modules/jobs/job_types/bartender.dm @@ -1,7 +1,5 @@ /datum/job/bartender name = "Bartender" - total_positions = 1 - spawn_positions = 1 wiki_page = "Drinks" //WS Edit - Wikilinks/Warning outfit = /datum/outfit/job/bartender diff --git a/code/modules/jobs/job_types/botanist.dm b/code/modules/jobs/job_types/botanist.dm index 63d90f19abbd..27906b1d8bac 100644 --- a/code/modules/jobs/job_types/botanist.dm +++ b/code/modules/jobs/job_types/botanist.dm @@ -1,7 +1,5 @@ /datum/job/hydro name = "Botanist" - total_positions = 3 - spawn_positions = 2 wiki_page = "Guide_to_Botany" //WS Edit - Wikilinks/Warning outfit = /datum/outfit/job/botanist diff --git a/code/modules/jobs/job_types/brig_physician.dm b/code/modules/jobs/job_types/brig_physician.dm index 4d601a57b732..e489d9954632 100644 --- a/code/modules/jobs/job_types/brig_physician.dm +++ b/code/modules/jobs/job_types/brig_physician.dm @@ -1,7 +1,5 @@ /datum/job/brig_phys name = "Brig Physician" - total_positions = 1 - spawn_positions = 1 minimal_player_age = 7 wiki_page = "Guide_to_Medicine" //WS Edit - Wikilinks/Warning diff --git a/code/modules/jobs/job_types/captain.dm b/code/modules/jobs/job_types/captain.dm index aa4774f3c168..a52ae1055560 100644 --- a/code/modules/jobs/job_types/captain.dm +++ b/code/modules/jobs/job_types/captain.dm @@ -1,8 +1,6 @@ /datum/job/captain name = "Captain" auto_deadmin_role_flags = DEADMIN_POSITION_HEAD|DEADMIN_POSITION_SECURITY - total_positions = 1 - spawn_positions = 1 minimal_player_age = 30 officer = TRUE wiki_page = "Captain" diff --git a/code/modules/jobs/job_types/cargo_technician.dm b/code/modules/jobs/job_types/cargo_technician.dm index 3f8c24c105be..430d85ce15ae 100644 --- a/code/modules/jobs/job_types/cargo_technician.dm +++ b/code/modules/jobs/job_types/cargo_technician.dm @@ -1,7 +1,5 @@ /datum/job/cargo_tech name = "Cargo Technician" - total_positions = 3 - spawn_positions = 2 wiki_page = "Cargo_technician" //WS Edit - Wikilinks/Warning outfit = /datum/outfit/job/cargo_tech diff --git a/code/modules/jobs/job_types/chaplain.dm b/code/modules/jobs/job_types/chaplain.dm index efb9292353b7..97a2a2403717 100644 --- a/code/modules/jobs/job_types/chaplain.dm +++ b/code/modules/jobs/job_types/chaplain.dm @@ -1,7 +1,5 @@ /datum/job/chaplain name = "Chaplain" - total_positions = 1 - spawn_positions = 1 wiki_page = "Chaplain" //WS Edit - Wikilinks/Warning outfit = /datum/outfit/job/chaplain diff --git a/code/modules/jobs/job_types/chemist.dm b/code/modules/jobs/job_types/chemist.dm index 51f39864445b..55660bd0994d 100644 --- a/code/modules/jobs/job_types/chemist.dm +++ b/code/modules/jobs/job_types/chemist.dm @@ -1,7 +1,5 @@ /datum/job/chemist name = "Chemist" - total_positions = 2 - spawn_positions = 2 wiki_page = "Guide_to_Chemistry" //WS Edit - Wikilinks/Warning outfit = /datum/outfit/job/chemist diff --git a/code/modules/jobs/job_types/chief_engineer.dm b/code/modules/jobs/job_types/chief_engineer.dm index 9926a0fd7f6c..4660d4126a5f 100644 --- a/code/modules/jobs/job_types/chief_engineer.dm +++ b/code/modules/jobs/job_types/chief_engineer.dm @@ -1,8 +1,6 @@ /datum/job/chief_engineer name = "Chief Engineer" auto_deadmin_role_flags = DEADMIN_POSITION_HEAD - total_positions = 1 - spawn_positions = 1 minimal_player_age = 7 officer = TRUE wiki_page = "Chief_Engineer" //WS Edit - Wikilinks/Warning diff --git a/code/modules/jobs/job_types/chief_medical_officer.dm b/code/modules/jobs/job_types/chief_medical_officer.dm index 3e7f96db7d41..4e37b029e0eb 100644 --- a/code/modules/jobs/job_types/chief_medical_officer.dm +++ b/code/modules/jobs/job_types/chief_medical_officer.dm @@ -1,8 +1,6 @@ /datum/job/cmo name = "Chief Medical Officer" auto_deadmin_role_flags = DEADMIN_POSITION_HEAD - total_positions = 1 - spawn_positions = 1 minimal_player_age = 7 officer = TRUE wiki_page = "Chief_Medical_Officer" diff --git a/code/modules/jobs/job_types/clown.dm b/code/modules/jobs/job_types/clown.dm index cecfb2fd8f63..d131d8ad4cd4 100644 --- a/code/modules/jobs/job_types/clown.dm +++ b/code/modules/jobs/job_types/clown.dm @@ -1,7 +1,5 @@ /datum/job/clown name = "Clown" - total_positions = 1 - spawn_positions = 1 wiki_page = "Clown" //WS Edit - Wikilinks/Warning outfit = /datum/outfit/job/clown diff --git a/code/modules/jobs/job_types/cook.dm b/code/modules/jobs/job_types/cook.dm index 6f90a883267e..d1006a5b154f 100644 --- a/code/modules/jobs/job_types/cook.dm +++ b/code/modules/jobs/job_types/cook.dm @@ -1,7 +1,5 @@ /datum/job/cook name = "Cook" - total_positions = 2 - spawn_positions = 1 wiki_page = "Food" //WS Edit - Wikilinks/Warning var/cooks = 0 //Counts cooks amount diff --git a/code/modules/jobs/job_types/curator.dm b/code/modules/jobs/job_types/curator.dm index 791c1ba667c6..d069e3411bbc 100644 --- a/code/modules/jobs/job_types/curator.dm +++ b/code/modules/jobs/job_types/curator.dm @@ -1,7 +1,5 @@ /datum/job/curator name = "Curator" - total_positions = 1 - spawn_positions = 1 wiki_page = "Curator" //WS Edit - Wikilinks/Warning outfit = /datum/outfit/job/curator diff --git a/code/modules/jobs/job_types/cyborg.dm b/code/modules/jobs/job_types/cyborg.dm index 3eddc92c017d..460406436e97 100644 --- a/code/modules/jobs/job_types/cyborg.dm +++ b/code/modules/jobs/job_types/cyborg.dm @@ -1,8 +1,6 @@ /datum/job/cyborg name = "Cyborg" auto_deadmin_role_flags = DEADMIN_POSITION_SILICON - total_positions = 0 - spawn_positions = 1 //Nodrak minimal_player_age = 21 wiki_page = "Cyborg" //WS Edit - Wikilinks/Warning diff --git a/code/modules/jobs/job_types/detective.dm b/code/modules/jobs/job_types/detective.dm index 9a263ae85207..450ac5064e34 100644 --- a/code/modules/jobs/job_types/detective.dm +++ b/code/modules/jobs/job_types/detective.dm @@ -1,8 +1,6 @@ /datum/job/detective name = "Detective" auto_deadmin_role_flags = DEADMIN_POSITION_SECURITY - total_positions = 1 - spawn_positions = 1 minimal_player_age = 7 wiki_page = "Space_Law" //WS Edit - Wikilinks/Warning diff --git a/code/modules/jobs/job_types/geneticist.dm b/code/modules/jobs/job_types/geneticist.dm index 181109e65c31..93f777e61e41 100644 --- a/code/modules/jobs/job_types/geneticist.dm +++ b/code/modules/jobs/job_types/geneticist.dm @@ -1,7 +1,5 @@ /datum/job/geneticist - name = "Geneticist" //WS Edit - More Gen/Sci Split - total_positions = 2 - spawn_positions = 2 //WS Edit - Gen/Sci Split + name = "Geneticist" wiki_page = "Guide_to_Genetics" //WS Edit - Wikilinks outfit = /datum/outfit/job/geneticist diff --git a/code/modules/jobs/job_types/head_of_personnel.dm b/code/modules/jobs/job_types/head_of_personnel.dm index 6a1047a5c5b8..933c22437c2d 100644 --- a/code/modules/jobs/job_types/head_of_personnel.dm +++ b/code/modules/jobs/job_types/head_of_personnel.dm @@ -1,8 +1,6 @@ /datum/job/head_of_personnel name = "Head of Personnel" auto_deadmin_role_flags = DEADMIN_POSITION_HEAD - total_positions = 1 - spawn_positions = 1 minimal_player_age = 10 officer = TRUE wiki_page = "Head_of_Personnel" //WS Edit - Wikilinks/Warning diff --git a/code/modules/jobs/job_types/head_of_security.dm b/code/modules/jobs/job_types/head_of_security.dm index c2c91c204fa4..50f7fb555737 100644 --- a/code/modules/jobs/job_types/head_of_security.dm +++ b/code/modules/jobs/job_types/head_of_security.dm @@ -1,8 +1,6 @@ /datum/job/hos name = "Head of Security" auto_deadmin_role_flags = DEADMIN_POSITION_HEAD|DEADMIN_POSITION_SECURITY - total_positions = 1 - spawn_positions = 1 minimal_player_age = 14 officer = TRUE wiki_page = "Head_of_Security" //WS Edit - Wikilinks/Warning diff --git a/code/modules/jobs/job_types/janitor.dm b/code/modules/jobs/job_types/janitor.dm index 71a4998f254b..ac70f3c8153a 100644 --- a/code/modules/jobs/job_types/janitor.dm +++ b/code/modules/jobs/job_types/janitor.dm @@ -1,7 +1,5 @@ /datum/job/janitor name = "Janitor" - total_positions = 2 - spawn_positions = 1 wiki_page = "Janitor" //WS Edit - Wikilinks/Warning outfit = /datum/outfit/job/janitor diff --git a/code/modules/jobs/job_types/lawyer.dm b/code/modules/jobs/job_types/lawyer.dm index af30fb3e129e..d0777a8af2f8 100644 --- a/code/modules/jobs/job_types/lawyer.dm +++ b/code/modules/jobs/job_types/lawyer.dm @@ -1,7 +1,5 @@ /datum/job/lawyer name = "Lawyer" - total_positions = 2 - spawn_positions = 2 wiki_page = "Lawyer" //WS Edit - Wikilinks/Warning var/lawyers = 0 //Counts lawyer amount diff --git a/code/modules/jobs/job_types/medical_doctor.dm b/code/modules/jobs/job_types/medical_doctor.dm index 221c29482d7c..b0e2db0a2722 100644 --- a/code/modules/jobs/job_types/medical_doctor.dm +++ b/code/modules/jobs/job_types/medical_doctor.dm @@ -1,7 +1,5 @@ /datum/job/doctor name = "Medical Doctor" - total_positions = 5 - spawn_positions = 3 wiki_page = "Guide_to_Medicine" outfit = /datum/outfit/job/doctor diff --git a/code/modules/jobs/job_types/mime.dm b/code/modules/jobs/job_types/mime.dm index b9cca8f02106..3d165c8610b7 100644 --- a/code/modules/jobs/job_types/mime.dm +++ b/code/modules/jobs/job_types/mime.dm @@ -1,7 +1,5 @@ /datum/job/mime name = "Mime" - total_positions = 1 - spawn_positions = 1 wiki_page = "Mime" //WS Edit - Wikilinks/Warning outfit = /datum/outfit/job/mime diff --git a/code/modules/jobs/job_types/paramedic.dm b/code/modules/jobs/job_types/paramedic.dm index 3c39aa536fda..cbe3e3296df0 100644 --- a/code/modules/jobs/job_types/paramedic.dm +++ b/code/modules/jobs/job_types/paramedic.dm @@ -1,7 +1,5 @@ /datum/job/paramedic name = "Paramedic" - total_positions = 2 - spawn_positions = 2 wiki_page = "Paramedic" outfit = /datum/outfit/job/paramedic diff --git a/code/modules/jobs/job_types/prisoner.dm b/code/modules/jobs/job_types/prisoner.dm index b1f26f07c30e..9aaba438cdb4 100644 --- a/code/modules/jobs/job_types/prisoner.dm +++ b/code/modules/jobs/job_types/prisoner.dm @@ -1,7 +1,5 @@ /datum/job/prisoner name = "Prisoner" - total_positions = 0 - spawn_positions = 2 outfit = /datum/outfit/job/prisoner diff --git a/code/modules/jobs/job_types/psychologist.dm b/code/modules/jobs/job_types/psychologist.dm index 5bf7d50c790c..de4a0eb10a24 100644 --- a/code/modules/jobs/job_types/psychologist.dm +++ b/code/modules/jobs/job_types/psychologist.dm @@ -1,8 +1,6 @@ //psychologist back :) /datum/job/psychologist name = "Psychologist" - total_positions = 1 - spawn_positions = 1 outfit = /datum/outfit/job/psychologist diff --git a/code/modules/jobs/job_types/quartermaster.dm b/code/modules/jobs/job_types/quartermaster.dm index 515c8d6e8f17..c3d465c55826 100644 --- a/code/modules/jobs/job_types/quartermaster.dm +++ b/code/modules/jobs/job_types/quartermaster.dm @@ -1,7 +1,5 @@ /datum/job/qm name = "Quartermaster" - total_positions = 1 - spawn_positions = 1 wiki_page = "Quartermaster" //WS Edit - Wikilinks/Warning officer = TRUE diff --git a/code/modules/jobs/job_types/research_director.dm b/code/modules/jobs/job_types/research_director.dm index 2fd7fea06db7..7a91f58996a4 100644 --- a/code/modules/jobs/job_types/research_director.dm +++ b/code/modules/jobs/job_types/research_director.dm @@ -1,8 +1,6 @@ /datum/job/rd name = "Research Director" auto_deadmin_role_flags = DEADMIN_POSITION_HEAD - total_positions = 1 - spawn_positions = 1 minimal_player_age = 7 officer = TRUE wiki_page = "Research_Director" //WS Edit - Wikilinks/Warning diff --git a/code/modules/jobs/job_types/roboticist.dm b/code/modules/jobs/job_types/roboticist.dm index c0315d02902b..ad203cba570e 100644 --- a/code/modules/jobs/job_types/roboticist.dm +++ b/code/modules/jobs/job_types/roboticist.dm @@ -1,7 +1,5 @@ /datum/job/roboticist name = "Roboticist" - total_positions = 2 - spawn_positions = 2 wiki_page = "Guide_to_Robotics" //WS Edit - Wikilinks/Warning outfit = /datum/outfit/job/roboticist diff --git a/code/modules/jobs/job_types/scientist.dm b/code/modules/jobs/job_types/scientist.dm index 391db06c289a..692f7616e5fe 100644 --- a/code/modules/jobs/job_types/scientist.dm +++ b/code/modules/jobs/job_types/scientist.dm @@ -1,7 +1,5 @@ /datum/job/scientist name = "Scientist" - total_positions = 5 - spawn_positions = 3 wiki_page = "Scientist" //WS Edit - Wikilinks/Warning outfit = /datum/outfit/job/scientist diff --git a/code/modules/jobs/job_types/security_officer.dm b/code/modules/jobs/job_types/security_officer.dm index 31843500644f..7b990aa23092 100644 --- a/code/modules/jobs/job_types/security_officer.dm +++ b/code/modules/jobs/job_types/security_officer.dm @@ -1,8 +1,6 @@ /datum/job/officer name = "Security Officer" auto_deadmin_role_flags = DEADMIN_POSITION_SECURITY - total_positions = 5 //Handled in /datum/controller/occupations/proc/setup_officer_positions() - spawn_positions = 5 //Handled in /datum/controller/occupations/proc/setup_officer_positions() minimal_player_age = 7 wiki_page = "Space_Law" //WS Edit - Wikilinks/Warning diff --git a/code/modules/jobs/job_types/shaft_miner.dm b/code/modules/jobs/job_types/shaft_miner.dm index cf28a2c3bde3..2228c69d3cde 100644 --- a/code/modules/jobs/job_types/shaft_miner.dm +++ b/code/modules/jobs/job_types/shaft_miner.dm @@ -1,7 +1,5 @@ /datum/job/mining name = "Shaft Miner" - total_positions = 3 - spawn_positions = 3 wiki_page = "Shaft_Miner" //WS Edit - Wikilinks/Warning outfit = /datum/outfit/job/miner diff --git a/code/modules/jobs/job_types/solgov_rep.dm b/code/modules/jobs/job_types/solgov_rep.dm index a7c185624763..f95b520e2850 100644 --- a/code/modules/jobs/job_types/solgov_rep.dm +++ b/code/modules/jobs/job_types/solgov_rep.dm @@ -4,8 +4,6 @@ SolGov Representative /datum/job/solgov name = "SolGov Representative" - total_positions = 2 - spawn_positions = 2 wiki_page = "Government_Attaché" minimal_player_age = 7 officer = TRUE diff --git a/code/modules/jobs/job_types/station_engineer.dm b/code/modules/jobs/job_types/station_engineer.dm index ac5c820b22a8..44e5ce762855 100644 --- a/code/modules/jobs/job_types/station_engineer.dm +++ b/code/modules/jobs/job_types/station_engineer.dm @@ -1,7 +1,5 @@ /datum/job/engineer name = "Station Engineer" - total_positions = 5 - spawn_positions = 5 wiki_page = "Station_Engineer" //WS Edit - Wikilinks/Warning outfit = /datum/outfit/job/engineer diff --git a/code/modules/jobs/job_types/virologist.dm b/code/modules/jobs/job_types/virologist.dm index 3251977c4821..ccfc03bdaad6 100644 --- a/code/modules/jobs/job_types/virologist.dm +++ b/code/modules/jobs/job_types/virologist.dm @@ -1,7 +1,5 @@ /datum/job/virologist name = "Virologist" - total_positions = 1 - spawn_positions = 1 wiki_page = "Infections" //WS Edit - Wikilinks/Warning outfit = /datum/outfit/job/virologist diff --git a/code/modules/jobs/job_types/warden.dm b/code/modules/jobs/job_types/warden.dm index 1167989d1afd..ebdf67329e54 100644 --- a/code/modules/jobs/job_types/warden.dm +++ b/code/modules/jobs/job_types/warden.dm @@ -1,8 +1,6 @@ /datum/job/warden name = "Warden" auto_deadmin_role_flags = DEADMIN_POSITION_SECURITY - total_positions = 1 - spawn_positions = 1 minimal_player_age = 7 officer = TRUE wiki_page = "Space_Law" //WS Edit - Wikilinks/Warning diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index fc23e4b79200..10b57e909e38 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -306,7 +306,8 @@ character = equip if(job && !job.override_latejoin_spawn(character)) - SSjob.SendToLateJoin(character, destination = pick(ship.shuttle_port.spawn_points)) + var/atom/spawn_point = pick(ship.shuttle_port.spawn_points) + spawn_point.join_player_here(character) var/atom/movable/screen/splash/Spl = new(character.client, TRUE) Spl.Fade(TRUE) character.playsound_local(get_turf(character), 'sound/voice/ApproachingTG.ogg', 25) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 63fbbc8a26da..bc7c4b6f6d35 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1708,11 +1708,6 @@ GLOBAL_LIST_EMPTY(roundstart_races) else H.adjustOrganLoss(ORGAN_SLOT_BRAIN, I.force * 0.2) - if(H.mind && H.stat == CONSCIOUS && H != user && prob(I.force + ((100 - H.health) * 0.5))) // rev deconversion through blunt trauma. - var/datum/antagonist/rev/rev = H.mind.has_antag_datum(/datum/antagonist/rev) - if(rev) - rev.remove_revolutionary(FALSE, user) - if(bloody) //Apply blood if(H.wear_mask) H.wear_mask.add_mob_blood(H) diff --git a/code/modules/mob/living/silicon/login.dm b/code/modules/mob/living/silicon/login.dm index ad28d663690d..559ad42b1768 100644 --- a/code/modules/mob/living/silicon/login.dm +++ b/code/modules/mob/living/silicon/login.dm @@ -1,9 +1,6 @@ /mob/living/silicon/Login() if(mind && SSticker.mode) SSticker.mode.remove_cultist(mind, 0, 0) - var/datum/antagonist/rev/rev = mind.has_antag_datum(/datum/antagonist/rev) - if(rev) - rev.remove_revolutionary(TRUE) return ..() diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index cbc6599a3980..b3719d9cca52 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -106,5 +106,3 @@ return client.holder.auto_deadmin() if(mind.has_antag_datum(/datum/antagonist) && (CONFIG_GET(flag/auto_deadmin_antagonists) || client.prefs?.toggles & DEADMIN_ANTAGONIST)) return client.holder.auto_deadmin() - if(job) - return SSjob.handle_auto_deadmin_roles(client, job) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index efd7a90694fa..9a0c636c119f 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -330,9 +330,6 @@ return FALSE if(M.mind && M.mind.special_role)//If they have a mind and special role, they are some type of traitor or antagonist. switch(SSticker.mode.config_tag) - if("revolution") - if(is_revolutionary(M)) - return 2 if("cult") if(M.mind in SSticker.mode.cult) return 2 diff --git a/code/modules/modular_computers/computers/machinery/console_presets.dm b/code/modules/modular_computers/computers/machinery/console_presets.dm index 3c741e987ea5..fba43fdd5403 100644 --- a/code/modules/modular_computers/computers/machinery/console_presets.dm +++ b/code/modules/modular_computers/computers/machinery/console_presets.dm @@ -80,7 +80,6 @@ var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD] hard_drive.store_file(new/datum/computer_file/program/chatclient()) hard_drive.store_file(new/datum/computer_file/program/card_mod()) - hard_drive.store_file(new/datum/computer_file/program/job_management()) // ===== CIVILIAN CONSOLE ===== /obj/machinery/modular_computer/console/preset/civilian diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm index 858822f68ac8..35db349485c1 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm @@ -502,15 +502,6 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_name = "Cuba Libre" glass_desc = "A classic mix of rum, cola, and lime. A favorite of revolutionaries everywhere!" -/datum/reagent/consumable/ethanol/cuba_libre/on_mob_life(mob/living/carbon/M) - if(M.mind && M.mind.has_antag_datum(/datum/antagonist/rev)) //Cuba Libre, the traditional drink of revolutions! Heals revolutionaries. - M.adjustBruteLoss(-1, 0) - M.adjustFireLoss(-1, 0) - M.adjustToxLoss(-1, 0) - M.adjustOxyLoss(-5, 0) - . = 1 - return ..() || . - /datum/reagent/consumable/ethanol/whiskey_cola name = "Whiskey Cola" description = "Whiskey, mixed with cola. Surprisingly refreshing." diff --git a/code/modules/research/nanites/nanite_programs/buffing.dm b/code/modules/research/nanites/nanite_programs/buffing.dm index 7d82324a8de1..e0f490ca1123 100644 --- a/code/modules/research/nanites/nanite_programs/buffing.dm +++ b/code/modules/research/nanites/nanite_programs/buffing.dm @@ -116,9 +116,8 @@ /datum/nanite_program/mindshield/enable_passive_effect() . = ..() - if(!host_mob.mind.has_antag_datum(/datum/antagonist/rev, TRUE)) //won't work if on a rev, to avoid having implanted revs. - ADD_TRAIT(host_mob, TRAIT_MINDSHIELD, "nanites") - host_mob.sec_hud_set_implants() + ADD_TRAIT(host_mob, TRAIT_MINDSHIELD, "nanites") + host_mob.sec_hud_set_implants() /datum/nanite_program/mindshield/disable_passive_effect() . = ..() diff --git a/code/modules/spells/spell_types/pointed/mind_transfer.dm b/code/modules/spells/spell_types/pointed/mind_transfer.dm index 20ccea1ee98c..3aded059868a 100644 --- a/code/modules/spells/spell_types/pointed/mind_transfer.dm +++ b/code/modules/spells/spell_types/pointed/mind_transfer.dm @@ -30,7 +30,7 @@ var/mob/living/victim = targets[1] //The target of the spell whos body will be transferred to. var/datum/mind/VM = victim.mind - if(victim.anti_magic_check(TRUE, FALSE) || VM.has_antag_datum(/datum/antagonist/wizard) || VM.has_antag_datum(/datum/antagonist/cult) || VM.has_antag_datum(/datum/antagonist/changeling) || VM.has_antag_datum(/datum/antagonist/rev) || victim.key[1] == "@") + if(victim.anti_magic_check(TRUE, FALSE) || VM.has_antag_datum(/datum/antagonist/wizard) || VM.has_antag_datum(/datum/antagonist/cult) || VM.has_antag_datum(/datum/antagonist/changeling) || victim.key[1] == "@") if(!silent) to_chat(user, "[victim.p_their(TRUE)] mind is resisting your spell!") return FALSE diff --git a/shiptest.dme b/shiptest.dme index 6496bbd65b03..b1ab97991389 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -814,7 +814,6 @@ #include "code\game\gamemodes\meteor\meteors.dm" #include "code\game\gamemodes\monkey\monkey.dm" #include "code\game\gamemodes\nuclear\nuclear.dm" -#include "code\game\gamemodes\revolution\revolution.dm" #include "code\game\gamemodes\sandbox\airlock_maker.dm" #include "code\game\gamemodes\sandbox\h_sandbox.dm" #include "code\game\gamemodes\sandbox\sandbox.dm" @@ -1679,7 +1678,6 @@ #include "code\modules\antagonists\revenant\revenant_antag.dm" #include "code\modules\antagonists\revenant\revenant_blight.dm" #include "code\modules\antagonists\revenant\revenant_spawn_event.dm" -#include "code\modules\antagonists\revolution\revolution.dm" #include "code\modules\antagonists\santa\santa.dm" #include "code\modules\antagonists\separatist\separatist.dm" #include "code\modules\antagonists\slaughter\slaughter.dm" @@ -2750,7 +2748,6 @@ #include "code\modules\modular_computers\file_system\programs\cargoship.dm" #include "code\modules\modular_computers\file_system\programs\configurator.dm" #include "code\modules\modular_computers\file_system\programs\file_browser.dm" -#include "code\modules\modular_computers\file_system\programs\jobmanagement.dm" #include "code\modules\modular_computers\file_system\programs\ntdownloader.dm" #include "code\modules\modular_computers\file_system\programs\ntmonitor.dm" #include "code\modules\modular_computers\file_system\programs\ntnrc_client.dm" From aff7797d272a74724745d136b912ca580632d288 Mon Sep 17 00:00:00 2001 From: Mark Suckerberg Date: Mon, 3 Jul 2023 23:36:02 -0500 Subject: [PATCH 2/5] more trimming --- code/__DEFINES/role_preferences.dm | 1 - code/__HELPERS/game.dm | 1 - code/_onclick/hud/families.dm | 28 - code/_onclick/hud/hud.dm | 5 - code/controllers/subsystem/job.dm | 71 --- code/controllers/subsystem/ticker.dm | 2 - code/datums/mind.dm | 4 +- code/game/gamemodes/gang/gang.dm | 498 ------------------ code/game/gamemodes/gang/gang_things.dm | 57 -- code/game/objects/items/crayons.dm | 74 +-- code/modules/admin/admin.dm | 11 +- code/modules/antagonists/ert/ert.dm | 112 ---- code/modules/mob/living/carbon/human/death.dm | 1 - .../overmap/ships/controlled_ship_datum.dm | 1 + shiptest.dme | 4 - 15 files changed, 34 insertions(+), 836 deletions(-) delete mode 100644 code/_onclick/hud/families.dm delete mode 100644 code/game/gamemodes/gang/gang.dm delete mode 100644 code/game/gamemodes/gang/gang_things.dm diff --git a/code/__DEFINES/role_preferences.dm b/code/__DEFINES/role_preferences.dm index 0cbca56696fd..4603279a7672 100644 --- a/code/__DEFINES/role_preferences.dm +++ b/code/__DEFINES/role_preferences.dm @@ -66,7 +66,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 )) diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 438bbdfda28f..1a3c6526150a 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -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() diff --git a/code/_onclick/hud/families.dm b/code/_onclick/hud/families.dm deleted file mode 100644 index eb4bc2239c6a..000000000000 --- a/code/_onclick/hud/families.dm +++ /dev/null @@ -1,28 +0,0 @@ -/atom/movable/screen/wanted - name = "Space Police Alertness" - desc = "Shows the current level of hostility the space police is planning to rain down on you. Better be careful." - icon = 'icons/obj/gang/wanted_160x32.dmi' - icon_state = "wanted_0" - screen_loc = ui_wanted_lvl - ///Wanted level, affects the hud icon. - var/level - ///Boolean, have the cops arrived? If so, the icon stops changing and remains the same. - var/cops_arrived - -/atom/movable/screen/wanted/Initialize() - . = ..() - var/datum/game_mode/gang/F = SSticker.mode - level = F.wanted_level - cops_arrived = F.cops_arrived - update_icon() - -/atom/movable/screen/wanted/MouseEntered(location,control,params) - . = ..() - openToolTip(usr,src,params,title = name,content = desc, theme = "alerttooltipstyle") - -/atom/movable/screen/wanted/MouseExited() - closeToolTip(usr) - -/atom/movable/screen/wanted/update_icon_state() - . = ..() - icon_state = "wanted_[level][cops_arrived ? "_active" : ""]" diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index abd07ffc0ae0..a21659eb8d70 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -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 @@ -113,7 +109,6 @@ GLOBAL_LIST_INIT(available_ui_styles, list( healths = null healthdoll = null - wanted_lvl = null internals = null lingchemdisplay = null devilsouldisplay = null diff --git a/code/controllers/subsystem/job.dm b/code/controllers/subsystem/job.dm index d39cc5daedce..03cf06e7776b 100644 --- a/code/controllers/subsystem/job.dm +++ b/code/controllers/subsystem/job.dm @@ -29,7 +29,6 @@ SUBSYSTEM_DEF(job) return 1 - /datum/controller/subsystem/job/proc/GetJob(rank) if(!occupations.len) SetupOccupations() @@ -42,20 +41,9 @@ SUBSYSTEM_DEF(job) SetupOccupations() return type_occupations[jobtype] -/datum/controller/subsystem/job/proc/ResetOccupations() - JobDebug("Occupations reset.") - for(var/i in GLOB.new_player_list) - var/mob/dead/new_player/player = i - if((player) && (player.mind)) - player.mind.assigned_role = null - player.mind.special_role = null - SetupOccupations() - return - /datum/controller/subsystem/job/Recover() set waitfor = FALSE var/oldjobs = SSjob.occupations - sleep(20) /atom/proc/join_player_here(mob/M) // By default, just place the mob on the same turf as the marker or whatever. @@ -67,65 +55,6 @@ SUBSYSTEM_DEF(job) return ..() -/datum/controller/subsystem/job/proc/SendToLateJoin(mob/M, buckle = TRUE, atom/destination) - if(destination) - destination.join_player_here(M, buckle) - return TRUE - - if(M.mind && M.mind.assigned_role && length(GLOB.jobspawn_overrides[M.mind.assigned_role])) //We're doing something special today. - destination = pick(GLOB.jobspawn_overrides[M.mind.assigned_role]) - destination.join_player_here(M, FALSE) - return TRUE - - var/msg = "Unable to send mob [M] to late join!" - message_admins(msg) - CRASH(msg) - - -/////////////////////////////////// -//Keeps track of all living heads// -/////////////////////////////////// -/datum/controller/subsystem/job/proc/get_living_heads() - . = list() - for(var/i in GLOB.human_list) - var/mob/living/carbon/human/player = i - if(player.stat != DEAD && player.mind && (player.mind.assigned_role in GLOB.command_positions)) - . |= player.mind - - -//////////////////////////// -//Keeps track of all heads// -//////////////////////////// -/datum/controller/subsystem/job/proc/get_all_heads() - . = list() - for(var/i in GLOB.mob_list) - var/mob/player = i - if(player.mind && (player.mind.assigned_role in GLOB.command_positions)) - . |= player.mind - -////////////////////////////////////////////// -//Keeps track of all living security members// -////////////////////////////////////////////// -/datum/controller/subsystem/job/proc/get_living_sec() - . = list() - for(var/i in GLOB.human_list) - var/mob/living/carbon/human/player = i - if(player.stat != DEAD && player.mind && (player.mind.assigned_role in GLOB.security_positions)) - . |= player.mind - -//////////////////////////////////////// -//Keeps track of all security members// -//////////////////////////////////////// -/datum/controller/subsystem/job/proc/get_all_sec() - . = list() - for(var/i in GLOB.human_list) - var/mob/living/carbon/human/player = i - if(player.mind && (player.mind.assigned_role in GLOB.security_positions)) - . |= player.mind - -/datum/controller/subsystem/job/proc/JobDebug(message) - log_job_debug(message) - /datum/controller/subsystem/job/proc/get_manifest() var/list/manifest_out = list() for(var/datum/overmap/ship/controlled/ship as anything in SSovermap.controlled_ships) diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index 5fd2805507b7..44bfbda51d1a 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -240,7 +240,6 @@ SUBSYSTEM_DEF(ticker) to_chat(world, "Unable to start [mode.name]. Not enough players, [mode.required_players] players and [mode.required_enemies] eligible antagonists needed. Reverting to pre-game lobby.") qdel(mode) mode = null - SSjob.ResetOccupations() return 0 CHECK_TICK @@ -254,7 +253,6 @@ SUBSYSTEM_DEF(ticker) log_game("[mode.name] failed pre_setup, cause: [mode.setup_error]") QDEL_NULL(mode) to_chat(world, "Error setting up [GLOB.master_mode]. Reverting to pre-game lobby.") - SSjob.ResetOccupations() return 0 else message_admins("DEBUG: Bypassing prestart checks...") diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 97eb2762c8d0..50568ef82863 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -87,8 +87,8 @@ /// A lazy list of statuses to add next to this mind in the traitor panel var/list/special_statuses - ///WS edit - Crew objectives variable, stores crew objective datums - var/list/crew_objectives + /// A weakref to the /datum/overmap/ship/controlled the original mob spawned on + var/datum/weakref/original_ship /datum/mind/New(_key) SSticker.minds += src diff --git a/code/game/gamemodes/gang/gang.dm b/code/game/gamemodes/gang/gang.dm deleted file mode 100644 index 04cb6ecb9c7a..000000000000 --- a/code/game/gamemodes/gang/gang.dm +++ /dev/null @@ -1,498 +0,0 @@ -#define LOWPOP_FAMILIES_COUNT 50 - -#define TWO_STARS_HIGHPOP 11 -#define THREE_STARS_HIGHPOP 16 -#define FOUR_STARS_HIGHPOP 21 -#define FIVE_STARS_HIGHPOP 31 - -#define TWO_STARS_LOW 6 -#define THREE_STARS_LOW 9 -#define FOUR_STARS_LOW 12 -#define FIVE_STARS_LOW 15 - -#define CREW_SIZE_MIN 4 -#define CREW_SIZE_MAX 8 - - -GLOBAL_VAR_INIT(deaths_during_shift, 0) -/datum/game_mode/gang - name = "Families" - config_tag = "families" - antag_flag = ROLE_FAMILIES - false_report_weight = 5 - required_players = 40 - required_enemies = 6 - recommended_enemies = 6 - announce_span = "danger" - announce_text = "Grove For Lyfe!" - reroll_friendly = FALSE - restricted_jobs = list("Cyborg", "AI", "Prisoner","Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel")//N O - protected_jobs = list() - var/check_counter = 0 - var/endtime = null - var/start_time = null - var/fuckingdone = FALSE - var/time_to_end = 60 MINUTES - var/gangs_to_generate = 3 - var/list/gangs_to_use - var/list/datum/mind/gangbangers = list() - var/list/datum/mind/pigs = list() - var/list/datum/mind/undercover_cops = list() - var/list/gangs = list() - var/gangs_still_alive = 0 - var/sent_announcement = FALSE - var/list/gang_locations = list() - var/cops_arrived = FALSE - var/gang_balance_cap = 5 - var/wanted_level = 0 - -/datum/game_mode/gang/warriors - name = "Warriors" - config_tag = "warriors" - announce_text = "Can you survive this onslaught?" - gangs_to_generate = 11 - gang_balance_cap = 3 - -/datum/game_mode/gang/warriors/pre_setup() - gangs_to_use = subtypesof(/datum/antagonist/gang) - gangs_to_generate = gangs_to_use.len - . = ..() - -/datum/game_mode/gang/pre_setup() - gangs_to_use = subtypesof(/datum/antagonist/gang) - for(var/j = 0, j < gangs_to_generate, j++) - if (!antag_candidates.len) - break - var/datum/mind/gangbanger = antag_pick(antag_candidates) - gangbangers += gangbanger - gangbanger.restricted_roles = restricted_jobs - log_game("[key_name(gangbanger)] has been selected as a starting gangster!") - antag_candidates.Remove(gangbanger) - for(var/j = 0, j < gangs_to_generate, j++) - if(!antag_candidates.len) - break - var/datum/mind/one_eight_seven_on_an_undercover_cop = antag_pick(antag_candidates) - pigs += one_eight_seven_on_an_undercover_cop - undercover_cops += one_eight_seven_on_an_undercover_cop - one_eight_seven_on_an_undercover_cop.restricted_roles = restricted_jobs - log_game("[key_name(one_eight_seven_on_an_undercover_cop)] has been selected as a starting undercover cop!") - antag_candidates.Remove(one_eight_seven_on_an_undercover_cop) - endtime = world.time + time_to_end - start_time = world.time - return TRUE - -/datum/game_mode/gang/post_setup() - var/replacement_gangsters = 0 - var/replacement_cops = 0 - for(var/datum/mind/gangbanger in gangbangers) - if(!ishuman(gangbanger.current)) - gangbangers.Remove(gangbanger) - log_game("[gangbanger] was not a human, and thus has lost their gangster role.") - replacement_gangsters++ - if(replacement_gangsters) - for(var/j = 0, j < replacement_gangsters, j++) - if(!antag_candidates.len) - log_game("Unable to find more replacement gangsters. Not all of the gangs will spawn.") - break - var/datum/mind/gangbanger = antag_pick(antag_candidates) - gangbangers += gangbanger - log_game("[key_name(gangbanger)] has been selected as a replacement gangster!") - for(var/datum/mind/undercover_cop in undercover_cops) - if(!ishuman(undercover_cop.current)) - undercover_cops.Remove(undercover_cop) - pigs.Remove(undercover_cop) - log_game("[undercover_cop] was not a human, and thus has lost their undercover cop role.") - replacement_cops++ - if(replacement_cops) - for(var/j = 0, j < replacement_cops, j++) - if(!antag_candidates.len) - log_game("Unable to find more replacement undercover cops. Not all of the gangs will spawn.") - break - var/datum/mind/undercover_cop = antag_pick(antag_candidates) - undercover_cops += undercover_cop - pigs += undercover_cop - log_game("[key_name(undercover_cop)] has been selected as a replacement undercover cop!") - for(var/datum/mind/undercover_cop in undercover_cops) - var/datum/antagonist/ert/families/undercover_cop/one_eight_seven_on_an_undercover_cop = new() - undercover_cop.add_antag_datum(one_eight_seven_on_an_undercover_cop) - - for(var/datum/mind/gangbanger in gangbangers) - var/gang_to_use = pick_n_take(gangs_to_use) - var/datum/antagonist/gang/new_gangster = new gang_to_use() - var/datum/team/gang/ballas = new /datum/team/gang() - new_gangster.my_gang = ballas - new_gangster.starter_gangster = TRUE - gangs += ballas - ballas.add_member(gangbanger) - ballas.name = new_gangster.gang_name - - ballas.acceptable_clothes = new_gangster.acceptable_clothes.Copy() - ballas.free_clothes = new_gangster.free_clothes.Copy() - ballas.my_gang_datum = new_gangster - - for(var/C in ballas.free_clothes) - var/obj/O = new C(gangbanger.current) - var/list/slots = list ( - "backpack" = ITEM_SLOT_BACKPACK, - "left pocket" = ITEM_SLOT_LPOCKET, - "right pocket" = ITEM_SLOT_RPOCKET - ) - var/mob/living/carbon/human/H = gangbanger.current - var/equipped = H.equip_in_one_of_slots(O, slots) - if(!equipped) - to_chat(gangbanger.current, "Unfortunately, you could not bring your [O] to this shift. You will need to find one.") - qdel(O) - - gangbanger.add_antag_datum(new_gangster) - gangbanger.current.playsound_local(gangbanger.current, 'sound/ambience/antag/thatshowfamiliesworks.ogg', 100, FALSE, pressure_affected = FALSE) - to_chat(gangbanger.current, "As you're the first gangster, your uniform and spraycan are in your inventory!") - addtimer(CALLBACK(src, .proc/announce_gang_locations), 5 MINUTES) - addtimer(CALLBACK(src, .proc/five_minute_warning), time_to_end - 5 MINUTES) - gamemode_ready = TRUE - ..() - -/datum/game_mode/gang/proc/announce_gang_locations() - var/list/readable_gang_names = list() - for(var/GG in gangs) - var/datum/team/gang/G = GG - readable_gang_names += "[G.name]" - var/finalized_gang_names = english_list(readable_gang_names) - priority_announce("Julio G coming to you live from Radio Los Spess! We've been hearing reports of gang activity on [station_name()], with the [finalized_gang_names] duking it out, looking for fresh territory and drugs to sling! Stay safe out there for the hour 'till the space cops get there, and keep it cool, yeah?\n\n The local jump gates are shut down for about an hour due to some maintenance troubles, so if you wanna split from the area you're gonna have to wait an hour. \n Play music, not gunshots, I say. Peace out!", "Radio Los Spess", 'sound/voice/beepsky/radio.ogg') - sent_announcement = TRUE - -/datum/game_mode/gang/proc/five_minute_warning() - priority_announce("Julio G coming to you live from Radio Los Spess! The space cops are closing in on [station_name()] and will arrive in about 5 minutes! Better clear on out of there if you don't want to get hurt!", "Radio Los Spess", 'sound/voice/beepsky/radio.ogg') - -/datum/game_mode/gang/check_win() - var/alive_gangsters = 0 - var/alive_cops = 0 - for(var/datum/mind/gangbanger in gangbangers) - if(!ishuman(gangbanger.current)) - continue - var/mob/living/carbon/human/H = gangbanger.current - if(H.stat) - continue - alive_gangsters++ - for(var/datum/mind/bacon in pigs) - if(!ishuman(bacon.current)) // always returns false - continue - var/mob/living/carbon/human/H = bacon.current - if(H.stat) - continue - alive_cops++ - if(alive_gangsters > alive_cops) - SSticker.mode_result = "win - gangs survived" - SSticker.news_report = GANG_OPERATING - return TRUE - SSticker.mode_result = "loss - police destroyed the gangs" - SSticker.news_report = GANG_DESTROYED - return FALSE - -/datum/game_mode/gang/process() - check_wanted_level() - check_counter++ - if(check_counter >= 5) - if (world.time > endtime && !fuckingdone) - fuckingdone = TRUE - send_in_the_fuzz() - check_counter = 0 - SSticker.mode.check_win() - - check_tagged_turfs() - check_gang_clothes() - check_rollin_with_crews() - -///Checks if our wanted level has changed. Only actually does something post the initial announcement and until the cops are here. After that its locked. -/datum/game_mode/gang/proc/check_wanted_level() - if(!sent_announcement || cops_arrived) - return - var/new_wanted_level - if(GLOB.joined_player_list.len > LOWPOP_FAMILIES_COUNT) - switch(GLOB.deaths_during_shift) - if(0 to TWO_STARS_HIGHPOP-1) - new_wanted_level = 1 - if(TWO_STARS_HIGHPOP to THREE_STARS_HIGHPOP-1) - new_wanted_level = 2 - if(THREE_STARS_HIGHPOP to FOUR_STARS_HIGHPOP-1) - new_wanted_level = 3 - if(FOUR_STARS_HIGHPOP to FIVE_STARS_HIGHPOP-1) - new_wanted_level = 4 - if(FIVE_STARS_HIGHPOP to INFINITY) - new_wanted_level = 5 - else - switch(GLOB.deaths_during_shift) - if(0 to TWO_STARS_LOW-1) - new_wanted_level = 1 - if(TWO_STARS_LOW to THREE_STARS_LOW-1) - new_wanted_level = 2 - if(THREE_STARS_LOW to FOUR_STARS_LOW-1) - new_wanted_level = 3 - if(FOUR_STARS_LOW to FIVE_STARS_LOW-1) - new_wanted_level = 4 - if(FIVE_STARS_LOW to INFINITY) - new_wanted_level = 5 - update_wanted_level(new_wanted_level) - -///Updates the icon states for everyone and sends outs announcements regarding the police. -/datum/game_mode/gang/proc/update_wanted_level(newlevel) - if(newlevel > wanted_level) - on_gain_wanted_level(newlevel) - else if (newlevel < wanted_level) - on_lower_wanted_level(newlevel) - wanted_level = newlevel - for(var/i in GLOB.player_list) - var/mob/M = i - if(!M.hud_used?.wanted_lvl) - continue - var/datum/hud/H = M.hud_used - H.wanted_lvl.level = newlevel - H.wanted_lvl.cops_arrived = cops_arrived - H.wanted_lvl.update_icon() - -/datum/game_mode/gang/proc/on_gain_wanted_level(newlevel) - var/announcement_message - switch(newlevel) - if(2) - announcement_message = "Small amount of police vehicles have been spotted en route towards [station_name()]. They will arrive at the 50 minute mark." - endtime = start_time + 50 MINUTES - if(3) - announcement_message = "A large detachment police vehicles have been spotted en route towards [station_name()]. They will arrive at the 40 minute mark." - endtime = start_time + 40 MINUTES - if(4) - announcement_message = "A detachment of top-trained agents has been spotted on their way to [station_name()]. They will arrive at the 35 minute mark." - endtime = start_time + 35 MINUTES - if(5) - announcement_message = "The fleet enroute to [station_name()] now consists of national guard personnel. They will arrive at the 30 minute mark." - endtime = start_time + 30 MINUTES - priority_announce(announcement_message, "Station Spaceship Detection Systems") - -/datum/game_mode/gang/proc/on_lower_wanted_level(newlevel) - var/announcement_message - switch(newlevel) - if(1) - announcement_message = "There are now only a few police vehicle headed towards [station_name()]. They will arrive at the 60 minute mark." - endtime = start_time + 60 MINUTES - if(2) - announcement_message = "There seem to be fewer police vehicles headed towards [station_name()]. They will arrive at the 50 minute mark." - endtime = start_time + 50 MINUTES - if(3) - announcement_message = "There are no longer top-trained agents in the fleet headed towards [station_name()]. They will arrive at the 40 minute mark." - endtime = start_time + 40 MINUTES - if(4) - announcement_message = "The convoy enroute to [station_name()] seems to no longer consist of national guard personnel. They will arrive at the 35 minute mark." - endtime = start_time + 35 MINUTES - priority_announce(announcement_message, "Station Spaceship Detection Systems") - -/datum/game_mode/gang/proc/send_in_the_fuzz() - var/team_size - var/cops_to_send - var/announcement_message = "PUNK ASS BALLA BITCH" - var/announcer = "Spinward Stellar Coalition" - if(GLOB.joined_player_list.len > LOWPOP_FAMILIES_COUNT) - switch(wanted_level) - if(1) - team_size = 8 - cops_to_send = /datum/antagonist/ert/families/beatcop - announcement_message = "Hello, crewmembers of [station_name()]! We've received a few calls about some potential violent gang activity on board your station, so we're sending some beat cops to check things out. Nothing extreme, just a courtesy call. However, while they check things out for about 10 minutes, we're going to have to ask that you keep your escape shuttle parked.\n\nHave a pleasant day!" - announcer = "Spinward Stellar Coalition Police Department" - if(2) - team_size = 9 - cops_to_send = /datum/antagonist/ert/families/beatcop/armored - announcement_message = "Crewmembers of [station_name()]. We have received confirmed reports of violent gang activity from your station. We are dispatching some armed officers to help keep the peace and investigate matters. Do not get in their way, and comply with any and all requests from them. We have blockaded the local warp gate, and your shuttle cannot depart for another 10 minutes.\n\nHave a secure day." - announcer = "Spinward Stellar Coalition Police Department" - if(3) - team_size = 10 - cops_to_send = /datum/antagonist/ert/families/beatcop/swat - announcement_message = "Crewmembers of [station_name()]. We have received confirmed reports of extreme gang activity from your station resulting in heavy civilian casualties. The Spinward Stellar Coalition does not tolerate abuse towards our citizens, and we will be responding in force to keep the peace and reduce civilian casualties. We have your station surrounded, and all gangsters must drop their weapons and surrender peacefully.\n\nHave a secure day." - announcer = "Spinward Stellar Coalition Police Department" - if(4) - team_size = 11 - cops_to_send = /datum/antagonist/ert/families/beatcop/fbi - announcement_message = "We are dispatching our top agents to [station_name()] at the request of the Spinward Stellar Coalition government due to an extreme terrorist level threat against this Nanotrasen owned station. All gangsters must surrender IMMEDIATELY. Failure to comply can and will result in death. We have blockaded your warp gates and will not allow any escape until the situation is resolved within our standard response time of 10 minutes.\n\nSurrender now or face the consequences of your actions." - announcer = "Federal Bureau of Investigation" - if(5) - team_size = 12 - cops_to_send = /datum/antagonist/ert/families/beatcop/military - announcement_message = "Due to an insane level of civilian casualties aboard [station_name()], we have dispatched the National Guard to curb any and all gang activity on board the station. We have heavy cruisers watching the shuttle. Attempt to leave before we allow you to, and we will obliterate your station and your escape shuttle.\n\nYou brought this on yourselves by murdering so many civilians." - announcer = "Spinward Stellar Coalition National Guard" - else - switch(wanted_level) - if(1) - team_size = 5 - cops_to_send = /datum/antagonist/ert/families/beatcop - announcement_message = "Hello, crewmembers of [station_name()]! We've received a few calls about some potential violent gang activity on board your station, so we're sending some beat cops to check things out. Nothing extreme, just a courtesy call. However, while they check things out for about 10 minutes, we're going to have to ask that you keep your escape shuttle parked.\n\nHave a pleasant day!" - announcer = "Spinward Stellar Coalition Police Department" - if(2) - team_size = 6 - cops_to_send = /datum/antagonist/ert/families/beatcop/armored - announcement_message = "Crewmembers of [station_name()]. We have received confirmed reports of violent gang activity from your station. We are dispatching some armed officers to help keep the peace and investigate matters. Do not get in their way, and comply with any and all requests from them. We have blockaded the local warp gate, and your shuttle cannot depart for another 10 minutes.\n\nHave a secure day." - announcer = "Spinward Stellar Coalition Police Department" - if(3) - team_size = 7 - cops_to_send = /datum/antagonist/ert/families/beatcop/swat - announcement_message = "Crewmembers of [station_name()]. We have received confirmed reports of extreme gang activity from your station resulting in heavy civilian casualties. The Spinward Stellar Coalition does not tolerate abuse towards our citizens, and we will be responding in force to keep the peace and reduce civilian casualties. We have your station surrounded, and all gangsters must drop their weapons and surrender peacefully.\n\nHave a secure day." - announcer = "Spinward Stellar Coalition Police Department" - if(4) - team_size = 8 - cops_to_send = /datum/antagonist/ert/families/beatcop/fbi - announcement_message = "We are dispatching our top agents to [station_name()] at the request of the Spinward Stellar Coalition government due to an extreme terrorist level threat against this Nanotrasen owned station. All gangsters must surrender IMMEDIATELY. Failure to comply can and will result in death. We have blockaded your warp gates and will not allow any escape until the situation is resolved within our standard response time of 10 minutes.\n\nSurrender now or face the consequences of your actions." - announcer = "Federal Bureau of Investigation" - if(5) - team_size = 10 - cops_to_send = /datum/antagonist/ert/families/beatcop/military - announcement_message = "Due to an insane level of civilian casualties aboard [station_name()], we have dispatched the National Guard to curb any and all gang activity on board the station. We have heavy cruisers watching the shuttle. Attempt to leave before we allow you to, and we will obliterate your station and your escape shuttle.\n\nYou brought this on yourselves by murdering so many civilians." - announcer = "Spinward Stellar Coalition National Guard" - - priority_announce(announcement_message, announcer, 'sound/effects/families_police.ogg') - var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you want to help clean up crime on this station?", "deathsquad", null) - - - if(candidates.len) - //Pick the (un)lucky players - var/numagents = min(team_size,candidates.len) - - var/list/spawnpoints = GLOB.emergencyresponseteamspawn - var/index = 0 - while(numagents && candidates.len) - var/spawnloc = spawnpoints[index+1] - //loop through spawnpoints one at a time - index = (index + 1) % spawnpoints.len - var/mob/dead/observer/chosen_candidate = pick(candidates) - candidates -= chosen_candidate - if(!chosen_candidate.key) - continue - - //Spawn the body - var/mob/living/carbon/human/cop = new(spawnloc) - chosen_candidate.client.prefs.copy_to(cop) - cop.key = chosen_candidate.key - - //Give antag datum - var/datum/antagonist/ert/ert_antag = new cops_to_send - - cop.mind.add_antag_datum(ert_antag) - cop.mind.assigned_role = ert_antag.name - SSjob.SendToLateJoin(cop) - - //Logging and cleanup - log_game("[key_name(cop)] has been selected as an [ert_antag.name]") - numagents-- - cops_arrived = TRUE - update_wanted_level() //Will make sure our icon updates properly - return TRUE - -/datum/game_mode/gang/proc/check_tagged_turfs() - for(var/T in GLOB.gang_tags) - var/obj/effect/decal/cleanable/crayon/gang/tag = T - if(tag.my_gang) - tag.my_gang.adjust_points(50) - CHECK_TICK - -/datum/game_mode/gang/proc/check_gang_clothes() // TODO: make this grab the sprite itself, average out what the primary color would be, then compare how close it is to the gang color so I don't have to manually fill shit out for 5 years for every gang type - for(var/mob/living/carbon/human/H in GLOB.player_list) - if(!H.mind || !H.client) - continue - var/datum/antagonist/gang/is_gangster = H.mind.has_antag_datum(/datum/antagonist/gang) - for(var/clothing in list(H.head, H.wear_mask, H.wear_suit, H.w_uniform, H.back, H.gloves, H.shoes, H.belt, H.s_store, H.glasses, H.ears, H.wear_id)) - if(is_gangster) - if(is_type_in_list(clothing, is_gangster.acceptable_clothes)) - is_gangster.add_gang_points(10) - else - for(var/G in gangs) - var/datum/team/gang/gang_clothes = G - if(is_type_in_list(clothing, gang_clothes.acceptable_clothes)) - gang_clothes.adjust_points(5) - - CHECK_TICK - -/datum/game_mode/gang/proc/check_rollin_with_crews() - var/list/areas_to_check = list() - for(var/G in gangbangers) - var/datum/mind/gangster = G - areas_to_check += get_area(gangster.current) - for(var/AA in areas_to_check) - var/area/A = AA - var/list/gang_members = list() - for(var/mob/living/carbon/human/H in A) - if(H.stat || !H.mind || !H.client) - continue - var/datum/antagonist/gang/is_gangster = H.mind.has_antag_datum(/datum/antagonist/gang) - if(is_gangster) - gang_members[is_gangster.my_gang]++ - CHECK_TICK - if(gang_members.len) - for(var/datum/team/gang/gangsters in gang_members) - if(gang_members[gangsters] >= CREW_SIZE_MIN) - if(gang_members[gangsters] >= CREW_SIZE_MAX) - gangsters.adjust_points(5) // Discourage larger clumps, spread ur people out - else - gangsters.adjust_points(10) - - -/datum/game_mode/gang/generate_report() - return "Potential violent criminal activity has been detected on board your station, and we believe the Spinward Stellar Coalition may be conducting an audit of us. Keep an eye out for tagging of turf, color coordination, and suspicious people asking you to say things a little closer to their chest." - -/datum/game_mode/gang/send_intercept(report = 0) - return - -/datum/game_mode/gang/special_report() - var/list/report = list() - var/highest_point_value = 0 - var/highest_gang = "Leet Like Jeff K" - report += "The families in the round were:" - var/objective_failures = TRUE - for(var/datum/team/gang/GG in gangs) - if(GG.my_gang_datum.check_gang_objective()) - objective_failures = FALSE - break - for(var/datum/team/gang/G in gangs) - report += "[G.name]:" - if(G.members.len) - report += "[G.my_gang_datum.roundend_category] were:" - report += printplayerlist(G.members) - report += "Points: [G.points]" - report += "Objective: [G.my_gang_datum.gang_objective]" - if(G.my_gang_datum.check_gang_objective()) - report += "The family completed their objective!" - else - report += "The family failed their objective!" - else - report += "The family was wiped out!" - if(!objective_failures) - if(G.points >= highest_point_value && G.members.len && G.my_gang_datum.check_gang_objective()) - highest_point_value = G.points - highest_gang = G.name - else - if(G.points >= highest_point_value && G.members.len) - highest_point_value = G.points - highest_gang = G.name - var/alive_gangsters = 0 - var/alive_cops = 0 - for(var/datum/mind/gangbanger in gangbangers) - if(gangbanger.current) - if(!ishuman(gangbanger.current)) - continue - var/mob/living/carbon/human/H = gangbanger.current - if(H.stat) - continue - alive_gangsters++ - for(var/datum/mind/bacon in pigs) - if(bacon.current) - if(!ishuman(bacon.current)) // always returns false - continue - var/mob/living/carbon/human/H = bacon.current - if(H.stat) - continue - alive_cops++ - if(alive_gangsters > alive_cops) - if(!objective_failures) - report += "[highest_gang] won the round by completing their objective and having the most points!" - else - report += "[highest_gang] won the round by having the most points!" - else if(alive_gangsters == alive_cops) - report += "Legend has it the police and the families are still duking it out to this day!" - else - report += "The police put the boots to the families, medium style!" - - - return "
[report.Join("
")]
" diff --git a/code/game/gamemodes/gang/gang_things.dm b/code/game/gamemodes/gang/gang_things.dm deleted file mode 100644 index 5871ed6a24cf..000000000000 --- a/code/game/gamemodes/gang/gang_things.dm +++ /dev/null @@ -1,57 +0,0 @@ -/obj/item/gang_induction_package - name = "family signup package" - icon = 'icons/obj/gang/signup_points.dmi' - icon_state = "signup_book" - var/gang_to_use - var/datum/team/gang/team_to_use - - -/obj/item/gang_induction_package/attack_self(mob/living/user) - ..() - if(HAS_TRAIT(user, TRAIT_MINDSHIELD)) - to_chat(user, "You attended a seminar on not signing up for a gang, and are not interested.") - return - if(user.mind.has_antag_datum(/datum/antagonist/ert/families)) - to_chat(user, "As a police officer, you can't join this family. However, you pretend to accept it to keep your cover up.") - for(var/threads in team_to_use.free_clothes) - new threads(get_turf(user)) - qdel(src) - return - var/datum/antagonist/gang/is_gangster = user.mind.has_antag_datum(/datum/antagonist/gang) - if(is_gangster && is_gangster.starter_gangster) - to_chat(user, "You started your family. You can't turn your back on it now.") - return - attempt_join_gang(user) - -/obj/item/gang_induction_package/proc/add_to_gang(mob/living/user) - var/datum/game_mode/gang/F = SSticker.mode - var/datum/antagonist/gang/swappin_sides = new gang_to_use() - user.mind.add_antag_datum(swappin_sides) - var/policy = get_policy(ROLE_FAMILIES) - if(policy) - to_chat(user, policy) - swappin_sides.my_gang = team_to_use - user.playsound_local(user, 'sound/ambience/antag/thatshowfamiliesworks.ogg', 100, FALSE, pressure_affected = FALSE) - team_to_use.add_member(user.mind) - for(var/threads in team_to_use.free_clothes) - new threads(get_turf(user)) - if (!F.gangbangers.Find(user.mind)) - F.gangbangers += user.mind - team_to_use.adjust_points(30) - - -/obj/item/gang_induction_package/proc/attempt_join_gang(mob/living/user) - if(user && user.mind) - var/datum/antagonist/gang/is_gangster = user.mind.has_antag_datum(/datum/antagonist/gang) - if(is_gangster) - if(is_gangster.my_gang == team_to_use) - return - else - is_gangster.my_gang.adjust_points(-30) - is_gangster.my_gang.remove_member(user.mind) - user.mind.remove_antag_datum(/datum/antagonist/gang) - add_to_gang(user) - qdel(src) - else - add_to_gang(user) - qdel(src) diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index 16da84d485b7..4f5e1ccefc52 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -332,14 +332,6 @@ else if(drawing in graffiti|oriented) temp = "graffiti" - var/gang_mode - if(user.mind) - gang_mode = user.mind.has_antag_datum(/datum/antagonist/gang) - - if(gang_mode && (!can_claim_for_gang(user, target))) - return - - var/graf_rot if(drawing in oriented) switch(user.dir) @@ -371,9 +363,8 @@ if(paint_mode == PAINT_LARGE_HORIZONTAL) wait_time *= 3 - if(gang_mode || !instant) - if(!do_after(user, 50, target = target)) - return + if(!instant && !do_after(user, 50, target = target)) + return if(length(text_buffer)) drawing = text_buffer[1] @@ -383,34 +374,28 @@ if(actually_paints) var/obj/effect/decal/cleanable/crayon/C - if(gang_mode) - if(!can_claim_for_gang(user, target)) - return - tag_for_gang(user, target, gang_mode) - affected_turfs += target - else - switch(paint_mode) - if(PAINT_NORMAL) - C = new(target, paint_color, drawing, temp, graf_rot) - C.pixel_x = clickx - C.pixel_y = clicky + switch(paint_mode) + if(PAINT_NORMAL) + C = new(target, paint_color, drawing, temp, graf_rot) + C.pixel_x = clickx + C.pixel_y = clicky + affected_turfs += target + if(PAINT_LARGE_HORIZONTAL) + var/turf/left = locate(target.x-1,target.y,target.z) + var/turf/right = locate(target.x+1,target.y,target.z) + if(isValidSurface(left) && isValidSurface(right)) + C = new(left, paint_color, drawing, temp, graf_rot, PAINT_LARGE_HORIZONTAL_ICON) + affected_turfs += left + affected_turfs += right affected_turfs += target - if(PAINT_LARGE_HORIZONTAL) - var/turf/left = locate(target.x-1,target.y,target.z) - var/turf/right = locate(target.x+1,target.y,target.z) - if(isValidSurface(left) && isValidSurface(right)) - C = new(left, paint_color, drawing, temp, graf_rot, PAINT_LARGE_HORIZONTAL_ICON) - affected_turfs += left - affected_turfs += right - affected_turfs += target - else - to_chat(user, "There isn't enough space to paint!") - return - C.add_hiddenprint(user) - if(istagger) - C.AddComponent(/datum/component/art, GOOD_ART) - else - C.AddComponent(/datum/component/art, BAD_ART) + else + to_chat(user, "There isn't enough space to paint!") + return + C.add_hiddenprint(user) + if(istagger) + C.AddComponent(/datum/component/art, GOOD_ART) + else + C.AddComponent(/datum/component/art, BAD_ART) if(!instant) to_chat(user, "You finish drawing \the [temp].") @@ -475,19 +460,6 @@ // stolen from oldgang lmao return TRUE -/obj/item/toy/crayon/proc/tag_for_gang(mob/user, atom/target, datum/antagonist/gang/user_gang) - for(var/obj/effect/decal/cleanable/crayon/old_marking in target) - qdel(old_marking) - - var/area/territory = get_area(target) - - var/obj/effect/decal/cleanable/crayon/gang/tag = new /obj/effect/decal/cleanable/crayon/gang(target) - tag.my_gang = user_gang.my_gang - tag.icon_state = "[user_gang.gang_id]_tag" - tag.name = "[tag.my_gang.name] gang tag" - tag.desc = "Looks like someone's claimed this area for [tag.my_gang.name]." - to_chat(user, "You tagged [territory] for [tag.my_gang.name]!") - /obj/item/toy/crayon/proc/territory_claimed(area/territory, mob/user) for(var/obj/effect/decal/cleanable/crayon/gang/G in GLOB.gang_tags) if(get_area(G) == territory) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 0cde04128326..6ab472170696 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -690,9 +690,14 @@ set category = "Admin" set name = "Unprison" if (is_centcom_level(M)) - SSjob.SendToLateJoin(M) - message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]") - log_admin("[key_name(usr)] has unprisoned [key_name(M)]") + var/datum/overmap/ship/controlled/original_ship = M.mind.original_ship.resolve() + if(original_ship) + var/atom/new_spawn_point = pick(original_ship.shuttle_port.spawn_points) + new_spawn_point.join_player_here(M) + message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]") + log_admin("[key_name(usr)] has unprisoned [key_name(M)]") + else + alert("[M.name] could not be sent back to their original ship.") else alert("[M.name] is not prisoned.") SSblackbox.record_feedback("tally", "admin_verb", 1, "Unprison") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/antagonists/ert/ert.dm b/code/modules/antagonists/ert/ert.dm index 348b6d547b5d..d69ce8a0078c 100644 --- a/code/modules/antagonists/ert/ert.dm +++ b/code/modules/antagonists/ert/ert.dm @@ -196,118 +196,6 @@ missiondesc += "
Your Mission : [ert_team.mission.explanation_text]" to_chat(owner,missiondesc) - -/datum/antagonist/ert/families - name = "Space Police Responder" - antag_hud_type = ANTAG_HUD_SPACECOP - antag_hud_name = "hud_spacecop" - -/datum/antagonist/ert/families/apply_innate_effects(mob/living/mob_override) - ..() - var/mob/living/M = mob_override || owner.current - add_antag_hud(antag_hud_type, antag_hud_name, M) - if(M.hud_used) - var/datum/hud/H = M.hud_used - H.wanted_lvl = new /atom/movable/screen/wanted - H.infodisplay += H.wanted_lvl - - -/datum/antagonist/ert/families/remove_innate_effects(mob/living/mob_override) - var/mob/living/M = mob_override || owner.current - remove_antag_hud(antag_hud_type, M) - if(M.hud_used) - var/datum/hud/H = M.hud_used - H.infodisplay -= H.wanted_lvl - QDEL_NULL(H.wanted_lvl) - ..() - -/datum/antagonist/ert/families/greet() - to_chat(owner, "You are the [name].") - to_chat(owner, "You are NOT a Nanotrasen Employee. You work for the local government.") - - var/missiondesc = "After an uptick in gang violence on [station_name()], you are responding to emergency calls from the station for immediate SSC Police assistance!\n" - missiondesc += "
Your Mission:" - missiondesc += "
1. Secure the situation and crack down on any gang activity. You can view gangsters with your sunglasses." - missiondesc += "
2. There is an undercover police officer on station. Secure him, receive his intel, and extract him safely." - missiondesc += "
3. Minimize civilian casualties, but defend yourself and civilians from hostile gangsters." - missiondesc += "
3. If Security is found to be violating the rights of citizens, detain them as per your authority as Spinward Stellar Coalition officers." - missiondesc += "
4. If the situation demands it, evacuate the station. Otherwise, remain on station and keep the peace." - to_chat(owner,missiondesc) - var/policy = get_policy(ROLE_FAMILIES) - if(policy) - to_chat(owner, policy) - var/mob/living/M = owner.current - M.playsound_local(M, 'sound/effects/families_police.ogg', 100, FALSE, pressure_affected = FALSE, use_reverb = FALSE) - -/datum/antagonist/ert/families/undercover_cop - name = "Undercover Cop" - role = "Undercover Cop" - outfit = /datum/outfit/families_police/beatcop - var/free_clothes = list(/obj/item/clothing/glasses/hud/spacecop/hidden, - /obj/item/clothing/under/rank/security/officer/beatcop, - /obj/item/clothing/head/spacepolice) - forge_objectives_for_ert = FALSE - equip_ert = FALSE - random_names = FALSE - -/datum/antagonist/ert/families/undercover_cop/on_gain() - for(var/C in free_clothes) - var/obj/O = new C(owner.current) - var/list/slots = list ( - "backpack" = ITEM_SLOT_BACKPACK, - "left pocket" = ITEM_SLOT_LPOCKET, - "right pocket" = ITEM_SLOT_RPOCKET - ) - var/mob/living/carbon/human/H = owner.current - var/equipped = H.equip_in_one_of_slots(O, slots) - if(!equipped) - to_chat(owner.current, "Unfortunately, you could not bring your [O] to this shift. You will need to find one.") - qdel(O) - . = ..() - - -/datum/antagonist/ert/families/undercover_cop/greet() - to_chat(owner, "You are the [name].") - to_chat(owner, "You are NOT a Nanotrasen Employee. You work for the local government.") - - var/missiondesc = "You are an undercover police officer on board [station_name()]. You've been sent here by the Spinward Stellar Coalition because of suspected abusive behavior by the security department, and to keep tabs on a potential criminal organization operation." - missiondesc += "
Your Mission:" - missiondesc += "
1. Keep a close eye on any gangsters you spot. You can view gangsters using your sunglasses in your backpack." - missiondesc += "
2. Keep an eye on how Security handles any gangsters, and watch for excessive security brutality." - missiondesc += "
3. Remain undercover and do not get found out by Security or any gangs. Nanotrasen does not take kindly to being spied on." - missiondesc += "
4. When your backup arrives to extract you in 1 hour, inform them of everything you saw of note, and assist them in securing the situation." - to_chat(owner,missiondesc) - -/datum/antagonist/ert/families/beatcop - name = "Beat Cop" - role = "Police Officer" - outfit = /datum/outfit/families_police/beatcop - -/datum/antagonist/ert/families/beatcop/armored - name = "Armored Beat Cop" - role = "Police Officer" - outfit = /datum/outfit/families_police/beatcop/armored - -/datum/antagonist/ert/families/beatcop/swat - name = "S.W.A.T. Member" - role = "S.W.A.T. Officer" - outfit = /datum/outfit/families_police/beatcop/swat - -/datum/antagonist/ert/families/beatcop/fbi - name = "FBI Agent" - role = "FBI Agent" - outfit = /datum/outfit/families_police/beatcop/fbi - -/datum/antagonist/ert/families/beatcop/military - name = "Space Military" - role = "Sergeant" - outfit = /datum/outfit/families_police/beatcop/military - -/datum/antagonist/ert/families/beatcop/military/New() - . = ..() - name_source = GLOB.commando_names - - /datum/antagonist/ert/marine name = "Marine Commander" outfit = /datum/outfit/centcom/ert/marine diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index a30ecea4a2d0..fc128d0c0d53 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -51,7 +51,6 @@ GLOBAL_LIST_EMPTY(dead_players_during_shift) jitteriness = 0 if(client && !suiciding && !(client in GLOB.dead_players_during_shift)) GLOB.dead_players_during_shift += client - GLOB.deaths_during_shift++ if(ismecha(loc)) var/obj/mecha/M = loc if(M.occupant == src) diff --git a/code/modules/overmap/ships/controlled_ship_datum.dm b/code/modules/overmap/ships/controlled_ship_datum.dm index 1479c3f0ceb3..e6f75c0a6278 100644 --- a/code/modules/overmap/ships/controlled_ship_datum.dm +++ b/code/modules/overmap/ships/controlled_ship_datum.dm @@ -268,6 +268,7 @@ eligible = TRUE ) LAZYSET(owner_candidates, H.mind, mind_info) + H.mind.original_ship = WEAKREF(src) RegisterSignal(H.mind, COMSIG_PARENT_QDELETING, .proc/crew_mind_deleting) if(!owner_mob) set_owner_mob(H) diff --git a/shiptest.dme b/shiptest.dme index b1ab97991389..52b154672709 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -247,7 +247,6 @@ #include "code\_onclick\hud\credits.dm" #include "code\_onclick\hud\devil.dm" #include "code\_onclick\hud\drones.dm" -#include "code\_onclick\hud\families.dm" #include "code\_onclick\hud\fullscreen.dm" #include "code\_onclick\hud\generic_dextrous.dm" #include "code\_onclick\hud\ghost.dm" @@ -808,8 +807,6 @@ #include "code\game\gamemodes\dynamic\dynamic_rulesets_midround.dm" #include "code\game\gamemodes\dynamic\dynamic_rulesets_roundstart.dm" #include "code\game\gamemodes\extended\extended.dm" -#include "code\game\gamemodes\gang\gang.dm" -#include "code\game\gamemodes\gang\gang_things.dm" #include "code\game\gamemodes\meteor\meteor.dm" #include "code\game\gamemodes\meteor\meteors.dm" #include "code\game\gamemodes\monkey\monkey.dm" @@ -1656,7 +1653,6 @@ #include "code\modules\antagonists\fugitive\fugitive_outfits.dm" #include "code\modules\antagonists\fugitive\fugitive_ship.dm" #include "code\modules\antagonists\fugitive\hunter.dm" -#include "code\modules\antagonists\gang\gang.dm" #include "code\modules\antagonists\gang\outfits.dm" #include "code\modules\antagonists\greentext\greentext.dm" #include "code\modules\antagonists\magic_servant\servant.dm" From 98c0f9028aa448dbda455ef84777588832c1a1df Mon Sep 17 00:00:00 2001 From: Mark Suckerberg Date: Tue, 4 Jul 2023 23:43:43 -0500 Subject: [PATCH 3/5] Kills off SSjob, changes suit sensor ordering --- code/__DEFINES/jobs.dm | 84 ++++++++------- code/__HELPERS/global_lists.dm | 5 + code/_globalvars/lists/jobs.dm | 3 + code/controllers/subsystem/job.dm | 100 ------------------ code/controllers/subsystem/mapping.dm | 3 +- code/controllers/subsystem/overmap.dm | 43 ++++++++ code/datums/world_topic.dm | 2 +- code/game/atoms.dm | 5 + code/game/machinery/computer/crew.dm | 79 ++------------ code/game/objects/items/devices/PDA/PDA.dm | 2 +- code/game/objects/items/devices/PDA/cart.dm | 2 +- .../objects/structures/beds_chairs/chair.dm | 9 +- code/modules/clothing/chameleon.dm | 2 +- code/modules/jobs/job_exp.dm | 4 +- code/modules/jobs/job_report.dm | 2 +- code/modules/jobs/job_types/_job.dm | 12 ++- code/modules/mob/dead/crew_manifest.dm | 2 +- .../living/simple_animal/hostile/zombie.dm | 2 +- shiptest.dme | 2 +- 19 files changed, 136 insertions(+), 227 deletions(-) create mode 100644 code/_globalvars/lists/jobs.dm delete mode 100644 code/controllers/subsystem/job.dm diff --git a/code/__DEFINES/jobs.dm b/code/__DEFINES/jobs.dm index c8848f000099..21eb9b40e066 100644 --- a/code/__DEFINES/jobs.dm +++ b/code/__DEFINES/jobs.dm @@ -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 diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index e31076b6bc23..4f9e234b0d27 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -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() diff --git a/code/_globalvars/lists/jobs.dm b/code/_globalvars/lists/jobs.dm new file mode 100644 index 000000000000..181a39727101 --- /dev/null +++ b/code/_globalvars/lists/jobs.dm @@ -0,0 +1,3 @@ +GLOBAL_LIST_EMPTY(occupations) +GLOBAL_LIST_EMPTY(name_occupations) +GLOBAL_LIST_EMPTY(type_occupations) diff --git a/code/controllers/subsystem/job.dm b/code/controllers/subsystem/job.dm deleted file mode 100644 index 03cf06e7776b..000000000000 --- a/code/controllers/subsystem/job.dm +++ /dev/null @@ -1,100 +0,0 @@ -SUBSYSTEM_DEF(job) - name = "Jobs" - init_order = INIT_ORDER_JOBS - flags = SS_NO_FIRE - - var/list/occupations = list() //List of all jobs - var/list/datum/job/name_occupations = list() //Dict of all jobs, keys are titles - var/list/type_occupations = list() //Dict of all jobs, keys are types - -/datum/controller/subsystem/job/Initialize(timeofday) - if(!occupations.len) - SetupOccupations() - return ..() - -/datum/controller/subsystem/job/proc/SetupOccupations() - occupations = list() - var/list/all_jobs = subtypesof(/datum/job) - if(!all_jobs.len) - to_chat(world, "Error setting up jobs, no job datums found") - return 0 - - for(var/J in all_jobs) - var/datum/job/job = new J() - if(!job) - continue - occupations += job - name_occupations[job.name] = job - type_occupations[J] = job - - return 1 - -/datum/controller/subsystem/job/proc/GetJob(rank) - if(!occupations.len) - SetupOccupations() - if(istype(rank, /datum/job)) - return rank - return name_occupations[rank] - -/datum/controller/subsystem/job/proc/GetJobType(jobtype) - if(!occupations.len) - SetupOccupations() - return type_occupations[jobtype] - -/datum/controller/subsystem/job/Recover() - set waitfor = FALSE - var/oldjobs = SSjob.occupations - -/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)) - -/obj/structure/chair/join_player_here(mob/M) - // Placing a mob in a chair will attempt to buckle it, or else fall back to default. - if (isliving(M) && buckle_mob(M, FALSE, FALSE)) - return - ..() - -/datum/controller/subsystem/job/proc/get_manifest() - var/list/manifest_out = list() - for(var/datum/overmap/ship/controlled/ship as anything in SSovermap.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/job/proc/get_manifest_html(monochrome = FALSE) - var/list/manifest = get_manifest() - var/dat = {" - - - - "} - for(var/department in manifest) - var/list/entries = manifest[department] - dat += "" - //JUST - var/even = FALSE - for(var/entry in entries) - var/list/entry_list = entry - dat += "" - even = !even - - dat += "
NameRank
[department]
[entry_list["name"]][entry_list["rank"]]
" - dat = replacetext(dat, "\n", "") - dat = replacetext(dat, "\t", "") - return dat diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm index 89f5fa727f67..456ec9a37dfd 100644 --- a/code/controllers/subsystem/mapping.dm +++ b/code/controllers/subsystem/mapping.dm @@ -199,7 +199,7 @@ 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"]) @@ -207,6 +207,7 @@ SUBSYSTEM_DEF(mapping) 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"] diff --git a/code/controllers/subsystem/overmap.dm b/code/controllers/subsystem/overmap.dm index 61c0b5df0255..d59dc0a2971e 100644 --- a/code/controllers/subsystem/overmap.dm +++ b/code/controllers/subsystem/overmap.dm @@ -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 = {" + + + + "} + for(var/department in manifest) + var/list/entries = manifest[department] + dat += "" + var/even = FALSE + for(var/entry in entries) + var/list/entry_list = entry + dat += "" + even = !even + + dat += "
NameRank
[department]
[entry_list["name"]][entry_list["rank"]]
" + 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 diff --git a/code/datums/world_topic.dm b/code/datums/world_topic.dm index c4e77d9e2bc1..07f93bc431fb 100644 --- a/code/datums/world_topic.dm +++ b/code/datums/world_topic.dm @@ -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() diff --git a/code/game/atoms.dm b/code/game/atoms.dm index e0f711640db3..da031bb27818 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -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 = "[name]" + +///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)) diff --git a/code/game/machinery/computer/crew.dm b/code/game/machinery/computer/crew.dm index 7c97e4fa6d8e..c47333a80a0d 100644 --- a/code/game/machinery/computer/crew.dm +++ b/code/game/machinery/computer/crew.dm @@ -32,60 +32,9 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new) /datum/crewmonitor var/list/ui_sources = list() //List of user -> ui source - var/list/jobs var/list/data_by_z = list() var/list/last_update = list() -/datum/crewmonitor/New() - . = ..() - - var/list/jobs = new/list() - jobs["Captain"] = 00 - jobs["Head of Personnel"] = 02 - jobs["SolGov Representative"] = 05 //WS Edit - SolGov Rep - jobs["Head of Security"] = 10 - jobs["Warden"] = 11 - jobs["Security Officer"] = 12 - jobs["Detective"] = 13 - jobs["Brig Physician"] = 14 - jobs["Chief Medical Officer"] = 20 - jobs["Chemist"] = 21 - jobs["Virologist"] = 22 - jobs["Medical Doctor"] = 23 - jobs["Paramedic"] = 24 - jobs["Research Director"] = 30 - jobs["Scientist"] = 31 - jobs["Roboticist"] = 32 - jobs["Geneticist"] = 33 - jobs["Chief Engineer"] = 40 - jobs["Station Engineer"] = 41 - jobs["Atmospheric Technician"] = 42 - jobs["Quartermaster"] = 51 - jobs["Shaft Miner"] = 52 - jobs["Cargo Technician"] = 53 - jobs["Bartender"] = 61 - jobs["Cook"] = 62 - jobs["Botanist"] = 63 - jobs["Curator"] = 64 - jobs["Chaplain"] = 65 - jobs["Clown"] = 66 - jobs["Mime"] = 67 - jobs["Janitor"] = 68 - jobs["Lawyer"] = 69 - jobs["Psychologist"] = 70 - jobs["Admiral"] = 200 - jobs["CentCom Commander"] = 210 - jobs["Custodian"] = 211 - jobs["Medical Officer"] = 212 - jobs["Research Officer"] = 213 - jobs["Emergency Response Team Commander"] = 220 - jobs["Security Response Officer"] = 221 - jobs["Engineer Response Officer"] = 222 - jobs["Medical Response Officer"] = 223 - jobs["Assistant"] = 999 //Unknowns/custom jobs should appear after civilians, and before assistants - - src.jobs = jobs - /datum/crewmonitor/Destroy() return ..() @@ -120,8 +69,8 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new) var/obj/item/clothing/under/U var/obj/item/card/id/I var/turf/pos - var/ijob - var/name + var/ijob = JOB_DISPLAY_ORDER_DEFAULT + var/name = "Unknown" var/assignment var/oxydam var/toxdam @@ -156,30 +105,18 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new) if (I) name = I.registered_name assignment = I.assignment - if(I.assignment in jobs) - ijob = jobs[I.assignment] - else - ijob = jobs["Unknown"] - else - name = "Unknown" - assignment = "" - ijob = 80 + if(I.assignment in GLOB.name_occupations) + var/datum/job/assigned_job = GLOB.name_occupations[I.assignment] + ijob = assigned_job.display_order if (nanite_sensors || U.sensor_mode >= SENSOR_LIVING) life_status = ((H.stat < DEAD) ? TRUE : FALSE) //So anything less that dead is marked as alive. (Soft crit, concious, unconcious) - else - life_status = null if (nanite_sensors || U.sensor_mode >= SENSOR_VITALS) oxydam = round(H.getOxyLoss(),1) toxdam = round(H.getToxLoss(),1) burndam = round(H.getFireLoss(),1) brutedam = round(H.getBruteLoss(),1) - else - oxydam = null - toxdam = null - burndam = null - brutedam = null if (nanite_sensors || U.sensor_mode >= SENSOR_COORDS) if (!pos) @@ -187,14 +124,10 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new) area = get_area_name(H, TRUE) pos_x = pos.x pos_y = pos.y - else - area = null - pos_x = null - pos_y = null results[++results.len] = list("name" = name, "assignment" = assignment, "ijob" = ijob, "life_status" = life_status, "oxydam" = oxydam, "toxdam" = toxdam, "burndam" = burndam, "brutedam" = brutedam, "area" = area, "pos_x" = pos_x, "pos_y" = pos_y, "can_track" = H.can_track(null)) - data_by_z["[z]"] = sortTim(results,/proc/sensor_compare) + data_by_z["[z]"] = sortTim(results, /proc/sensor_compare) last_update["[z]"] = world.time return results diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index dfa27f6f21f4..3c97186cba40 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -372,7 +372,7 @@ GLOBAL_LIST_EMPTY(PDAs) if(41) //crew manifest dat += "

Crew Manifest

" dat += "
" - dat += SSjob.get_manifest_html() + dat += SSovermap.get_manifest_html() dat += "
" if(3) diff --git a/code/game/objects/items/devices/PDA/cart.dm b/code/game/objects/items/devices/PDA/cart.dm index d07a356107ff..1e96a5b3ce01 100644 --- a/code/game/objects/items/devices/PDA/cart.dm +++ b/code/game/objects/items/devices/PDA/cart.dm @@ -233,7 +233,7 @@ Code: Send Signal
"} if (41) //crew manifest menu = "

[PDAIMG(notes)] Crew Manifest

" - menu += "
[SSjob.get_manifest_html()]
" + menu += "
[SSovermap.get_manifest_html()]
" if (42) //status displays diff --git a/code/game/objects/structures/beds_chairs/chair.dm b/code/game/objects/structures/beds_chairs/chair.dm index a920c6f26760..eeaaf0adc982 100644 --- a/code/game/objects/structures/beds_chairs/chair.dm +++ b/code/game/objects/structures/beds_chairs/chair.dm @@ -311,9 +311,6 @@ new /obj/item/stack/rods(get_turf(loc), 2) qdel(src) - - - /obj/item/chair/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK) if(attack_type == UNARMED_ATTACK && prob(hit_reaction_chance)) owner.visible_message("[owner] fends off [attack_text] with [src]!") @@ -332,6 +329,12 @@ C.Paralyze(20) smash(user) +/obj/structure/chair/join_player_here(mob/M) + // Placing a mob in a chair will attempt to buckle it, or else fall back to default. + if (isliving(M) && buckle_mob(M, FALSE, FALSE)) + return + ..() + /obj/item/chair/greyscale material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS origin_type = /obj/structure/chair/greyscale diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 641a070f1ddc..254be079de1a 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -102,7 +102,7 @@ return FALSE var/datum/outfit/job/O = new outfit_type() var/list/outfit_types = O.get_chameleon_disguise_info() - var/datum/job/job_datum = SSjob.GetJobType(O.jobtype) + var/datum/job/job_datum = GLOB.type_occupations[O.jobtype] for(var/V in user.chameleon_item_actions) var/datum/action/item_action/chameleon/change/A = V diff --git a/code/modules/jobs/job_exp.dm b/code/modules/jobs/job_exp.dm index 9db25e4fc93a..4813e4aa3c39 100644 --- a/code/modules/jobs/job_exp.dm +++ b/code/modules/jobs/job_exp.dm @@ -88,7 +88,7 @@ GLOBAL_PROTECT(exp_to_update) play_records[exp_read.item[1]] = text2num(exp_read.item[2]) qdel(exp_read) - for(var/rtype in SSjob.name_occupations) + for(var/rtype in GLOB.name_occupations) if(!play_records[rtype]) play_records[rtype] = 0 for(var/rtype in GLOB.exp_specialmap) @@ -139,7 +139,7 @@ GLOBAL_PROTECT(exp_to_update) if(announce_changes) to_chat(src,"You got: [minutes] Living EXP!") if(mob.mind.assigned_role) - for(var/job in SSjob.name_occupations) + for(var/job in GLOB.name_occupations) if(mob.mind.assigned_role == job) rolefound = TRUE play_records[job] += minutes diff --git a/code/modules/jobs/job_report.dm b/code/modules/jobs/job_report.dm index 88c7f7ad1902..cbc43f4110bf 100644 --- a/code/modules/jobs/job_report.dm +++ b/code/modules/jobs/job_report.dm @@ -32,7 +32,7 @@ data["jobPlaytimes"] = list() data["specialPlaytimes"] = list() - for (var/job_name in SSjob.name_occupations) + for (var/job_name in GLOB.name_occupations) var/playtime = play_records[job_name] ? text2num(play_records[job_name]) : 0 data["jobPlaytimes"][job_name] = playtime diff --git a/code/modules/jobs/job_types/_job.dm b/code/modules/jobs/job_types/_job.dm index 93181f40ee18..206c0746bc85 100644 --- a/code/modules/jobs/job_types/_job.dm +++ b/code/modules/jobs/job_types/_job.dm @@ -33,6 +33,14 @@ if(new_name) name = new_name outfit = new_outfit + register() + +/datum/job/proc/register() + GLOB.occupations += src + if(name in GLOB.name_occupations) + return + + GLOB.name_occupations[name] = src //Only override this proc //H is usually a human unless an /equip override transformed it @@ -253,9 +261,9 @@ if(visualsOnly) return - var/datum/job/J = SSjob.GetJobType(jobtype) + var/datum/job/J = GLOB.type_occupations[jobtype] if(!J) - J = SSjob.GetJob(H.job) + J = GLOB.name_occupations[H.job] var/obj/item/card/id/C = H.wear_id if(istype(C)) diff --git a/code/modules/mob/dead/crew_manifest.dm b/code/modules/mob/dead/crew_manifest.dm index 355af961f299..c7ca52968f86 100644 --- a/code/modules/mob/dead/crew_manifest.dm +++ b/code/modules/mob/dead/crew_manifest.dm @@ -19,5 +19,5 @@ /datum/crew_manifest/ui_static_data(mob/user) return list( - "manifest" = SSjob.get_manifest() + "manifest" = SSovermap.get_manifest() ) diff --git a/code/modules/mob/living/simple_animal/hostile/zombie.dm b/code/modules/mob/living/simple_animal/hostile/zombie.dm index bbd925035043..2de9fba68678 100644 --- a/code/modules/mob/living/simple_animal/hostile/zombie.dm +++ b/code/modules/mob/living/simple_animal/hostile/zombie.dm @@ -33,7 +33,7 @@ dummy_prefs.pref_species = new /datum/species/zombie dummy_prefs.randomise[RANDOM_BODY] = TRUE if(zombiejob) - var/datum/job/J = SSjob.GetJob(zombiejob) + var/datum/job/J = GLOB.name_occupations[zombiejob] var/datum/outfit/O if(J.outfit) O = new J.outfit diff --git a/shiptest.dme b/shiptest.dme index 52b154672709..876d56765e90 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -214,6 +214,7 @@ #include "code\_globalvars\lists\admin.dm" #include "code\_globalvars\lists\client.dm" #include "code\_globalvars\lists\flavor_misc.dm" +#include "code\_globalvars\lists\jobs.dm" #include "code\_globalvars\lists\keybindings.dm" #include "code\_globalvars\lists\maintenance_loot.dm" #include "code\_globalvars\lists\mapping.dm" @@ -310,7 +311,6 @@ #include "code\controllers\subsystem\idlenpcpool.dm" #include "code\controllers\subsystem\input.dm" #include "code\controllers\subsystem\ipintel.dm" -#include "code\controllers\subsystem\job.dm" #include "code\controllers\subsystem\jukeboxes.dm" #include "code\controllers\subsystem\language.dm" #include "code\controllers\subsystem\lighting.dm" From a21a946256fcff1b95e5bdab311c20c473f61335 Mon Sep 17 00:00:00 2001 From: Mark Suckerberg Date: Wed, 5 Jul 2023 00:21:47 -0500 Subject: [PATCH 4/5] oops, fixes --- code/__HELPERS/global_lists.dm | 4 +++- code/game/machinery/computer/crew.dm | 29 ++++++++++++++-------------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index 4f9e234b0d27..7c04705c6294 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -84,7 +84,9 @@ //Default Jobs for(var/path in subtypesof(/datum/job)) var/datum/job/new_job = new path() - new_job.register() + GLOB.occupations += new_job + GLOB.name_occupations[new_job.name] = new_job + GLOB.type_occupations[path] = new_job // Keybindings init_keybindings() diff --git a/code/game/machinery/computer/crew.dm b/code/game/machinery/computer/crew.dm index c47333a80a0d..589289c595db 100644 --- a/code/game/machinery/computer/crew.dm +++ b/code/game/machinery/computer/crew.dm @@ -66,22 +66,23 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new) return data_by_z["[z]"] var/list/results = list() - var/obj/item/clothing/under/U - var/obj/item/card/id/I - var/turf/pos - var/ijob = JOB_DISPLAY_ORDER_DEFAULT - var/name = "Unknown" - var/assignment - var/oxydam - var/toxdam - var/burndam - var/brutedam - var/area - var/pos_x - var/pos_y - var/life_status for(var/i in GLOB.human_list) + var/obj/item/clothing/under/U + var/obj/item/card/id/I + var/turf/pos + var/ijob = JOB_DISPLAY_ORDER_DEFAULT + var/name = "Unknown" + var/assignment + var/oxydam + var/toxdam + var/burndam + var/brutedam + var/area + var/pos_x + var/pos_y + var/life_status + var/mob/living/carbon/human/H = i var/nanite_sensors = FALSE if(H in SSnanites.nanite_monitored_mobs) From b0e6b78a966577b1f3b8d8e8b6e5fe862ce51c04 Mon Sep 17 00:00:00 2001 From: Mark Suckerberg Date: Thu, 20 Jul 2023 21:37:19 -0500 Subject: [PATCH 5/5] little bastard --- code/modules/jobs/job_types/geneticist.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/jobs/job_types/geneticist.dm b/code/modules/jobs/job_types/geneticist.dm index 93f777e61e41..2720dcf064fd 100644 --- a/code/modules/jobs/job_types/geneticist.dm +++ b/code/modules/jobs/job_types/geneticist.dm @@ -1,5 +1,5 @@ /datum/job/geneticist - name = "Geneticist" + name = "Geneticist" wiki_page = "Guide_to_Genetics" //WS Edit - Wikilinks outfit = /datum/outfit/job/geneticist