diff --git a/code/__DEFINES/traits/declarations.dm b/code/__DEFINES/traits/declarations.dm index a2925ee2e5b..504e451f88c 100644 --- a/code/__DEFINES/traits/declarations.dm +++ b/code/__DEFINES/traits/declarations.dm @@ -234,6 +234,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_EXAMINE_FITNESS "reveal_power_level" /// These mobs have particularly hygienic tongues #define TRAIT_WOUND_LICKER "wound_licker" +/// Mobs with this trait are allowed to use silicon emotes +#define TRAIT_SILICON_EMOTES_ALLOWED "silicon_emotes_allowed" /// This trait designate that the mob was originally a monkey #define TRAIT_BORN_MONKEY "born_as_a_monkey" diff --git a/code/_globalvars/traits/_traits.dm b/code/_globalvars/traits/_traits.dm index d098e1c11fb..1cf3678dbd3 100644 --- a/code/_globalvars/traits/_traits.dm +++ b/code/_globalvars/traits/_traits.dm @@ -439,6 +439,7 @@ GLOBAL_LIST_INIT(traits_by_type, list( "TRAIT_SHOCKIMMUNE" = TRAIT_SHOCKIMMUNE, "TRAIT_SIGN_LANG" = TRAIT_SIGN_LANG, "TRAIT_SILENT_FOOTSTEPS" = TRAIT_SILENT_FOOTSTEPS, + "TRAIT_SILICON_EMOTES_ALLOWED" = TRAIT_SILICON_EMOTES_ALLOWED, "TRAIT_SIXTHSENSE" = TRAIT_SIXTHSENSE, "TRAIT_SKITTISH" = TRAIT_SKITTISH, "TRAIT_SLEEPIMMUNE" = TRAIT_SLEEPIMMUNE, diff --git a/code/_globalvars/traits/admin_tooling.dm b/code/_globalvars/traits/admin_tooling.dm index a0ec9987015..d3617ccc877 100644 --- a/code/_globalvars/traits/admin_tooling.dm +++ b/code/_globalvars/traits/admin_tooling.dm @@ -200,6 +200,7 @@ GLOBAL_LIST_INIT(admin_visible_traits, list( "TRAIT_SHOCKIMMUNE" = TRAIT_SHOCKIMMUNE, "TRAIT_SIGN_LANG" = TRAIT_SIGN_LANG, "TRAIT_SILENT_FOOTSTEPS" = TRAIT_SILENT_FOOTSTEPS, + "TRAIT_SILICON_EMOTES_ALLOWED" = TRAIT_SILICON_EMOTES_ALLOWED, "TRAIT_SIXTHSENSE" = TRAIT_SIXTHSENSE, "TRAIT_SKITTISH" = TRAIT_SKITTISH, "TRAIT_SLEEPIMMUNE" = TRAIT_SLEEPIMMUNE, diff --git a/code/datums/emotes.dm b/code/datums/emotes.dm index 7006d6d6daa..71631de2d98 100644 --- a/code/datums/emotes.dm +++ b/code/datums/emotes.dm @@ -44,6 +44,8 @@ var/list/mob_type_blacklist_typecache /// Types that can use this emote regardless of their state. var/list/mob_type_ignore_stat_typecache + /// Trait that is required to use this emote. + var/trait_required /// In which state can you use this emote? (Check stat.dm for a full list of them) var/stat_allowed = CONSCIOUS /// Sound to play when emote is called. @@ -297,6 +299,8 @@ * Returns a bool about whether or not the user can run the emote. */ /datum/emote/proc/can_run_emote(mob/user, status_check = TRUE, intentional = FALSE) + if(trait_required && !HAS_TRAIT(user, trait_required)) + return FALSE if(!is_type_in_typecache(user, mob_type_allowed_typecache)) return FALSE if(is_type_in_typecache(user, mob_type_blacklist_typecache)) diff --git a/code/modules/mob/living/basic/bots/_bots.dm b/code/modules/mob/living/basic/bots/_bots.dm index 86fe0b5cf57..aad840aa185 100644 --- a/code/modules/mob/living/basic/bots/_bots.dm +++ b/code/modules/mob/living/basic/bots/_bots.dm @@ -113,7 +113,7 @@ GLOBAL_LIST_INIT(command_strings, list( RegisterSignal(src, COMSIG_MOVABLE_MOVED, PROC_REF(handle_loop_movement)) RegisterSignal(src, COMSIG_ATOM_WAS_ATTACKED, PROC_REF(after_attacked)) RegisterSignal(src, COMSIG_MOB_TRIED_ACCESS, PROC_REF(attempt_access)) - ADD_TRAIT(src, TRAIT_NO_GLIDE, INNATE_TRAIT) + add_traits(list(TRAIT_NO_GLIDE, TRAIT_SILICON_EMOTES_ALLOWED), INNATE_TRAIT) GLOB.bots_list += src // Give bots a fancy new ID card that can hold any access. diff --git a/code/modules/mob/living/basic/pets/orbie/orbie.dm b/code/modules/mob/living/basic/pets/orbie/orbie.dm index 735f63977d3..c0c6dd7b023 100644 --- a/code/modules/mob/living/basic/pets/orbie/orbie.dm +++ b/code/modules/mob/living/basic/pets/orbie/orbie.dm @@ -50,6 +50,7 @@ var/static/list/food_types = list(/obj/item/food/virtual_chocolate) AddComponent(/datum/component/obeys_commands, pet_commands) AddElement(/datum/element/basic_eating, food_types = food_types) + ADD_TRAIT(src, TRAIT_SILICON_EMOTES_ALLOWED, INNATE_TRAIT) RegisterSignal(src, COMSIG_ATOM_CAN_BE_PULLED, PROC_REF(on_pulled)) RegisterSignal(src, COMSIG_VIRTUAL_PET_LEVEL_UP, PROC_REF(on_level_up)) RegisterSignal(src, COMSIG_MOB_CLICKON, PROC_REF(on_click)) diff --git a/code/modules/mob/living/brain/brain.dm b/code/modules/mob/living/brain/brain.dm index 1bacc08a8b6..17f5be02a91 100644 --- a/code/modules/mob/living/brain/brain.dm +++ b/code/modules/mob/living/brain/brain.dm @@ -16,6 +16,7 @@ forceMove(OB) if(!container?.mecha && (!container || container.immobilize)) //Unless inside a mecha, brains are rather helpless. add_traits(list(TRAIT_IMMOBILIZED, TRAIT_HANDS_BLOCKED), BRAIN_UNAIDED) + ADD_TRAIT(src, TRAIT_SILICON_EMOTES_ALLOWED, INNATE_TRAIT) /mob/living/brain/on_changed_z_level(turf/old_turf, turf/new_turf, same_z_layer, notify_contents) var/obj/item/organ/internal/brain/brain_loc = loc diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm index 9ccc26eec6c..ae79d876272 100644 --- a/code/modules/mob/living/emote.dm +++ b/code/modules/mob/living/emote.dm @@ -715,15 +715,6 @@ /datum/emote/living/custom/replace_pronoun(mob/user, message) return message -/datum/emote/living/beep - key = "beep" - key_third_person = "beeps" - message = "beeps." - message_param = "beeps at %t." - sound = 'sound/machines/twobeep.ogg' - mob_type_allowed_typecache = list(/mob/living/brain, /mob/living/silicon, /mob/living/basic/orbie) - emote_type = EMOTE_AUDIBLE - /datum/emote/living/inhale key = "inhale" key_third_person = "inhales" diff --git a/code/modules/mob/living/silicon/robot/emote.dm b/code/modules/mob/living/silicon/robot/emote.dm index fb7857d4585..22158647823 100644 --- a/code/modules/mob/living/silicon/robot/emote.dm +++ b/code/modules/mob/living/silicon/robot/emote.dm @@ -1,5 +1,5 @@ /datum/emote/silicon - mob_type_allowed_typecache = list(/mob/living/silicon, /mob/living/simple_animal/bot, /mob/living/basic/bot) + trait_required = TRAIT_SILICON_EMOTES_ALLOWED emote_type = EMOTE_AUDIBLE /datum/emote/silicon/boop @@ -7,6 +7,14 @@ key_third_person = "boops" message = "boops." +/datum/emote/silicon/beep + key = "beep" + key_third_person = "beeps" + message = "beeps." + message_param = "beeps at %t." + emote_type = EMOTE_AUDIBLE + sound = 'sound/machines/twobeep.ogg' + /datum/emote/silicon/buzz key = "buzz" key_third_person = "buzzes" @@ -15,7 +23,6 @@ emote_type = EMOTE_AUDIBLE sound = 'sound/machines/buzz-sigh.ogg' - /datum/emote/silicon/buzz2 key = "buzz2" message = "buzzes twice." diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 0c26e7c57e2..4813d97d12d 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -11,7 +11,7 @@ post_tipped_callback = CALLBACK(src, PROC_REF(after_tip_over)), \ post_untipped_callback = CALLBACK(src, PROC_REF(after_righted)), \ roleplay_friendly = TRUE, \ - roleplay_emotes = list(/datum/emote/silicon/buzz, /datum/emote/silicon/buzz2, /datum/emote/living/beep), \ + roleplay_emotes = list(/datum/emote/silicon/buzz, /datum/emote/silicon/buzz2, /datum/emote/silicon/beep), \ roleplay_callback = CALLBACK(src, PROC_REF(untip_roleplay))) set_wires(new /datum/wires/robot(src)) diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 9ca655740cd..6916c01f4d3 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -80,6 +80,7 @@ ) add_traits(traits_to_apply, ROUNDSTART_TRAIT) + ADD_TRAIT(src, TRAIT_SILICON_EMOTES_ALLOWED, INNATE_TRAIT) RegisterSignal(src, COMSIG_LIVING_ELECTROCUTE_ACT, PROC_REF(on_silicon_shocked)) /mob/living/silicon/Destroy() diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index 49b44122ac0..50b30b09aa8 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -202,6 +202,7 @@ pa_system = new(src, automated_announcements = automated_announcements) pa_system.Grant(src) RegisterSignal(src, COMSIG_MOB_TRIED_ACCESS, PROC_REF(attempt_access)) + ADD_TRAIT(src, TRAIT_SILICON_EMOTES_ALLOWED, INNATE_TRAIT) /mob/living/simple_animal/bot/Destroy() GLOB.bots_list -= src diff --git a/code/modules/modular_computers/file_system/programs/virtual_pet.dm b/code/modules/modular_computers/file_system/programs/virtual_pet.dm index 7a0adba3cce..78a9148b013 100644 --- a/code/modules/modular_computers/file_system/programs/virtual_pet.dm +++ b/code/modules/modular_computers/file_system/programs/virtual_pet.dm @@ -432,7 +432,7 @@ GLOBAL_LIST_EMPTY(virtual_pets_list) /datum/emote/living/jump, /datum/emote/living/shiver, /datum/emote/spin, - /datum/emote/living/beep, + /datum/emote/silicon/beep, ) data["possible_emotes"] = list("none") for(var/datum/emote/target_emote as anything in possible_emotes) diff --git a/code/modules/surgery/organs/internal/tongue/_tongue.dm b/code/modules/surgery/organs/internal/tongue/_tongue.dm index 7904c4bea91..fa034acf22b 100644 --- a/code/modules/surgery/organs/internal/tongue/_tongue.dm +++ b/code/modules/surgery/organs/internal/tongue/_tongue.dm @@ -546,6 +546,7 @@ GLOBAL_LIST_INIT(english_to_zombie, list()) attack_verb_simple = list("beep", "boop") modifies_speech = TRUE taste_sensitivity = 25 // not as good as an organic tongue + organ_traits = list(TRAIT_SILICON_EMOTES_ALLOWED) voice_filter = "alimiter=0.9,acompressor=threshold=0.2:ratio=20:attack=10:release=50:makeup=2,highpass=f=1000" /obj/item/organ/internal/tongue/robot/could_speak_language(datum/language/language_path)