From ec922683c22c19706ced66cfea93cb5cb2186d7c Mon Sep 17 00:00:00 2001 From: BingusSS13 Date: Thu, 26 Dec 2024 16:07:14 -0600 Subject: [PATCH] i pray this works --- code/__HELPERS/game.dm | 2 +- code/modules/admin/verbs/ert.dm | 4 ++-- code/modules/admin/verbs/secrets.dm | 2 +- code/modules/antagonists/_common/antag_spawner.dm | 4 ++-- code/modules/client/preferences.dm | 15 +++++++-------- code/modules/jobs/job_types/_job.dm | 2 +- code/modules/mob_spawn/mob_spawn.dm | 7 ++++--- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 058b4463ab21..2b03d7f69d16 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -196,7 +196,7 @@ var/mob/living/carbon/human/new_character = new//The mob being spawned. SSjob.SendToLateJoin(new_character) - ghost_player.client.prefs.safe_transfer_prefs_to(new_character) + ghost_player.client.prefs.safe_transfer_prefs_to(new_character, addToCharacterList = TRUE) //MONKESTATION EDIT - safe_transfer_prefs_to(new_character) >> safe_transfer_prefs_to(new_character, addToCharacterList = TRUE) new_character.dna.update_dna_identity() new_character.key = ghost_player.key diff --git a/code/modules/admin/verbs/ert.dm b/code/modules/admin/verbs/ert.dm index 786effac83e1..7ebb82e45013 100644 --- a/code/modules/admin/verbs/ert.dm +++ b/code/modules/admin/verbs/ert.dm @@ -188,7 +188,7 @@ if(isobserver(usr)) var/mob/living/carbon/human/admin_officer = new (brief_spawn || spawnpoints[1]) var/chosen_outfit = usr.client?.prefs?.read_preference(/datum/preference/choiced/brief_outfit) - usr.client.prefs.safe_transfer_prefs_to(admin_officer, is_antag = TRUE) + usr.client.prefs.safe_transfer_prefs_to(admin_officer, is_antag = TRUE, addToCharacterList = TRUE) //MONKESTATION EDIT - safe_transfer_prefs_to(admin_officer, is_antag = TRUE) >> safe_transfer_prefs_to(admin_officer, is_antag = TRUE, addToCharacterList = TRUE) admin_officer.equipOutfit(chosen_outfit) admin_officer.key = usr.key @@ -243,7 +243,7 @@ // MONKESTATION EDIT - Non-Carbon compatibility. if(iscarbon(ert_operative)) var/mob/living/carbon/ert_operative_carbon = ert_operative - chosen_candidate.client.prefs.safe_transfer_prefs_to(ert_operative_carbon, is_antag = TRUE) + chosen_candidate.client.prefs.safe_transfer_prefs_to(ert_operative_carbon, is_antag = TRUE, addToCharacterList = TRUE) //MONKESTATION EDIT - safe_transfer_prefs_to(ert_operative_carbon, is_antag = TRUE) >> safe_transfer_prefs_to(ert_operative_carbon, is_antag = TRUE, addToCharacterList = TRUE) if(ertemplate.enforce_human || !(ert_operative_carbon.dna.species.changesource_flags & ERT_SPAWN)) // Don't want any exploding plasmemes ert_operative_carbon.set_species(/datum/species/human) diff --git a/code/modules/admin/verbs/secrets.dm b/code/modules/admin/verbs/secrets.dm index 89849d2915c6..88d167ecdda1 100644 --- a/code/modules/admin/verbs/secrets.dm +++ b/code/modules/admin/verbs/secrets.dm @@ -626,7 +626,7 @@ monkestation end */ if (length(players)) var/mob/chosen = players[1] if (chosen.client) - chosen.client.prefs.safe_transfer_prefs_to(spawnedMob, is_antag = TRUE) + chosen.client.prefs.safe_transfer_prefs_to(spawnedMob, is_antag = TRUE, addToCharacterList = TRUE) //MONKESTATION EDIT - safe_transfer_prefs_to(spawnedMob, is_antag = TRUE) >> safe_transfer_prefs_to(spawnedMob, is_antag = TRUE, addToCharacterList = TRUE) - Does this count as playing a character? spawnedMob.key = chosen.key players -= chosen if (ishuman(spawnedMob) && ispath(humanoutfit, /datum/outfit)) diff --git a/code/modules/antagonists/_common/antag_spawner.dm b/code/modules/antagonists/_common/antag_spawner.dm index 12d22bb25d72..50b687b0bad1 100644 --- a/code/modules/antagonists/_common/antag_spawner.dm +++ b/code/modules/antagonists/_common/antag_spawner.dm @@ -68,7 +68,7 @@ /obj/item/antag_spawner/contract/spawn_antag(client/C, turf/T, kind, datum/mind/user) new /obj/effect/particle_effect/fluid/smoke(T) var/mob/living/carbon/human/M = new/mob/living/carbon/human(T) - C.prefs.safe_transfer_prefs_to(M, is_antag = TRUE) + C.prefs.safe_transfer_prefs_to(M, is_antag = TRUE, addToCharacterList = TRUE) //MONKESTATION EDIT - safe_transfer_prefs_to(M, is_antag = TRUE) >> safe_transfer_prefs_to(M, is_antag = TRUE, addToCharacterList = TRUE) M.key = C.key var/datum/mind/app_mind = M.mind @@ -147,7 +147,7 @@ /obj/item/antag_spawner/nuke_ops/spawn_antag(client/our_client, turf/T, kind, datum/mind/user) var/mob/living/carbon/human/nukie = new() var/obj/structure/closet/supplypod/pod = setup_pod() - our_client.prefs.safe_transfer_prefs_to(nukie, is_antag = TRUE) + our_client.prefs.safe_transfer_prefs_to(nukie, is_antag = TRUE, addToCharacterList = TRUE) //MONKESTATION EDIT - safe_transfer_prefs_to(nukie, is_antag = TRUE) >> safe_transfer_prefs_to(nukie, is_antag = TRUE, addToCharacterList = TRUE) nukie.ckey = our_client.key var/datum/mind/op_mind = nukie.mind if(length(GLOB.newplayer_start)) // needed as hud code doesn't render huds if the atom (in this case the nukie) is in nullspace, so just move the nukie somewhere safe diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index a0a4347fdb8e..855adf49c01b 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -484,7 +484,13 @@ GLOBAL_LIST_EMPTY(played_character_list) all_quirks = list() /// Sanitizes the preferences, applies the randomization prefs, and then applies the preference to the human mob. -/datum/preferences/proc/safe_transfer_prefs_to(mob/living/carbon/human/character, icon_updates = FALSE, is_antag = FALSE) //MONKESTATION EDIT - "icon_updates = TRUE" to "icon_updates = FALSE" Why did we even have that? +/datum/preferences/proc/safe_transfer_prefs_to(mob/living/carbon/human/character, icon_updates = TRUE, is_antag = FALSE, addToCharacterList = FALSE) //MONKESTATION EDIT - Added "addToCharacterList = FALSE" + //MONKESTATION EDIT - Tells us what characters this user has played as, please god tell me theres something like this already and I don't have to do this. + if(addToCharacterList) + if(GLOB.played_character_list[parent.ckey] == null) + GLOB.played_character_list[parent.ckey] = list() //Initialize the slot list. + GLOB.played_character_list[parent.ckey] += default_slot + //END OF EDIT apply_character_randomization_prefs(is_antag) apply_prefs_to(character, icon_updates) @@ -508,13 +514,6 @@ GLOBAL_LIST_EMPTY(played_character_list) character.icon_render_keys = list() character.update_body(is_creating = TRUE) - //MONKESTATION EDIT - Tells us what characters this user has played as, please god tell me theres something like this already and I don't have to do this. - if(!icon_updates) //Only do this if we aren't applying preferences for an icon update, like in character setup. - if(GLOB.played_character_list[parent.ckey] == null) - GLOB.played_character_list[parent.ckey] = list() //Initialize the slot list. - GLOB.played_character_list[parent.ckey] += default_slot - //END OF EDIT - /// Returns whether the parent mob should have the random hardcore settings enabled. Assumes it has a mind. /datum/preferences/proc/should_be_random_hardcore(datum/job/job, datum/mind/mind) if(!read_preference(/datum/preference/toggle/random_hardcore)) diff --git a/code/modules/jobs/job_types/_job.dm b/code/modules/jobs/job_types/_job.dm index 8fa5c7b0ad0e..a596f7a74b7b 100644 --- a/code/modules/jobs/job_types/_job.dm +++ b/code/modules/jobs/job_types/_job.dm @@ -533,7 +533,7 @@ var/is_antag = (player_client.mob.mind in GLOB.pre_setup_antags) if(require_human) player_client.prefs.randomise["species"] = FALSE - player_client.prefs.safe_transfer_prefs_to(src, TRUE, is_antag) + player_client.prefs.safe_transfer_prefs_to(src, TRUE, is_antag, TRUE) //MONKESTATION EDIT - safe_transfer_prefs_to(src, TRUE, is_antag) >> safe_transfer_prefs_to(src, TRUE, is_antag, TRUE) if(require_human && !ishumanbasic(src)) set_species(/datum/species/human) dna.species.roundstart_changed = TRUE diff --git a/code/modules/mob_spawn/mob_spawn.dm b/code/modules/mob_spawn/mob_spawn.dm index 6891d90d8197..63bda15bdbd0 100644 --- a/code/modules/mob_spawn/mob_spawn.dm +++ b/code/modules/mob_spawn/mob_spawn.dm @@ -257,13 +257,15 @@ //MONKESTATION EDIT - Check if we are using preferences. if(use_prefs && mob_possessor) var/mob/living/carbon/human/spawned_mob1 = spawned_mob - mob_possessor.client.prefs.safe_transfer_prefs_to(spawned_mob1) + mob_possessor.client.prefs.safe_transfer_prefs_to(spawned_mob1, addToCharacterList = TRUE) spawned_mob1.equip_outfit_and_loadout(outfit, mob_possessor.client.prefs) for(var/datum/loadout_item/item as anything in loadout_list_to_datums(mob_possessor.client?.prefs?.loadout_list)) if(length(item.restricted_roles)) continue item.post_equip_item(mob_possessor.client.prefs, spawned_mob1) - SSquirks.AssignQuirks(spawned_mob1, mob_possessor.client, FALSE, FALSE, FALSE, list(/datum/quirk/stowaway)) //fok of, stowaway + SSquirks.AssignQuirks(spawned_mob1, mob_possessor.client, blacklist = list(/datum/quirk/stowaway)) //fok of, stowaway + spawned_mob1.icon_render_keys = list() + spawned_mob1.update_body(is_creating = TRUE) //END OF EDIT if(mob_possessor) if(mob_possessor.mind) @@ -274,7 +276,6 @@ if(spawned_mind) spawned_mob.mind.set_assigned_role_with_greeting(SSjob.GetJobType(spawner_job_path)) spawned_mind.name = spawned_mob.real_name - if(show_flavor) var/output_message = "[you_are_text]" if(flavour_text != "")