Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hazard Joe Emote Backend #5630

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/__DEFINES/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@
#define SYNTH_COMBAT "Combat Synthetic"
#define SYNTH_INFILTRATOR "Infiltrator Synthetic"
#define SYNTH_WORKING_JOE "Working Joe"
#define SYNTH_HAZARD_JOE "Hazard Joe"
#define SYNTH_GEN_ONE "First Generation Synthetic"
#define SYNTH_GEN_TWO "Second Generation Synthetic"
#define SYNTH_GEN_THREE "Third Generation Synthetic"
Expand Down
42 changes: 21 additions & 21 deletions code/modules/gear_presets/synths.dm
Original file line number Diff line number Diff line change
Expand Up @@ -492,13 +492,32 @@
rank = JOB_WORKING_JOE
skills = /datum/skills/working_joe
languages = list(LANGUAGE_ENGLISH, LANGUAGE_APOLLO, LANGUAGE_RUSSIAN, LANGUAGE_JAPANESE, LANGUAGE_GERMAN, LANGUAGE_SPANISH, LANGUAGE_CHINESE)
var/species_type = SYNTH_WORKING_JOE

/datum/equipment_preset/synth/working_joe/New()
. = ..()
access = get_access(ACCESS_LIST_GLOBAL)

/datum/equipment_preset/synth/working_joe/load_race(mob/living/carbon/human/new_human)
new_human.set_species(SYNTH_WORKING_JOE)
. = ..()
new_human.set_species(species_type)
new_human.h_style = "Bald"
new_human.f_style = "Shaved"
if(prob(5))
new_human.grad_style = "None" //No gradients for Working Joes
new_human.h_style = "Shoulder-length Hair" //Added the chance of hair as per Monkeyfist lore accuracy
new_human.r_eyes = 0
new_human.g_eyes = 0
new_human.b_eyes = 0
new_human.r_hair = 100
new_human.g_hair = 88
new_human.b_hair = 74
new_human.r_facial = 255
new_human.g_facial = 255
new_human.b_facial = 255

/datum/equipment_preset/synth/working_joe/load_name(mob/living/carbon/human/new_human, randomise)
new_human.change_real_name(new_human, "Working Joe #[rand(100)][rand(100)]")

/datum/equipment_preset/synth/working_joe/load_vanity(mob/living/carbon/human/new_human)
return
Expand Down Expand Up @@ -531,6 +550,7 @@

/datum/equipment_preset/synth/working_joe/engi
name = "Synthetic - Hazmat Joe"
species_type = SYNTH_HAZARD_JOE

/datum/equipment_preset/synth/working_joe/engi/load_gear(mob/living/carbon/human/new_human)
var/choice = rand(1,2)
Expand Down Expand Up @@ -559,26 +579,6 @@
new_human.equip_to_slot_or_del(new /obj/item/stack/sheet/metal/large_stack(new_human.back), WEAR_IN_R_STORE)
new_human.equip_to_slot_or_del(new /obj/item/stack/sheet/glass/reinforced/large_stack(new_human.back), WEAR_IN_R_STORE)

/datum/equipment_preset/synth/working_joe/load_race(mob/living/carbon/human/new_human)
. = ..()
new_human.h_style = "Bald"
new_human.f_style = "Shaved"
if(prob(5))
new_human.grad_style = "None" //No gradients for Working Joes
new_human.h_style = "Shoulder-length Hair" //Added the chance of hair as per Monkeyfist lore accuracy
new_human.r_eyes = 0
new_human.g_eyes = 0
new_human.b_eyes = 0
new_human.r_hair = 100
new_human.g_hair = 88
new_human.b_hair = 74
new_human.r_facial = 255
new_human.g_facial = 255
new_human.b_facial = 255

/datum/equipment_preset/synth/working_joe/load_name(mob/living/carbon/human/new_human, randomise)
new_human.change_real_name(new_human, "Working Joe #[rand(100)][rand(100)]")

//*****************************************************************************************************/

/datum/equipment_preset/synth/survivor/cultist_synth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
var/category = ""
/// Override text for the emote to be displayed in the WJ emote panel
var/override_say = ""
/// Is used by Hazard Joes.
var/hazard = FALSE
Comment on lines +9 to +10
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should just be an optional voice line which is used if the emote is being used by a hazard joe, see the original feedback. no need to have two sets of emotes (and therefore keybindings) given they're the same lines

#3919 (review)

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
hair_color = "#000000"
icobase = 'icons/mob/humans/species/r_synthetic.dmi'
deform = 'icons/mob/humans/species/r_synthetic.dmi'
var/emote_panel_type = /datum/joe_emote_panel

/datum/species/synthetic/colonial/working_joe/handle_post_spawn(mob/living/carbon/human/joe)
. = ..()
Expand All @@ -21,9 +22,14 @@
playsound(dying_joe.loc, pick_weight(list('sound/voice/joe/death_normal.ogg' = 75, 'sound/voice/joe/death_silence.ogg' = 10, 'sound/voice/joe/death_tomorrow.ogg' = 10,'sound/voice/joe/death_dream.ogg' = 5)), 25, FALSE)
return ..()

/datum/species/synthetic/colonial/working_joe/hazard
name = SYNTH_HAZARD_JOE
name_plural = "Hazard Joes"
emote_panel_type = /datum/joe_emote_panel/hazard

/// Open the WJ's emote panel, which allows them to use voicelines
/datum/species/synthetic/colonial/working_joe/open_emote_panel()
var/datum/joe_emote_panel/ui = new(usr)
var/datum/joe_emote_panel/ui = new emote_panel_type(usr)
ui.ui_interact(usr)


Expand Down Expand Up @@ -65,7 +71,22 @@
if(!length(wj_emotes))
var/list/emotes_to_add = list()
for(var/datum/emote/living/carbon/human/synthetic/working_joe/emote as anything in subtypesof(/datum/emote/living/carbon/human/synthetic/working_joe))
if(!initial(emote.key) || !initial(emote.say_message))
if(initial(emote.hazard) || !initial(emote.key) || !initial(emote.say_message))
continue

if(!(initial(emote.category) in wj_categories))
wj_categories += initial(emote.category)

emotes_to_add += emote


wj_emotes = emotes_to_add

/datum/joe_emote_panel/hazard/New()
if(!length(wj_emotes))
var/list/emotes_to_add = list()
for(var/datum/emote/living/carbon/human/synthetic/working_joe/emote as anything in subtypesof(/datum/emote/living/carbon/human/synthetic/working_joe))
if(!initial(emote.hazard) || !initial(emote.key) || !initial(emote.say_message))
continue

if(!(initial(emote.category) in wj_categories))
Expand Down
Loading