From d6645adb36c7635e8e19104d77c346c2af96f2c8 Mon Sep 17 00:00:00 2001 From: TheGreatKitsune Date: Wed, 21 Sep 2022 13:41:56 -0500 Subject: [PATCH] Fix a few bugs with non-crew --- code/game/jobs/job_controller.dm | 3 ++- .../modules/client/preferences_spawnpoints.dm | 8 ++++---- code/modules/mob/new_player/new_player.dm | 2 +- .../code/datums/outfits/jobs/noncrew.dm | 20 ++++++++++--------- modular_chomp/code/game/jobs/job/noncrew.dm | 4 ++-- .../modules/client/preferences_spawnpoints.dm | 4 ++-- 6 files changed, 22 insertions(+), 19 deletions(-) diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index 3ca68c8219..95784c156b 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -803,7 +803,8 @@ var/global/datum/controller/occupations/job_master .["msg"] = spawnpos.msg .["channel"] = spawnpos.announce_channel else - if(fail_deadly) + var/datum/job/J = SSjob.get_job(rank) + if(fail_deadly || J?.offmap_spawn) to_chat(C, "Your chosen spawnpoint ([spawnpos.display_name]) is unavailable for your chosen job. Please correct your spawn point choice.") return to_chat(C, "Your chosen spawnpoint ([spawnpos.display_name]) is unavailable for your chosen job. Spawning you at the Arrivals shuttle instead.") diff --git a/code/modules/client/preferences_spawnpoints.dm b/code/modules/client/preferences_spawnpoints.dm index e04383a01f..04c1a26669 100644 --- a/code/modules/client/preferences_spawnpoints.dm +++ b/code/modules/client/preferences_spawnpoints.dm @@ -41,7 +41,7 @@ var/list/spawntypes = list() /datum/spawnpoint/arrivals display_name = "Arrivals Shuttle" msg = "will arrive to the station shortly by shuttle" - disallow_job = list("Non crew") //CHOMPEdit add + disallow_job = list("Non-Crew") //CHOMPEdit add /datum/spawnpoint/arrivals/New() ..() @@ -67,7 +67,7 @@ var/list/spawntypes = list() display_name = "Cryogenic Storage" msg = "has completed cryogenic revival" allowed_mob_types = JOB_CARBON - disallow_job = list("Non crew") //CHOMPEdit add + disallow_job = list("Non-Crew") //CHOMPEdit add /datum/spawnpoint/cryo/New() ..() @@ -77,7 +77,7 @@ var/list/spawntypes = list() display_name = "Cyborg Storage" msg = "has been activated from storage" allowed_mob_types = JOB_SILICON - disallow_job = list("Non crew") //CHOMPEdit add + disallow_job = list("Non-Crew") //CHOMPEdit add /datum/spawnpoint/cyborg/New() ..() @@ -104,7 +104,7 @@ var/global/list/latejoin_tram = list() /datum/spawnpoint/tram display_name = "Tram Station" msg = "will arrive to the station shortly by shuttle" - disallow_job = list("Non crew") //CHOMPEdit add + disallow_job = list("Non-Crew") //CHOMPEdit add /datum/spawnpoint/tram/New() ..() diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index b99b0f5d5a..bc62538861 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -483,7 +483,7 @@ ticker.mode.latespawn(character) //CHOMPEdit Begin - non-crew join don't get a message - if(rank == "Non crew") + if(rank == "Non-Crew") log_and_message_admins("has joined the round as non-crew. (JMP)",character) if(!(J.mob_type & JOB_SILICON)) ticker.minds += character.mind diff --git a/modular_chomp/code/datums/outfits/jobs/noncrew.dm b/modular_chomp/code/datums/outfits/jobs/noncrew.dm index 42e14d4a74..146677d0cf 100644 --- a/modular_chomp/code/datums/outfits/jobs/noncrew.dm +++ b/modular_chomp/code/datums/outfits/jobs/noncrew.dm @@ -1,10 +1,12 @@ -/decl/hierarchy/outfit/job/noncrew - hierarchy_type = /decl/hierarchy/outfit/job/noncrew - r_pocket = /obj/item/weapon/spacecash/ewallet +/decl/hierarchy/outfit/noncrew + name = OUTFIT_JOB_NAME("Non-Crew") + //hierarchy_type = /decl/hierarchy/outfit/noncrew + r_pocket = /obj/item/weapon/spacecash/ewallet + flags = OUTFIT_HAS_BACKPACK|OUTFIT_EXTENDED_SURVIVAL|OUTFIT_COMPREHENSIVE_SURVIVAL -/decl/hierarchy/outfit/job/noncrew/post_equip(mob/living/carbon/human/H) - ..() - var/obj/item/weapon/spacecash/ewallet/wallet = H.r_store - if(istype(wallet)) - wallet.owner_name = H.real_name - wallet.worth = 1000 +/decl/hierarchy/outfit/noncrew/post_equip(mob/living/carbon/human/H) + ..() + var/obj/item/weapon/spacecash/ewallet/wallet = H.r_store + if(istype(wallet)) + wallet.owner_name = H.real_name + wallet.worth = 1000 diff --git a/modular_chomp/code/game/jobs/job/noncrew.dm b/modular_chomp/code/game/jobs/job/noncrew.dm index e1c60716d5..9c6f66b7c3 100644 --- a/modular_chomp/code/game/jobs/job/noncrew.dm +++ b/modular_chomp/code/game/jobs/job/noncrew.dm @@ -1,5 +1,5 @@ /datum/job/noncrew - title = "Non crew" + title = "Non-Crew" disallow_jobhop = TRUE total_positions = -1 spawn_positions = 6 @@ -13,7 +13,7 @@ account_allowed = 0 offmap_spawn = TRUE - outfit_type = /decl/hierarchy/outfit/job/noncrew + outfit_type = /decl/hierarchy/outfit/noncrew job_description = "Not a crew member." /datum/job/noncrew/is_species_banned(species_name, brain_type) diff --git a/modular_chomp/code/modules/client/preferences_spawnpoints.dm b/modular_chomp/code/modules/client/preferences_spawnpoints.dm index f1c2a2c0ac..225356789d 100644 --- a/modular_chomp/code/modules/client/preferences_spawnpoints.dm +++ b/modular_chomp/code/modules/client/preferences_spawnpoints.dm @@ -1,7 +1,7 @@ /datum/spawnpoint/stationgateway display_name = "Station gateway" msg = "has completed translation from station gateway" - disallow_job = list("Non crew") + disallow_job = list("Non-Crew") /datum/spawnpoint/stationgateway/New() ..() @@ -23,7 +23,7 @@ /datum/spawnpoint/plainspath display_name = "Sif plains" msg = "has checked in at the plains gate" - restrict_job = list("Non crew") + restrict_job = list("Non-Crew") /datum/spawnpoint/plainspath/New() ..()