Skip to content

Commit

Permalink
hazard emotes
Browse files Browse the repository at this point in the history
  • Loading branch information
realforest2001 committed Jan 31, 2024
1 parent 2cb1c76 commit b202503
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 20 deletions.
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
43 changes: 24 additions & 19 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,25 +579,10 @@
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/working_joe/load_race(mob/living/carbon/human/new_human)
new_human.set_species(SYNTH_WORKING_JOE)

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

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
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 @@ -76,6 +82,21 @@

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))
wj_categories += initial(emote.category)

emotes_to_add += emote


wj_emotes = emotes_to_add


/datum/joe_emote_panel/proc/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
Expand Down

0 comments on commit b202503

Please sign in to comment.