Skip to content

Commit

Permalink
i pray this works
Browse files Browse the repository at this point in the history
  • Loading branch information
BingusSS13 committed Dec 26, 2024
1 parent 0d7cb18 commit ec92268
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion code/__HELPERS/game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions code/modules/admin/verbs/ert.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/admin/verbs/secrets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions code/modules/antagonists/_common/antag_spawner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
15 changes: 7 additions & 8 deletions code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/jobs/job_types/_job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions code/modules/mob_spawn/mob_spawn.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 = "<span class='infoplain'><span class='big bold'>[you_are_text]</span></span>"
if(flavour_text != "")
Expand Down

0 comments on commit ec92268

Please sign in to comment.