diff --git a/code/__DEFINES/wj_emotes.dm b/code/__DEFINES/emote_panels.dm similarity index 70% rename from code/__DEFINES/wj_emotes.dm rename to code/__DEFINES/emote_panels.dm index f315c6eb2ba5..59959818da74 100644 --- a/code/__DEFINES/wj_emotes.dm +++ b/code/__DEFINES/emote_panels.dm @@ -6,3 +6,7 @@ #define JOE_EMOTE_CATEGORY_WARNING "Warning" #define JOE_EMOTE_CATEGORY_QUESTION "Question" #define JOE_EMOTE_CATEGORY_NOTICE "Notice" + +#define YAUTJA_EMOTE_CATEGORY_FAKESOUND "Fake Sound" +#define YAUTJA_EMOTE_CATEGORY_VOICE "Voice Synthesizer" +#define YAUTJA_EMOTE_CATEGORY_SPECIES "Yautja" diff --git a/code/modules/mob/living/carbon/human/species/emote-yautja.dm b/code/modules/mob/living/carbon/human/species/emote-yautja.dm deleted file mode 100644 index 8c959329c953..000000000000 --- a/code/modules/mob/living/carbon/human/species/emote-yautja.dm +++ /dev/null @@ -1,145 +0,0 @@ -/datum/emote/living/carbon/human/yautja - species_type_allowed_typecache = list(/datum/species/yautja) - keybind_category = CATEGORY_YAUTJA_EMOTE - -/datum/emote/living/carbon/human/yautja/anytime - key = "anytime" - sound = 'sound/voice/pred_anytime.ogg' - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/carbon/human/yautja/click - key = "click" - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/carbon/human/yautja/click/get_sound(mob/living/user) - if(rand(0,100) < 50) - return 'sound/voice/pred_click1.ogg' - else - return 'sound/voice/pred_click2.ogg' - -/datum/emote/living/carbon/human/yautja/helpme - key = "helpme" - sound = 'sound/voice/pred_helpme.ogg' - volume = 25 - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/carbon/human/yautja/malescream - key = "malescream" - emote_type = EMOTE_AUDIBLE - sound = "male_scream" - -/datum/emote/living/carbon/human/yautja/femalescream - key = "femalescream" - emote_type = EMOTE_AUDIBLE - sound = "female_scream" - -/datum/emote/living/carbon/human/yautja/iseeyou - key = "iseeyou" - sound = 'sound/hallucinations/i_see_you2.ogg' - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/carbon/human/yautja/itsatrap - key = "itsatrap" - sound = 'sound/voice/pred_itsatrap.ogg' - volume = 25 - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/carbon/human/yautja/laugh1 - key = "laugh1" - sound = 'sound/voice/pred_laugh1.ogg' - volume = 25 - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/carbon/human/yautja/laugh2 - key = "laugh2" - sound = 'sound/voice/pred_laugh2.ogg' - volume = 25 - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/carbon/human/yautja/laugh3 - key = "laugh3" - sound = 'sound/voice/pred_laugh3.ogg' - volume = 25 - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/carbon/human/yautja/overhere - key = "overhere" - sound = 'sound/voice/pred_overhere.ogg' - volume = 25 - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/carbon/human/yautja/roar - key = "roar" - message = "roars!" - emote_type = EMOTE_AUDIBLE|EMOTE_VISIBLE - -/datum/emote/living/carbon/human/yautja/roar/get_sound(mob/living/user) - return pick('sound/voice/pred_roar1.ogg', 'sound/voice/pred_roar2.ogg') - -/datum/emote/living/carbon/human/yautja/roar2 - key = "roar2" - sound = 'sound/voice/pred_roar3.ogg' - message = "roars!" - emote_type = EMOTE_AUDIBLE|EMOTE_VISIBLE - -/datum/emote/living/carbon/human/yautja/loudroar - key = "loudroar" - message = "roars loudly!" - volume = 60 - cooldown = 120 SECONDS - emote_type = EMOTE_AUDIBLE|EMOTE_VISIBLE - -/datum/emote/living/carbon/human/yautja/loudroar/get_sound(mob/living/user) - return pick('sound/voice/pred_roar4.ogg', 'sound/voice/pred_roar5.ogg') - -/datum/emote/living/carbon/human/yautja/loudroar/run_emote(mob/user, params, type_override, intentional) - . = ..() - if(!.) - return - - for(var/mob/current_mob as anything in get_mobs_in_z_level_range(get_turf(user), 18) - user) - var/relative_dir = get_dir(current_mob, user) - var/final_dir = dir2text(relative_dir) - to_chat(current_mob, SPAN_HIGHDANGER("You hear a loud roar coming from [final_dir ? "the [final_dir]" : "nearby"]!")) - -/datum/emote/living/carbon/human/yautja/turnaround - key = "turnaround" - sound = 'sound/voice/pred_turnaround.ogg' - volume = 25 - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/carbon/human/yautja/click2 - key = "click2" - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/carbon/human/yautja/click2/get_sound(mob/living/user) - return pick('sound/voice/pred_click3.ogg', 'sound/voice/pred_click4.ogg') - -/datum/emote/living/carbon/human/yautja/aliengrowl - key = "aliengrowl" - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/carbon/human/yautja/aliengrowl/get_sound(mob/living/user) - return pick('sound/voice/alien_growl1.ogg', 'sound/voice/alien_growl2.ogg') - -/datum/emote/living/carbon/human/yautja/alienhelp - key = "alienhelp" - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/carbon/human/yautja/alienhelp/get_sound(mob/living/user) - return pick('sound/voice/alien_help1.ogg', 'sound/voice/alien_help2.ogg') - -/datum/emote/living/carbon/human/yautja/comeonout - key = "comeonout" - sound = 'sound/voice/pred_come_on_out.ogg' - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/carbon/human/yautja/overthere - key = "overthere" - sound = 'sound/voice/pred_over_there.ogg' - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/carbon/human/yautja/uglyfreak - key = "uglyfreak" - sound = 'sound/voice/pred_ugly_freak.ogg' - emote_type = EMOTE_AUDIBLE diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index a6d0355bfbe5..b6eeb68e95d3 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -123,6 +123,10 @@ /datum/species/proc/larva_impregnated(obj/item/alien_embryo/embryo) return +/// Override to add an emote panel to a species +/datum/species/proc/open_emote_panel() + return + /datum/species/proc/handle_npc(mob/living/carbon/human/H) set waitfor = FALSE return diff --git a/code/modules/mob/living/carbon/human/species/working_joe/_emote.dm b/code/modules/mob/living/carbon/human/species/working_joe/_emote.dm index 63cc79a57dae..e66fec576f64 100644 --- a/code/modules/mob/living/carbon/human/species/working_joe/_emote.dm +++ b/code/modules/mob/living/carbon/human/species/working_joe/_emote.dm @@ -2,7 +2,7 @@ species_type_allowed_typecache = list(/datum/species/synthetic/colonial/working_joe) keybind_category = CATEGORY_SYNTH_EMOTE volume = 75 - /// A general category for the emote, for use in the WJ emote panel. See [code/__DEFINES/wj_emotes.dm] for categories. + /// A general category for the emote, for use in the WJ emote panel. See [code/__DEFINES/emote_panels.dm] for categories. var/category = "" /// Override text for the emote to be displayed in the WJ emote panel var/override_say = "" diff --git a/code/modules/mob/living/carbon/human/species/working_joe/_species.dm b/code/modules/mob/living/carbon/human/species/working_joe/_species.dm index b9044becb6f5..139b339fbfd7 100644 --- a/code/modules/mob/living/carbon/human/species/working_joe/_species.dm +++ b/code/modules/mob/living/carbon/human/species/working_joe/_species.dm @@ -22,7 +22,7 @@ return ..() /// Open the WJ's emote panel, which allows them to use voicelines -/datum/species/synthetic/colonial/working_joe/proc/open_emote_panel() +/datum/species/synthetic/colonial/working_joe/open_emote_panel() var/datum/joe_emote_panel/ui = new(usr) ui.ui_interact(usr) diff --git a/code/modules/mob/living/carbon/human/species/yautja/_emote.dm b/code/modules/mob/living/carbon/human/species/yautja/_emote.dm new file mode 100644 index 000000000000..0202eece1620 --- /dev/null +++ b/code/modules/mob/living/carbon/human/species/yautja/_emote.dm @@ -0,0 +1,10 @@ +/datum/emote/living/carbon/human/yautja + species_type_allowed_typecache = list(/datum/species/yautja) + keybind_category = CATEGORY_YAUTJA_EMOTE + emote_type = EMOTE_AUDIBLE + /// A general category for the emote, for use in the Yautja emote panel. See [code/__DEFINES/emote_panels.dm] for categories. + var/category = "" + /// Override text for the emote to be displayed in the Yautja emote panel + var/override_say = "" + /// Override for being in panel or not + var/no_panel = FALSE diff --git a/code/modules/mob/living/carbon/human/species/yautja.dm b/code/modules/mob/living/carbon/human/species/yautja/_species.dm similarity index 68% rename from code/modules/mob/living/carbon/human/species/yautja.dm rename to code/modules/mob/living/carbon/human/species/yautja/_species.dm index a4c87b5da4e1..8e8849f5ad4c 100644 --- a/code/modules/mob/living/carbon/human/species/yautja.dm +++ b/code/modules/mob/living/carbon/human/species/yautja/_species.dm @@ -180,16 +180,16 @@ limb.max_damage = 35 limb.time_to_knit = -1 -/datum/species/yautja/handle_post_spawn(mob/living/carbon/human/H) - GLOB.alive_human_list -= H - H.universal_understand = 1 +/datum/species/yautja/handle_post_spawn(mob/living/carbon/human/hunter) + GLOB.alive_human_list -= hunter + hunter.universal_understand = 1 - H.blood_type = "Y*" - H.h_style = "Standard" + hunter.blood_type = "Y*" + hunter.h_style = "Standard" #ifndef UNIT_TESTS // Since this is a hard ref, we shouldn't confuse create_and_destroy - GLOB.yautja_mob_list += H + GLOB.yautja_mob_list += hunter #endif - for(var/obj/limb/limb in H.limbs) + for(var/obj/limb/limb in hunter.limbs) switch(limb.name) if("groin","chest") limb.min_broken_damage = 145 @@ -208,7 +208,8 @@ limb.max_damage = 150 limb.time_to_knit = 600 // 1 minute to self heal bone break, time is in tenths of a second - H.set_languages(list(LANGUAGE_YAUTJA)) + hunter.set_languages(list(LANGUAGE_YAUTJA)) + give_action(hunter, /datum/action/yautja_emote_panel) return ..() /datum/species/yautja/get_hairstyle(style) @@ -220,3 +221,105 @@ /datum/species/yautja/handle_paygrades() return "" + +/// Open the Yautja emote panel, which allows them to use their emotes easier. +/datum/species/yautja/open_emote_panel() + var/datum/yautja_emote_panel/ui = new(usr) + ui.ui_interact(usr) + +/datum/action/yautja_emote_panel + name = "Open Emote Panel" + action_icon_state = "looc_toggle" + +/datum/action/yautja_emote_panel/can_use_action() + . = ..() + if(!.) + return FALSE + + if(!isyautja(owner)) + return FALSE + + return TRUE + +/datum/action/yautja_emote_panel/action_activate() + if(!can_use_action()) + return + + var/mob/living/carbon/human/human_owner = owner + var/datum/species/yautja/yautja_species = human_owner.species + yautja_species.open_emote_panel() + +/datum/yautja_emote_panel + /// Static dict ("category" : (emotes)) of every yautja emote typepath + var/static/list/yautja_emotes + /// Static list of categories + var/static/list/yautja_categories = list() + /// Panel allows you to spam, so a manual CD is added here + COOLDOWN_DECLARE(panel_emote_cooldown) + +/datum/yautja_emote_panel/New() + if(!length(yautja_emotes)) + var/list/emotes_to_add = list() + for(var/datum/emote/living/carbon/human/yautja/emote as anything in subtypesof(/datum/emote/living/carbon/human/yautja)) + if(!initial(emote.key) || initial(emote.no_panel)) + continue + + if(!(initial(emote.category) in yautja_categories)) + yautja_categories += initial(emote.category) + emotes_to_add += emote + yautja_emotes = emotes_to_add + +/datum/yautja_emote_panel/proc/ui_interact(mob/user, datum/tgui/ui) + ui = SStgui.try_update_ui(user, src, ui) + if(!ui) + ui = new(user, src, "YautjaEmotes") + ui.open() + +/datum/yautja_emote_panel/ui_data(mob/user) + var/list/data = list() + + data["on_cooldown"] = !COOLDOWN_FINISHED(src, panel_emote_cooldown) + + return data + +/datum/yautja_emote_panel/ui_state(mob/user) + return GLOB.conscious_state + +/datum/yautja_emote_panel/ui_static_data(mob/user) + var/list/data = list() + + data["categories"] = yautja_categories + data["emotes"] = list() + + for(var/datum/emote/living/carbon/human/yautja/emote as anything in yautja_emotes) + data["emotes"] += list(list( + "id" = initial(emote.key), + "text" = (initial(emote.override_say) || initial(emote.say_message) || initial(emote.key)), + "category" = initial(emote.category), + "path" = "[emote]", + )) + + return data + +/datum/yautja_emote_panel/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) + . = ..() + if(.) + return + + switch(action) + if("emote") + var/datum/emote/living/carbon/human/yautja/path + if(!params["emotePath"]) + return FALSE + + path = text2path(params["emotePath"]) + + if(!path || !COOLDOWN_FINISHED(src, panel_emote_cooldown)) + return + + if(!(path in subtypesof(/datum/emote/living/carbon/human/yautja))) + return FALSE + + COOLDOWN_START(src, panel_emote_cooldown, 2.5 SECONDS) + usr.emote(initial(path.key)) + return TRUE diff --git a/code/modules/mob/living/carbon/human/species/yautja/fake_sounds.dm b/code/modules/mob/living/carbon/human/species/yautja/fake_sounds.dm new file mode 100644 index 000000000000..f29a990b6254 --- /dev/null +++ b/code/modules/mob/living/carbon/human/species/yautja/fake_sounds.dm @@ -0,0 +1,22 @@ +/datum/emote/living/carbon/human/yautja/fake_sound + category = YAUTJA_EMOTE_CATEGORY_FAKESOUND + +/datum/emote/living/carbon/human/yautja/fake_sound/aliengrowl + key = "aliengrowl" + +/datum/emote/living/carbon/human/yautja/fake_sound/aliengrowl/get_sound(mob/living/user) + return pick('sound/voice/alien_growl1.ogg', 'sound/voice/alien_growl2.ogg') + +/datum/emote/living/carbon/human/yautja/fake_sound/alienhelp + key = "alienhelp" + +/datum/emote/living/carbon/human/yautja/fake_sound/alienhelp/get_sound(mob/living/user) + return pick('sound/voice/alien_help1.ogg', 'sound/voice/alien_help2.ogg') + +/datum/emote/living/carbon/human/yautja/fake_sound/malescream + key = "malescream" + sound = "male_scream" + +/datum/emote/living/carbon/human/yautja/fake_sound/femalescream + key = "femalescream" + sound = "female_scream" diff --git a/code/modules/mob/living/carbon/human/species/yautja/fake_voice.dm b/code/modules/mob/living/carbon/human/species/yautja/fake_voice.dm new file mode 100644 index 000000000000..409fa83e7f1b --- /dev/null +++ b/code/modules/mob/living/carbon/human/species/yautja/fake_voice.dm @@ -0,0 +1,50 @@ +/datum/emote/living/carbon/human/yautja/voice + category = YAUTJA_EMOTE_CATEGORY_VOICE + +/datum/emote/living/carbon/human/yautja/voice/anytime + key = "anytime" + sound = 'sound/voice/pred_anytime.ogg' + + +/datum/emote/living/carbon/human/yautja/voice/helpme + key = "helpme" + sound = 'sound/voice/pred_helpme.ogg' + volume = 25 + + +/datum/emote/living/carbon/human/yautja/voice/iseeyou + key = "iseeyou" + sound = 'sound/hallucinations/i_see_you2.ogg' + + +/datum/emote/living/carbon/human/yautja/voice/itsatrap + key = "itsatrap" + sound = 'sound/voice/pred_itsatrap.ogg' + volume = 25 + + +/datum/emote/living/carbon/human/yautja/voice/overhere + key = "overhere" + sound = 'sound/voice/pred_overhere.ogg' + volume = 25 + + +/datum/emote/living/carbon/human/yautja/voice/turnaround + key = "turnaround" + sound = 'sound/voice/pred_turnaround.ogg' + volume = 25 + + +/datum/emote/living/carbon/human/yautja/voice/comeonout + key = "comeonout" + sound = 'sound/voice/pred_come_on_out.ogg' + + +/datum/emote/living/carbon/human/yautja/voice/overthere + key = "overthere" + sound = 'sound/voice/pred_over_there.ogg' + + +/datum/emote/living/carbon/human/yautja/voice/uglyfreak + key = "uglyfreak" + sound = 'sound/voice/pred_ugly_freak.ogg' diff --git a/code/modules/mob/living/carbon/human/species/yautja/yautja_sound.dm b/code/modules/mob/living/carbon/human/species/yautja/yautja_sound.dm new file mode 100644 index 000000000000..a6a9a659f215 --- /dev/null +++ b/code/modules/mob/living/carbon/human/species/yautja/yautja_sound.dm @@ -0,0 +1,70 @@ +/datum/emote/living/carbon/human/yautja/species_sound + category = YAUTJA_EMOTE_CATEGORY_SPECIES + +/datum/emote/living/carbon/human/yautja/species_sound/click + key = "click" + +/datum/emote/living/carbon/human/yautja/species_sound/click/get_sound(mob/living/user) + if(rand(0,100) < 50) + return 'sound/voice/pred_click1.ogg' + else + return 'sound/voice/pred_click2.ogg' + +/datum/emote/living/carbon/human/yautja/species_sound/click2 + key = "click2" + +/datum/emote/living/carbon/human/yautja/species_sound/click2/get_sound(mob/living/user) + return pick('sound/voice/pred_click3.ogg', 'sound/voice/pred_click4.ogg') + +// Laughing Emotes +/datum/emote/living/carbon/human/yautja/species_sound/laugh1 + key = "laugh1" + sound = 'sound/voice/pred_laugh1.ogg' + volume = 25 + +/datum/emote/living/carbon/human/yautja/species_sound/laugh2 + key = "laugh2" + sound = 'sound/voice/pred_laugh2.ogg' + volume = 25 + +/datum/emote/living/carbon/human/yautja/species_sound/laugh3 + key = "laugh3" + sound = 'sound/voice/pred_laugh3.ogg' + volume = 25 + + +// Roar Emotes +/datum/emote/living/carbon/human/yautja/species_sound/roar + key = "roar" + message = "roars!" + emote_type = EMOTE_AUDIBLE|EMOTE_VISIBLE + +/datum/emote/living/carbon/human/yautja/species_sound/roar/get_sound(mob/living/user) + return pick('sound/voice/pred_roar1.ogg', 'sound/voice/pred_roar2.ogg') + +/datum/emote/living/carbon/human/yautja/species_sound/roar2 + key = "roar2" + sound = 'sound/voice/pred_roar3.ogg' + message = "roars!" + emote_type = EMOTE_AUDIBLE|EMOTE_VISIBLE + +/datum/emote/living/carbon/human/yautja/species_sound/loudroar + key = "loudroar" + message = "roars loudly!" + volume = 60 + cooldown = 120 SECONDS + emote_type = EMOTE_AUDIBLE|EMOTE_VISIBLE + no_panel = TRUE + +/datum/emote/living/carbon/human/yautja/species_sound/loudroar/get_sound(mob/living/user) + return pick('sound/voice/pred_roar4.ogg', 'sound/voice/pred_roar5.ogg') + +/datum/emote/living/carbon/human/yautja/species_sound/loudroar/run_emote(mob/user, params, type_override, intentional) + . = ..() + if(!.) + return + + for(var/mob/current_mob as anything in get_mobs_in_z_level_range(get_turf(user), 18) - user) + var/relative_dir = get_dir(current_mob, user) + var/final_dir = dir2text(relative_dir) + to_chat(current_mob, SPAN_HIGHDANGER("You hear a loud roar coming from [final_dir ? "the [final_dir]" : "nearby"]!")) diff --git a/code/modules/unit_tests/_unit_tests.dm b/code/modules/unit_tests/_unit_tests.dm index 010cba770ce2..7e620b6bc1fa 100644 --- a/code/modules/unit_tests/_unit_tests.dm +++ b/code/modules/unit_tests/_unit_tests.dm @@ -85,7 +85,7 @@ #include "unit_test.dm" #include "spawn_humans.dm" #include "check_runtimes.dm" -#include "wj_emotes.dm" +#include "emote_panels.dm" #undef TEST_ASSERT #undef TEST_ASSERT_EQUAL diff --git a/code/modules/unit_tests/emote_panels.dm b/code/modules/unit_tests/emote_panels.dm new file mode 100644 index 000000000000..87bbd5e15620 --- /dev/null +++ b/code/modules/unit_tests/emote_panels.dm @@ -0,0 +1,11 @@ +/// Test that all emotes for Working Joes & Yautja have a category +/datum/unit_test/emote_panels + +/datum/unit_test/emote_panels/Run() + for(var/datum/emote/living/carbon/human/synthetic/working_joe/wj_emote as anything in subtypesof(/datum/emote/living/carbon/human/synthetic/working_joe)) + if(!initial(wj_emote.category)) + TEST_FAIL("Emote [wj_emote] did not have a category!") + + for(var/datum/emote/living/carbon/human/yautja/yautja_emote as anything in subtypesof(/datum/emote/living/carbon/human/yautja)) + if(!initial(yautja_emote.category)) + TEST_FAIL("Emote [yautja_emote] did not have a category!") diff --git a/code/modules/unit_tests/wj_emotes.dm b/code/modules/unit_tests/wj_emotes.dm deleted file mode 100644 index f89757665011..000000000000 --- a/code/modules/unit_tests/wj_emotes.dm +++ /dev/null @@ -1,7 +0,0 @@ -/// Test that all working joe emotes have a category -/datum/unit_test/wj_emotes - -/datum/unit_test/wj_emotes/Run() - 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.category)) - TEST_FAIL("Emote [emote] did not have a category!") diff --git a/colonialmarines.dme b/colonialmarines.dme index 44d7ab6db1d6..2b3b08984dfa 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -52,6 +52,7 @@ #include "code\__DEFINES\db_defs.dm" #include "code\__DEFINES\defenses.dm" #include "code\__DEFINES\dropships.dm" +#include "code\__DEFINES\emote_panels.dm" #include "code\__DEFINES\equipment.dm" #include "code\__DEFINES\events.dm" #include "code\__DEFINES\fire.dm" @@ -112,7 +113,6 @@ #include "code\__DEFINES\vv.dm" #include "code\__DEFINES\weapon_stats.dm" #include "code\__DEFINES\weather.dm" -#include "code\__DEFINES\wj_emotes.dm" #include "code\__DEFINES\xeno.dm" #include "code\__DEFINES\dcs\flags.dm" #include "code\__DEFINES\dcs\helpers.dm" @@ -1789,12 +1789,10 @@ #include "code\modules\mob\living\carbon\human\powers\human_powers.dm" #include "code\modules\mob\living\carbon\human\powers\issue_order.dm" #include "code\modules\mob\living\carbon\human\species\emote-monkey.dm" -#include "code\modules\mob\living\carbon\human\species\emote-yautja.dm" #include "code\modules\mob\living\carbon\human\species\human.dm" #include "code\modules\mob\living\carbon\human\species\monkey.dm" #include "code\modules\mob\living\carbon\human\species\species.dm" #include "code\modules\mob\living\carbon\human\species\synthetic.dm" -#include "code\modules\mob\living\carbon\human\species\yautja.dm" #include "code\modules\mob\living\carbon\human\species\zombie.dm" #include "code\modules\mob\living\carbon\human\species\working_joe\_emote.dm" #include "code\modules\mob\living\carbon\human\species\working_joe\_species.dm" @@ -1806,6 +1804,11 @@ #include "code\modules\mob\living\carbon\human\species\working_joe\restricted_area.dm" #include "code\modules\mob\living\carbon\human\species\working_joe\task_update.dm" #include "code\modules\mob\living\carbon\human\species\working_joe\warning.dm" +#include "code\modules\mob\living\carbon\human\species\yautja\_emote.dm" +#include "code\modules\mob\living\carbon\human\species\yautja\_species.dm" +#include "code\modules\mob\living\carbon\human\species\yautja\fake_sounds.dm" +#include "code\modules\mob\living\carbon\human\species\yautja\fake_voice.dm" +#include "code\modules\mob\living\carbon\human\species\yautja\yautja_sound.dm" #include "code\modules\mob\living\carbon\xenomorph\Abilities.dm" #include "code\modules\mob\living\carbon\xenomorph\attack_alien.dm" #include "code\modules\mob\living\carbon\xenomorph\damage_procs.dm" diff --git a/tgui/packages/tgui/interfaces/YautjaEmotes.tsx b/tgui/packages/tgui/interfaces/YautjaEmotes.tsx new file mode 100644 index 000000000000..d33e1cfbdf10 --- /dev/null +++ b/tgui/packages/tgui/interfaces/YautjaEmotes.tsx @@ -0,0 +1,110 @@ +import { useBackend, useLocalState } from '../backend'; +import { Box, Button, Divider, Section, Stack, Tabs } from '../components'; +import { Window } from '../layouts'; +import { BooleanLike } from '../../common/react'; + +type Emote = { + id: string; + text: string; + category: string; + path: string; +}; + +type BackendContext = { + categories: string[]; + emotes: Emote[]; + on_cooldown: BooleanLike; +}; + +const EmoteTab = (props, context) => { + const { data, act } = useBackend(context); + const { categories, emotes, on_cooldown } = data; + const [categoryIndex, setCategoryIndex] = useLocalState( + context, + 'category_index', + 'Fake Sound' + ); + const mapped_emote = emotes.filter( + (emote) => emote && emote.category === categoryIndex + ); + return ( + + + + + {categories.map((item, key) => ( + { + setCategoryIndex(item); + }}> + {item} + + ))} + + + + +
+ + + {mapped_emote.map((item) => ( + + + {' '} + + + + +
+
+
+ ); +}; + +export const YautjaEmotes = (props, context) => { + return ( + + + + + + ); +};