From 69f27e19fef51ad2a332201364123ae4a7e16947 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Fri, 18 Oct 2019 18:02:24 +0200 Subject: [PATCH 1/4] Touching up job outfits equip procs, little PDA fix. --- code/datums/outfit.dm | 10 ++-- code/game/gamemodes/clown_ops/clown_ops.dm | 2 +- code/game/gamemodes/nuclear/nuclear.dm | 2 +- code/game/objects/items/devices/PDA/PDA.dm | 50 ++++++++++--------- .../objects/structures/ghost_role_spawners.dm | 2 +- .../abductor/equipment/abduction_outfits.dm | 4 +- code/modules/awaymissions/capture_the_flag.dm | 6 +-- code/modules/awaymissions/corpse.dm | 2 +- code/modules/client/preferences.dm | 8 +-- code/modules/clothing/outfits/ert.dm | 20 ++++---- code/modules/clothing/outfits/event.dm | 2 +- code/modules/clothing/outfits/standard.dm | 22 ++++---- code/modules/clothing/outfits/vr.dm | 9 ++-- code/modules/clothing/outfits/vv_outfit.dm | 4 +- code/modules/jobs/job_types/_job.dm | 15 +++--- code/modules/jobs/job_types/assistant.dm | 7 +-- code/modules/jobs/job_types/clown.dm | 12 ++--- code/modules/jobs/job_types/cook.dm | 4 +- code/modules/jobs/job_types/curator.dm | 2 +- code/modules/jobs/job_types/detective.dm | 2 +- code/modules/jobs/job_types/lawyer.dm | 2 +- code/modules/jobs/job_types/mime.dm | 7 ++- .../mob/living/carbon/human/human_defines.dm | 2 - .../mob/living/carbon/human/inventory.dm | 4 +- code/modules/ninja/outfit.dm | 2 +- code/modules/ruins/lavaland_ruin_code.dm | 2 +- 26 files changed, 104 insertions(+), 100 deletions(-) diff --git a/code/datums/outfit.dm b/code/datums/outfit.dm index 8386b59d97..da379b9851 100755 --- a/code/datums/outfit.dm +++ b/code/datums/outfit.dm @@ -28,16 +28,16 @@ var/can_be_admin_equipped = TRUE // Set to FALSE if your outfit requires runtime parameters var/list/chameleon_extras //extra types for chameleon outfit changes, mostly guns -/datum/outfit/proc/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/proc/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) //to be overridden for customization depending on client prefs,species etc return -/datum/outfit/proc/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/proc/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) //to be overridden for toggling internals, id binding, access etc return -/datum/outfit/proc/equip(mob/living/carbon/human/H, visualsOnly = FALSE) - pre_equip(H, visualsOnly) +/datum/outfit/proc/equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) + pre_equip(H, visualsOnly, preference_source) //Start with uniform,suit,backpack for additional slots if(uniform) @@ -103,7 +103,7 @@ var/obj/item/clothing/suit/space/hardsuit/HS = H.wear_suit HS.ToggleHelmet() - post_equip(H, visualsOnly) + post_equip(H, visualsOnly, preference_source) if(!visualsOnly) apply_fingerprints(H) diff --git a/code/game/gamemodes/clown_ops/clown_ops.dm b/code/game/gamemodes/clown_ops/clown_ops.dm index 66de72bad2..49a336e16a 100644 --- a/code/game/gamemodes/clown_ops/clown_ops.dm +++ b/code/game/gamemodes/clown_ops/clown_ops.dm @@ -53,7 +53,7 @@ /datum/outfit/syndicate/clownop/no_crystals tc = 0 -/datum/outfit/syndicate/clownop/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/syndicate/clownop/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) ..() if(visualsOnly) return diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index 1767d468ec..632d59c84d 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -144,7 +144,7 @@ /datum/outfit/syndicate/no_crystals tc = 0 -/datum/outfit/syndicate/post_equip(mob/living/carbon/human/H) +/datum/outfit/syndicate/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) var/obj/item/radio/R = H.ears R.set_frequency(FREQ_SYNDICATE) R.freqlock = TRUE diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index b0494539ce..6b115b52b5 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -162,31 +162,33 @@ GLOBAL_LIST_EMPTY(PDAs) /obj/item/pda/equipped(mob/user, slot) . = ..() - if(equipped) + if(equipped || !user.client) return - if(user.client) - background_color = user.client.prefs.pda_color - switch(user.client.prefs.pda_style) - if(MONO) - font_index = MODE_MONO - font_mode = FONT_MONO - if(SHARE) - font_index = MODE_SHARE - font_mode = FONT_SHARE - if(ORBITRON) - font_index = MODE_ORBITRON - font_mode = FONT_ORBITRON - if(VT) - font_index = MODE_VT - font_mode = FONT_VT - else - font_index = MODE_MONO - font_mode = FONT_MONO - var/pref_skin = GLOB.pda_reskins[user.client.prefs.pda_skin] - if(icon != pref_skin) - icon = pref_skin - update_icon(FALSE, TRUE) - equipped = TRUE + update_style(user.client) + +/obj/item/pda/proc/update_style(client/C) + background_color = C.prefs.pda_color + switch(C.prefs.pda_style) + if(MONO) + font_index = MODE_MONO + font_mode = FONT_MONO + if(SHARE) + font_index = MODE_SHARE + font_mode = FONT_SHARE + if(ORBITRON) + font_index = MODE_ORBITRON + font_mode = FONT_ORBITRON + if(VT) + font_index = MODE_VT + font_mode = FONT_VT + else + font_index = MODE_MONO + font_mode = FONT_MONO + var/pref_skin = GLOB.pda_reskins[C.prefs.pda_skin] + if(icon != pref_skin) + icon = pref_skin + update_icon(FALSE, TRUE) + equipped = TRUE /obj/item/pda/proc/update_label() name = "PDA-[owner] ([ownjob])" //Name generalisation diff --git a/code/game/objects/structures/ghost_role_spawners.dm b/code/game/objects/structures/ghost_role_spawners.dm index b820e93c7b..391269f604 100644 --- a/code/game/objects/structures/ghost_role_spawners.dm +++ b/code/game/objects/structures/ghost_role_spawners.dm @@ -422,7 +422,7 @@ implants = list(/obj/item/implant/weapons_auth) id = /obj/item/card/id/syndicate -/datum/outfit/syndicate_empty/post_equip(mob/living/carbon/human/H) +/datum/outfit/syndicate_empty/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) H.faction |= ROLE_SYNDICATE /obj/effect/mob_spawn/human/syndicate/battlecruiser diff --git a/code/modules/antagonists/abductor/equipment/abduction_outfits.dm b/code/modules/antagonists/abductor/equipment/abduction_outfits.dm index 7e03bbf57a..7bfadf6f3b 100644 --- a/code/modules/antagonists/abductor/equipment/abduction_outfits.dm +++ b/code/modules/antagonists/abductor/equipment/abduction_outfits.dm @@ -24,7 +24,7 @@ for(var/obj/item/abductor/gizmo/G in B.contents) console.AddGizmo(G) -/datum/outfit/abductor/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/abductor/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) ..() if(!visualsOnly) link_to_console(H) @@ -49,7 +49,7 @@ /obj/item/abductor/gizmo = 1 ) -/datum/outfit/abductor/scientist/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/abductor/scientist/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) ..() if(!visualsOnly) var/obj/item/implant/abductor/beamplant = new diff --git a/code/modules/awaymissions/capture_the_flag.dm b/code/modules/awaymissions/capture_the_flag.dm index 84f08197b4..bd4e716357 100644 --- a/code/modules/awaymissions/capture_the_flag.dm +++ b/code/modules/awaymissions/capture_the_flag.dm @@ -487,7 +487,7 @@ r_pocket = /obj/item/ammo_box/magazine/recharge/ctf r_hand = /obj/item/gun/ballistic/automatic/laser/ctf -/datum/outfit/ctf/post_equip(mob/living/carbon/human/H, visualsOnly=FALSE) +/datum/outfit/ctf/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) if(visualsOnly) return var/list/no_drops = list() @@ -529,7 +529,7 @@ r_hand = /obj/item/gun/energy/laser/instakill/blue shoes = /obj/item/clothing/shoes/jackboots/fast -/datum/outfit/ctf/red/post_equip(mob/living/carbon/human/H) +/datum/outfit/ctf/red/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) ..() var/obj/item/radio/R = H.ears R.set_frequency(FREQ_CTF_RED) @@ -537,7 +537,7 @@ R.independent = TRUE H.dna.species.stunmod = 0 -/datum/outfit/ctf/blue/post_equip(mob/living/carbon/human/H) +/datum/outfit/ctf/blue/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) ..() var/obj/item/radio/R = H.ears R.set_frequency(FREQ_CTF_BLUE) diff --git a/code/modules/awaymissions/corpse.dm b/code/modules/awaymissions/corpse.dm index 74f81ec9a0..33c0f27cd7 100644 --- a/code/modules/awaymissions/corpse.dm +++ b/code/modules/awaymissions/corpse.dm @@ -433,7 +433,7 @@ uniform = /obj/item/clothing/under/pants/youngfolksjeans id = /obj/item/card/id -/datum/outfit/beachbum/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/beachbum/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) ..() if(visualsOnly) return diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index c6166ca970..edecbadab4 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -1730,13 +1730,13 @@ GLOBAL_LIST_EMPTY(preferences_datums) new_insect_wings = input(user, "Choose your character's wings:", "Character Preference") as null|anything in GLOB.insect_wings_list if(new_insect_wings) features["insect_wings"] = new_insect_wings - + if("deco_wings") var/new_deco_wings new_deco_wings = input(user, "Choose your character's wings:", "Character Preference") as null|anything in GLOB.deco_wings_list if(new_deco_wings) features["deco_wings"] = new_deco_wings - + if("insect_fluffs") var/new_insect_fluff new_insect_fluff = input(user, "Choose your character's wings:", "Character Preference") as null|anything in GLOB.insect_fluffs_list @@ -2277,10 +2277,6 @@ GLOBAL_LIST_EMPTY(preferences_datums) character.shirt_color = shirt_color character.socks_color = socks_color - - character.backbag = backbag - character.jumpsuit_style = jumpsuit_style - var/datum/species/chosen_species if(!roundstart_checks || (pref_species.id in GLOB.roundstart_races)) chosen_species = pref_species.type diff --git a/code/modules/clothing/outfits/ert.dm b/code/modules/clothing/outfits/ert.dm index 88cc7123fd..1532f50808 100644 --- a/code/modules/clothing/outfits/ert.dm +++ b/code/modules/clothing/outfits/ert.dm @@ -6,7 +6,7 @@ gloves = /obj/item/clothing/gloves/combat ears = /obj/item/radio/headset/headset_cent/alt -/datum/outfit/ert/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/ert/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) if(visualsOnly) return @@ -35,7 +35,7 @@ /obj/item/gun/energy/e_gun=1) l_pocket = /obj/item/switchblade -/datum/outfit/ert/commander/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/ert/commander/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) ..() if(visualsOnly) @@ -46,7 +46,7 @@ /datum/outfit/ert/commander/alert name = "ERT Commander - Amber Alert" - + suit = /obj/item/clothing/suit/space/hardsuit/ert/alert glasses = /obj/item/clothing/glasses/thermal/eyepatch backpack_contents = list(/obj/item/storage/box/engineer=1,\ @@ -76,7 +76,7 @@ /obj/item/gun/energy/e_gun/stun=1,\ /obj/item/melee/baton/loaded=1) -/datum/outfit/ert/security/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/ert/security/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) ..() if(visualsOnly) @@ -88,7 +88,7 @@ /datum/outfit/ert/security/alert name = "ERT Security - Amber Alert" - + suit = /obj/item/clothing/suit/space/hardsuit/ert/alert/sec backpack_contents = list(/obj/item/storage/box/engineer=1,\ /obj/item/storage/box/handcuffs=1,\ @@ -120,7 +120,7 @@ /obj/item/reagent_containers/hypospray/combat=1,\ /obj/item/gun/medbeam=1) -/datum/outfit/ert/medic/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/ert/medic/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) ..() if(visualsOnly) @@ -166,7 +166,7 @@ /obj/item/gun/energy/e_gun=1,\ /obj/item/construction/rcd/loaded=1) -/datum/outfit/ert/engineer/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/ert/engineer/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) ..() if(visualsOnly) @@ -214,7 +214,7 @@ l_hand = /obj/item/storage/toolbox/plastitanium gloves = /obj/item/clothing/gloves/color/yellow -/datum/outfit/ert/greybois/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/ert/greybois/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) if(visualsOnly) return var/obj/item/card/id/W = H.wear_id @@ -238,7 +238,7 @@ l_hand = /obj/item/clipboard id = /obj/item/card/id -/datum/outfit/centcom_official/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/centcom_official/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) if(visualsOnly) return @@ -288,7 +288,7 @@ /obj/item/reagent_containers/hypospray/combat/heresypurge=1, /obj/item/gun/medbeam=1) -/datum/outfit/ert/chaplain/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/ert/chaplain/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) ..() if(visualsOnly) diff --git a/code/modules/clothing/outfits/event.dm b/code/modules/clothing/outfits/event.dm index 347fc5c2d7..0ca2a11c50 100644 --- a/code/modules/clothing/outfits/event.dm +++ b/code/modules/clothing/outfits/event.dm @@ -12,7 +12,7 @@ belt = /obj/item/tank/internals/emergency_oxygen/double id = /obj/item/card/id/gold -/datum/outfit/santa/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/santa/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) if(visualsOnly) return H.fully_replace_character_name(H.real_name, "Santa Claus") diff --git a/code/modules/clothing/outfits/standard.dm b/code/modules/clothing/outfits/standard.dm index 6c961dc250..29fd06dcaf 100644 --- a/code/modules/clothing/outfits/standard.dm +++ b/code/modules/clothing/outfits/standard.dm @@ -48,7 +48,7 @@ l_pocket = /obj/item/grenade/chem_grenade/cleaner backpack_contents = list(/obj/item/stack/tile/plasteel=6) -/datum/outfit/tournament/janitor/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/tournament/janitor/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) if(visualsOnly) return @@ -97,7 +97,7 @@ /datum/outfit/pirate/space/captain head = /obj/item/clothing/head/helmet/space/pirate -/datum/outfit/pirate/post_equip(mob/living/carbon/human/H) +/datum/outfit/pirate/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) H.faction |= "pirate" var/obj/item/radio/R = H.ears @@ -125,7 +125,7 @@ id = /obj/item/card/id r_hand = /obj/item/twohanded/fireaxe -/datum/outfit/tunnel_clown/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/tunnel_clown/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) if(visualsOnly) return @@ -150,7 +150,7 @@ r_pocket = /obj/item/scalpel r_hand = /obj/item/twohanded/fireaxe -/datum/outfit/psycho/post_equip(mob/living/carbon/human/H) +/datum/outfit/psycho/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) for(var/obj/item/carried_item in H.get_equipped_items(TRUE)) carried_item.add_mob_blood(H)//Oh yes, there will be blood... for(var/obj/item/I in H.held_items) @@ -170,7 +170,7 @@ id = /obj/item/card/id/syndicate belt = /obj/item/pda/heads -/datum/outfit/assassin/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/assassin/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) var/obj/item/clothing/under/U = H.w_uniform U.attach_accessory(new /obj/item/clothing/accessory/waistcoat(H)) @@ -216,7 +216,7 @@ back = /obj/item/storage/backpack/satchel/leather id = /obj/item/card/id -/datum/outfit/centcom_commander/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/centcom_commander/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) if(visualsOnly) return @@ -244,7 +244,7 @@ back = /obj/item/storage/backpack/satchel/leather id = /obj/item/card/id -/datum/outfit/spec_ops/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/spec_ops/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) if(visualsOnly) return @@ -283,7 +283,7 @@ back = /obj/item/storage/backpack backpack_contents = list(/obj/item/storage/box=1) -/datum/outfit/wizard/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/wizard/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) if(visualsOnly) return @@ -325,7 +325,7 @@ id = /obj/item/card/id -/datum/outfit/soviet/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/soviet/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) if(visualsOnly) return @@ -349,7 +349,7 @@ r_hand = /obj/item/gun/ballistic/automatic/tommygun id = /obj/item/card/id -/datum/outfit/mobster/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/mobster/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) if(visualsOnly) return @@ -391,7 +391,7 @@ /obj/item/flashlight=1,\ /obj/item/grenade/plastic/x4=1) -/datum/outfit/death_commando/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/death_commando/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) if(visualsOnly) return diff --git a/code/modules/clothing/outfits/vr.dm b/code/modules/clothing/outfits/vr.dm index cd8115ac7d..ee350e3891 100644 --- a/code/modules/clothing/outfits/vr.dm +++ b/code/modules/clothing/outfits/vr.dm @@ -5,10 +5,10 @@ ears = /obj/item/radio/headset id = /obj/item/card/id -/datum/outfit/vr/pre_equip(mob/living/carbon/human/H) +/datum/outfit/vr/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) H.dna.species.before_equip_job(null, H) -/datum/outfit/vr/post_equip(mob/living/carbon/human/H) +/datum/outfit/vr/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) var/obj/item/card/id/id = H.wear_id if (istype(id)) id.access |= get_all_accesses() @@ -25,9 +25,10 @@ backpack_contents = list(/obj/item/storage/box/syndie=1,\ /obj/item/kitchen/knife/combat/survival) -/datum/outfit/vr/syndicate/post_equip(mob/living/carbon/human/H) +/datum/outfit/vr/syndicate/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) . = ..() - var/obj/item/uplink/U = new /obj/item/uplink/nuclear_restricted(H, H.key, 80) + var/key = H.key ? H.key : preference_source ? preference_source.key : null + var/obj/item/uplink/U = new /obj/item/uplink/nuclear_restricted(H, key, 80) H.equip_to_slot_or_del(U, SLOT_IN_BACKPACK) var/obj/item/implant/weapons_auth/W = new W.implant(H) diff --git a/code/modules/clothing/outfits/vv_outfit.dm b/code/modules/clothing/outfits/vv_outfit.dm index 103a152ec8..0bc8c87a45 100644 --- a/code/modules/clothing/outfits/vv_outfit.dm +++ b/code/modules/clothing/outfits/vv_outfit.dm @@ -4,7 +4,7 @@ var/list/vv_values var/list/stored_access -/datum/outfit/varedit/pre_equip(mob/living/carbon/human/H, visualsOnly) +/datum/outfit/varedit/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) H.delete_equipment() //Applying VV to wrong objects is not reccomended. . = ..() @@ -120,7 +120,7 @@ GLOB.custom_outfits += O to_chat(usr,"Outfit registered, use select equipment to equip it.") -/datum/outfit/varedit/post_equip(mob/living/carbon/human/H, visualsOnly) +/datum/outfit/varedit/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) . = ..() //Apply VV for(var/slot in vv_values) diff --git a/code/modules/jobs/job_types/_job.dm b/code/modules/jobs/job_types/_job.dm index 2eeffa8b7a..a5eda4eb44 100644 --- a/code/modules/jobs/job_types/_job.dm +++ b/code/modules/jobs/job_types/_job.dm @@ -98,8 +98,9 @@ //Equip the rest of the gear H.dna.species.before_equip_job(src, H, visualsOnly) - if(outfit_override || outfit) - H.equipOutfit(outfit_override ? outfit_override : outfit, visualsOnly) + var/datum/outfit/job/O = outfit_override || outfit + if(O) + H.equipOutfit(O, visualsOnly, preference_source) //mob doesn't have a client yet. H.dna.species.after_equip_job(src, H, visualsOnly) @@ -174,8 +175,8 @@ var/pda_slot = SLOT_BELT -/datum/outfit/job/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE) - switch(H.backbag) +/datum/outfit/job/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) + switch(preference_source?.prefs.backbag) if(GBACKPACK) back = /obj/item/storage/backpack //Grey backpack if(GSATCHEL) @@ -193,7 +194,7 @@ //converts the uniform string into the path we'll wear, whether it's the skirt or regular variant var/holder - if(H.jumpsuit_style == PREF_SKIRT) + if(preference_source && preference_source.prefs.jumpsuit_style == PREF_SKIRT) holder = "[uniform]/skirt" if(!text2path(holder)) holder = "[uniform]" @@ -201,7 +202,7 @@ holder = "[uniform]" uniform = text2path(holder) -/datum/outfit/job/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/job/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) if(visualsOnly) return @@ -229,6 +230,8 @@ PDA.owner = H.real_name PDA.ownjob = J.title PDA.update_label() + if(preference_source && !PDA.equipped) //PDA's screen color, font style and look depend on client preferences. + PDA.update_style(preference_source) /datum/outfit/job/get_chameleon_disguise_info() var/list/types = ..() diff --git a/code/modules/jobs/job_types/assistant.dm b/code/modules/jobs/job_types/assistant.dm index c04560f849..3d356e6824 100644 --- a/code/modules/jobs/job_types/assistant.dm +++ b/code/modules/jobs/job_types/assistant.dm @@ -27,15 +27,16 @@ Assistant name = "Assistant" jobtype = /datum/job/assistant -/datum/outfit/job/assistant/pre_equip(mob/living/carbon/human/H) +/datum/outfit/job/assistant/pre_equip(mob/living/carbon/human/H, client/preference_source) ..() + var/suited = !preference_source || preference_source.prefs.jumpsuit_style == PREF_SUIT if (CONFIG_GET(flag/grey_assistants)) - if(H.jumpsuit_style == PREF_SUIT) + if(suited) uniform = /obj/item/clothing/under/color/grey else uniform = /obj/item/clothing/under/skirt/color/grey else - if(H.jumpsuit_style == PREF_SUIT) + if(suited) uniform = /obj/item/clothing/under/color/random else uniform = /obj/item/clothing/under/skirt/color/random diff --git a/code/modules/jobs/job_types/clown.dm b/code/modules/jobs/job_types/clown.dm index d8b88ae871..2b5fc1a4fc 100644 --- a/code/modules/jobs/job_types/clown.dm +++ b/code/modules/jobs/job_types/clown.dm @@ -16,11 +16,6 @@ display_order = JOB_DISPLAY_ORDER_CLOWN - -/datum/job/clown/after_spawn(mob/living/carbon/human/H, mob/M) - . = ..() - H.apply_pref_name("clown", M.client) - /datum/outfit/job/clown name = "Clown" jobtype = /datum/job/clown @@ -48,11 +43,14 @@ chameleon_extras = /obj/item/stamp/clown -/datum/outfit/job/clown/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/job/clown/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) ..() if(visualsOnly) return - H.fully_replace_character_name(H.real_name, pick(GLOB.clown_names)) //rename the mob AFTER they're equipped so their ID gets updated properly. + if(!preference_source) + H.apply_pref_name("clown", preference_source) //rename the mob AFTER they're equipped so their ID gets updated properly. + else + H.fully_replace_character_name(H.real_name, pick(GLOB.clown_names)) H.dna.add_mutation(CLOWNMUT) H.dna.add_mutation(SMILE) diff --git a/code/modules/jobs/job_types/cook.dm b/code/modules/jobs/job_types/cook.dm index c213d4dffc..b5def54061 100644 --- a/code/modules/jobs/job_types/cook.dm +++ b/code/modules/jobs/job_types/cook.dm @@ -29,7 +29,7 @@ mask = /obj/item/clothing/mask/fakemoustache/italian backpack_contents = list(/obj/item/sharpener = 1) -/datum/outfit/job/cook/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/job/cook/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) ..() var/datum/job/cook/J = SSjob.GetJobType(jobtype) if(J) // Fix for runtime caused by invalid job being passed @@ -39,7 +39,7 @@ if(!visualsOnly) J.cooks++ -/datum/outfit/job/cook/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/job/cook/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) ..() if(visualsOnly) return diff --git a/code/modules/jobs/job_types/curator.dm b/code/modules/jobs/job_types/curator.dm index 35fa8483d5..0c762637ac 100644 --- a/code/modules/jobs/job_types/curator.dm +++ b/code/modules/jobs/job_types/curator.dm @@ -34,7 +34,7 @@ /obj/item/barcodescanner = 1 ) -/datum/outfit/job/curator/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/job/curator/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) ..() if(visualsOnly) diff --git a/code/modules/jobs/job_types/detective.dm b/code/modules/jobs/job_types/detective.dm index 27a54fbd1f..13cb5e01e3 100644 --- a/code/modules/jobs/job_types/detective.dm +++ b/code/modules/jobs/job_types/detective.dm @@ -46,7 +46,7 @@ chameleon_extras = list(/obj/item/gun/ballistic/revolver/detective, /obj/item/clothing/glasses/sunglasses) -/datum/outfit/job/detective/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/job/detective/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) ..() var/obj/item/clothing/mask/cigarette/cig = H.wear_mask if(istype(cig)) //Some species specfic changes can mess this up (plasmamen) diff --git a/code/modules/jobs/job_types/lawyer.dm b/code/modules/jobs/job_types/lawyer.dm index 0b8be52116..654af6a05d 100644 --- a/code/modules/jobs/job_types/lawyer.dm +++ b/code/modules/jobs/job_types/lawyer.dm @@ -35,7 +35,7 @@ chameleon_extras = /obj/item/stamp/law -/datum/outfit/job/lawyer/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/job/lawyer/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) ..() if(visualsOnly) return diff --git a/code/modules/jobs/job_types/mime.dm b/code/modules/jobs/job_types/mime.dm index 1347da7125..cd8d0b0321 100644 --- a/code/modules/jobs/job_types/mime.dm +++ b/code/modules/jobs/job_types/mime.dm @@ -36,7 +36,7 @@ satchel = /obj/item/storage/backpack/mime -/datum/outfit/job/mime/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/job/mime/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) ..() if(visualsOnly) @@ -47,3 +47,8 @@ H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/mime/speak(null)) H.mind.miming = 1 + if(preference_source) + H.apply_pref_name("mime", preference_source) + else + H.fully_replace_character_name(H.real_name, pick(GLOB.mime_names)) + diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index e32d073500..9b88581d01 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -32,8 +32,6 @@ var/shirt_color = "FFFFFF" var/socks = "Nude" //Which socks the player wants var/socks_color = "FFFFFF" - var/backbag = DBACKPACK //Which backpack type the player has chosen. - var/jumpsuit_style = PREF_SUIT //suit/skirt //Equipment slots var/obj/item/wear_suit = null diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index d35df6b789..2337820e5a 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -249,7 +249,7 @@ sec_hud_set_security_status() ..() -/mob/living/carbon/human/proc/equipOutfit(outfit, visualsOnly = FALSE) +/mob/living/carbon/human/proc/equipOutfit(outfit, visualsOnly = FALSE, client/preference_source) var/datum/outfit/O = null if(ispath(outfit)) @@ -261,7 +261,7 @@ if(!O) return 0 - return O.equip(src, visualsOnly) + return O.equip(src, visualsOnly, preference_source) //delete all equipment without dropping anything diff --git a/code/modules/ninja/outfit.dm b/code/modules/ninja/outfit.dm index ad63f55b90..7ee71db1f1 100644 --- a/code/modules/ninja/outfit.dm +++ b/code/modules/ninja/outfit.dm @@ -16,7 +16,7 @@ implants = list(/obj/item/implant/explosive) -/datum/outfit/ninja/post_equip(mob/living/carbon/human/H) +/datum/outfit/ninja/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) if(istype(H.wear_suit, suit)) var/obj/item/clothing/suit/space/space_ninja/S = H.wear_suit if(istype(H.belt, belt)) diff --git a/code/modules/ruins/lavaland_ruin_code.dm b/code/modules/ruins/lavaland_ruin_code.dm index 92a637ce43..d12195cc52 100644 --- a/code/modules/ruins/lavaland_ruin_code.dm +++ b/code/modules/ruins/lavaland_ruin_code.dm @@ -135,7 +135,7 @@ id = /obj/item/card/id/syndicate/anyone implants = list(/obj/item/implant/weapons_auth) -/datum/outfit/lavaland_syndicate/post_equip(mob/living/carbon/human/H) +/datum/outfit/lavaland_syndicate/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) H.faction |= ROLE_SYNDICATE /obj/effect/mob_spawn/human/lavaland_syndicate/comms From 9981eb916a6cddaf85eeaa5cb54d7aa4576a60a4 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Fri, 18 Oct 2019 18:16:11 +0200 Subject: [PATCH 2/4] clowns. --- code/modules/jobs/job_types/clown.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/jobs/job_types/clown.dm b/code/modules/jobs/job_types/clown.dm index 2b5fc1a4fc..922b335a39 100644 --- a/code/modules/jobs/job_types/clown.dm +++ b/code/modules/jobs/job_types/clown.dm @@ -48,8 +48,9 @@ if(visualsOnly) return - if(!preference_source) - H.apply_pref_name("clown", preference_source) //rename the mob AFTER they're equipped so their ID gets updated properly. + var/client/C = H.client || preference_source + if(C) + H.apply_pref_name("clown", C) //rename the mob AFTER they're equipped so their ID gets updated properly. else H.fully_replace_character_name(H.real_name, pick(GLOB.clown_names)) H.dna.add_mutation(CLOWNMUT) From 17191c5e220daddc64b88a881bbf25d3fce4d49b Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Fri, 18 Oct 2019 18:23:27 +0200 Subject: [PATCH 3/4] mimes. --- code/modules/jobs/job_types/mime.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/jobs/job_types/mime.dm b/code/modules/jobs/job_types/mime.dm index cd8d0b0321..4e6e982fb9 100644 --- a/code/modules/jobs/job_types/mime.dm +++ b/code/modules/jobs/job_types/mime.dm @@ -47,8 +47,9 @@ H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/mime/speak(null)) H.mind.miming = 1 - if(preference_source) - H.apply_pref_name("mime", preference_source) + var/client/C = H.client || preference_source + if(C) + H.apply_pref_name("mime", C) else H.fully_replace_character_name(H.real_name, pick(GLOB.mime_names)) From ad0e8ec4be4610ae59e3520ea4379a9ad89e1bfe Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Sat, 2 Nov 2019 13:41:20 +0100 Subject: [PATCH 4/4] Yea, all good now. --- code/modules/jobs/job_types/assistant.dm | 2 +- code/modules/jobs/job_types/shaft_miner.dm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/jobs/job_types/assistant.dm b/code/modules/jobs/job_types/assistant.dm index c1b6afb88b..ce2dce9053 100644 --- a/code/modules/jobs/job_types/assistant.dm +++ b/code/modules/jobs/job_types/assistant.dm @@ -28,7 +28,7 @@ Assistant name = "Assistant" jobtype = /datum/job/assistant -/datum/outfit/job/assistant/pre_equip(mob/living/carbon/human/H, client/preference_source) +/datum/outfit/job/assistant/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) ..() var/suited = !preference_source || preference_source.prefs.jumpsuit_style == PREF_SUIT if (CONFIG_GET(flag/grey_assistants)) diff --git a/code/modules/jobs/job_types/shaft_miner.dm b/code/modules/jobs/job_types/shaft_miner.dm index 771fc02862..915e9d1cea 100644 --- a/code/modules/jobs/job_types/shaft_miner.dm +++ b/code/modules/jobs/job_types/shaft_miner.dm @@ -64,7 +64,7 @@ /obj/item/gun/energy/kinetic_accelerator=1,\ /obj/item/stack/marker_beacon/ten=1) -/datum/outfit/job/miner/equipped/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) +/datum/outfit/job/miner/equipped/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source) ..() if(visualsOnly) return