diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index 6cbea09877e87..ed3c951ec038b 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -344,7 +344,7 @@ GLOBAL_LIST_INIT(book_types, typecacheof(list( #define is_scientist_job(job_type) (istype(job_type, /datum/job/scientist)) #define is_security_officer_job(job_type) (istype(job_type, /datum/job/security_officer)) #define is_research_director_job(job_type) (istype(job_type, /datum/job/research_director)) -#define is_unassigned_job(job_type) (istype(job_type, /datum/job/unassigned)) +#define is_unassigned_job(job_type) (istype(job_type, /datum/job/unassigned) || istype(job_type, /datum/job/stowaway)) #define isprojectilespell(thing) (istype(thing, /datum/action/cooldown/spell/pointed/projectile)) #define is_multi_tile_object(atom) (atom.bound_width > world.icon_size || atom.bound_height > world.icon_size) diff --git a/code/__HELPERS/~monkestation-helpers/game.dm b/code/__HELPERS/~monkestation-helpers/game.dm index 007331055fca2..0a5be41e2759c 100644 --- a/code/__HELPERS/~monkestation-helpers/game.dm +++ b/code/__HELPERS/~monkestation-helpers/game.dm @@ -2,7 +2,7 @@ /proc/get_unlocked_closed_locker() var/list/eligible_lockers = list() for(var/obj/structure/closet/closet as anything in GLOB.closets) - if(QDELETED(closet) || closet.opened || istype(closet, /obj/structure/closet/secure_closet)) + if(QDELETED(closet) || closet.opened || istype(closet, /obj/structure/closet/secure_closet) || istype(closet, /obj/structure/closet/crate/secure)) continue var/turf/closet_turf = get_turf(closet) if(!closet_turf || !is_station_level(closet_turf.z) || !is_safe_turf(closet_turf, dense_atoms = TRUE)) diff --git a/code/datums/records/manifest.dm b/code/datums/records/manifest.dm index 2ab94f82d5d53..273f8bc73b04e 100644 --- a/code/datums/records/manifest.dm +++ b/code/datums/records/manifest.dm @@ -98,6 +98,12 @@ GLOBAL_DATUM_INIT(manifest, /datum/manifest, new) /// Injects a record into the manifest. /datum/manifest/proc/inject(mob/living/carbon/human/person, client/person_client, atom/appearance_proxy) set waitfor = FALSE + // OCULIS PORT START - unassigned job so we need the check to not early return + var/is_hidden_stowaway = is_stowaway(person, person_client) + + if(!is_hidden_stowaway && !(person.mind?.assigned_role.job_flags & JOB_CREW_MANIFEST)) + return + // OCULIS PORT END if(!(person.mind?.assigned_role.job_flags & JOB_CREW_MANIFEST)) return //if you're cargo, and not a boss, you're part of the Union. @@ -137,6 +143,11 @@ GLOBAL_DATUM_INIT(manifest, /datum/manifest, new) mind_ref = person.mind, ) + // OCULIS PORT START - they're in /datum/record/locked now, we can return + if(is_hidden_stowaway) + return + // OCULIS PORT END + var/datum/record/crew/crewfile = new ( age = person.age, blood_type = "[person.get_blood_type() || "None"]", diff --git a/code/game/objects/items/storage/bags.dm b/code/game/objects/items/storage/bags.dm index 933e362092290..3acbd14cbc1ac 100644 --- a/code/game/objects/items/storage/bags.dm +++ b/code/game/objects/items/storage/bags.dm @@ -93,6 +93,17 @@ new /obj/effect/spawner/random/trash/garbage(src) update_icon_state() +/obj/item/storage/bag/trash/stowaway + +/obj/item/storage/bag/trash/stowaway/PopulateContents() + new /obj/item/weldingtool/mini(src) + new /obj/item/clothing/mask/breath(src) + new /obj/item/tank/internals/emergency_oxygen(src) + new /obj/item/reagent_containers/medipen(src) + new /obj/effect/spawner/random/trash/garbage(src) + new /obj/effect/spawner/random/trash/garbage(src) + update_icon_state() + /obj/item/storage/bag/trash/bluespace name = "trash bag of holding" desc = "The latest and greatest in custodial convenience, a trashbag that is capable of holding vast quantities of garbage." diff --git a/code/modules/jobs/job_types/stowaway.dm b/code/modules/jobs/job_types/stowaway.dm new file mode 100644 index 0000000000000..09782ad3bd139 --- /dev/null +++ b/code/modules/jobs/job_types/stowaway.dm @@ -0,0 +1,24 @@ +/** + * Copy of Unassigned Crewmember, so Stowaways appear properly in ghost orbit and playtime. + **/ + +/datum/job/stowaway + title = "Stowaway" + rpg_title = "Wanderer" + paycheck = PAYCHECK_ZERO + outfit = /datum/outfit/job/stowaway + allow_bureaucratic_error = FALSE + +/datum/outfit/job/stowaway + name = "Stowaway" + jobtype = /datum/job/stowaway + uniform = /obj/item/clothing/under/color/grey + belt = /obj/item/storage/bag/trash/stowaway + l_pocket = /obj/item/radio + + shoes = null + ears = null + + backpack = null + satchel = null + duffelbag = null diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index d6d88d6b7d990..8daf27b0798a7 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -318,12 +318,12 @@ humanc = character //Let's retypecast the var to be human, if(humanc) //These procs all expect humans + process_stowaway_latejoin(humanc, job, humanc.client) // OCULIS PORT - stowaway latejoin flow var/chosen_rank = humanc.client?.prefs.alt_job_titles[rank] || rank if(SSshuttle.arrivals) SSshuttle.arrivals.QueueAnnounce(humanc, chosen_rank) else - if(!HAS_TRAIT(character, TRAIT_STOWAWAY)) - announce_arrival(humanc, chosen_rank) + announce_arrival(humanc, chosen_rank) AddEmploymentContract(humanc) humanc.increment_scar_slot() diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 43b8a35f817e7..bd89223650120 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -182,14 +182,19 @@ id_examine += "
" id_examine += "[id_icon]" id_examine += "
" - id_examine += jointext(list( - "• Name: [id_name || "Unknown"]", - "• Job: [id_job || "Unassigned"]", - "• Age: [id_age || "Unknown"]", - "• Gender: [id_gender || "Unknown"]", - "• Blood Type: [id_blood_type || "?"]", - "• Species: [id_species || "Unknown"]", - ), "
") + if(id_job == "Stowaway") + id_examine += jointext(list( + "• Name: [id_name || "Unknown"]", + ), "
") + else + id_examine += jointext(list( + "• Name: [id_name || "Unknown"]", + "• Job: [id_job || "Unassigned"]", + "• Age: [id_age || "Unknown"]", + "• Gender: [id_gender || "Unknown"]", + "• Blood Type: [id_blood_type || "?"]", + "• Species: [id_species || "Unknown"]", + ), "
") id_examine += "
" // container id_examine += "
" // text diff --git a/monkestation/code/datums/quirks/negative_quirks/stowaway.dm b/monkestation/code/datums/quirks/negative_quirks/stowaway.dm index a2413bd1eac20..cf8dcc1ab0fcd 100644 --- a/monkestation/code/datums/quirks/negative_quirks/stowaway.dm +++ b/monkestation/code/datums/quirks/negative_quirks/stowaway.dm @@ -7,8 +7,11 @@ /datum/quirk/stowaway/add_unique() var/mob/living/carbon/human/stowaway = quirk_holder - var/obj/item/card/id/trashed = stowaway.get_item_by_slot(ITEM_SLOT_ID) //No ID - qdel(trashed) + stowaway.delete_equipment() + stowaway.equip_outfit_and_loadout(/datum/outfit/job/stowaway, stowaway.client.prefs, FALSE, /datum/job/stowaway) //Loadout items and stowaway gear + + var/obj/item/card/id/realid = stowaway.get_item_by_slot(ITEM_SLOT_ID) //No ID + qdel(realid) var/obj/item/card/id/fake_card/card = new(quirk_holder.drop_location()) //a fake ID with two uses for maint doors quirk_holder.equip_to_slot_if_possible(card, ITEM_SLOT_ID) @@ -23,7 +26,7 @@ /datum/quirk/stowaway/post_add() to_chat(quirk_holder, span_boldnotice("You've awoken to find yourself inside [GLOB.station_name] without real identification!")) - addtimer(CALLBACK(quirk_holder.mind, TYPE_PROC_REF(/datum/mind, remove_from_manifest)), 5 SECONDS) + force_stowaway_unassigned_role(quirk_holder, quirk_holder.client) /obj/item/card/id/fake_card //not a proper ID but still shares a lot of functions name = "\"ID Card\"" @@ -37,7 +40,7 @@ registered_account = null create_bank_on_init = FALSE accepts_accounts = FALSE - registered_name = "Nohbdy" + registered_name = "Nobody" access = list(ACCESS_MAINT_TUNNELS) ///How many doors the fake card can open before it becomes completely torn up. var/uses = 2 @@ -45,7 +48,7 @@ /obj/item/card/id/fake_card/proc/register_name(mob/living/carbon/human/quirk_holder) registered_name = quirk_holder.real_name name = "[quirk_holder.real_name]'s \"ID Card\"" - assignment = quirk_holder.mind.assigned_role.title + assignment = "Stowaway" /obj/item/card/id/fake_card/proc/used() uses-- @@ -73,3 +76,33 @@ . += "It's falling apart!" else . += "It looks frail!" +//OCULIS PORT START: Removes job assignment and handles latejoin stowaways +/proc/is_stowaway(mob/living/carbon/human/person, client/person_client) + if(!person) + return FALSE + + var/client/target_client = person_client || person.client + var/list/all_quirks = target_client?.prefs.all_quirks + + return person.has_quirk(/datum/quirk/stowaway) || (all_quirks && ("Stowaway" in all_quirks)) + +/proc/force_stowaway_unassigned_role(mob/living/carbon/human/person, client/person_client) + if(!person?.mind || is_unassigned_job(person.mind.assigned_role)) + return + + var/datum/job/previous_role = person.mind.assigned_role + if(previous_role?.title) + SSjob.FreeRole(previous_role.title) + + person.mind.set_assigned_role(SSjob.GetJobType(/datum/job/stowaway)) + person.job = "Stowaway" + +/proc/process_stowaway_latejoin(mob/living/carbon/human/person, datum/job/current_job, client/person_client) + if(!person?.mind || !is_stowaway(person, person_client)) + return + + if((current_job?.job_flags & JOB_ASSIGN_QUIRKS) && CONFIG_GET(flag/roundstart_traits)) + SSquirks.AssignQuirks(person, person_client) + + force_stowaway_unassigned_role(person, person_client) +//OCULIS PORT END diff --git a/tgstation.dme b/tgstation.dme index 94a2ac747042d..d2619fa5a16e5 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -4528,6 +4528,7 @@ #include "code\modules\jobs\job_types\servant_golem.dm" #include "code\modules\jobs\job_types\shaft_miner.dm" #include "code\modules\jobs\job_types\station_engineer.dm" +#include "code\modules\jobs\job_types\stowaway.dm" #include "code\modules\jobs\job_types\unassigned.dm" #include "code\modules\jobs\job_types\virologist.dm" #include "code\modules\jobs\job_types\warden.dm" diff --git a/tgui/packages/tgui/interfaces/common/JobToIcon.ts b/tgui/packages/tgui/interfaces/common/JobToIcon.ts index 5e83bd373491b..f56b3932ff60e 100644 --- a/tgui/packages/tgui/interfaces/common/JobToIcon.ts +++ b/tgui/packages/tgui/interfaces/common/JobToIcon.ts @@ -63,6 +63,7 @@ const BASEICONS = { 'Shaft Miner': 'digging', Skeleton: 'skull-crossbones', 'Station Engineer': 'gears', + Stowaway: 'person-through-window', // MONKESTATION ADDITION 'Syndicate Operative': 'dragon', Virologist: 'virus', Warden: 'handcuffs',