diff --git a/code/__DEFINES/traits/declarations.dm b/code/__DEFINES/traits/declarations.dm index f8b9a687106..981ad0e6de8 100644 --- a/code/__DEFINES/traits/declarations.dm +++ b/code/__DEFINES/traits/declarations.dm @@ -978,6 +978,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define STATION_TRAIT_BIGGER_PODS "station_trait_bigger_pods" #define STATION_TRAIT_BIRTHDAY "station_trait_birthday" #define STATION_TRAIT_BOTS_GLITCHED "station_trait_bot_glitch" +#define STATION_TRAIT_MACHINES_GLITCHED "station_trait_machine_glitch" #define STATION_TRAIT_BRIGHT_DAY "station_trait_bright_day" #define STATION_TRAIT_CARP_INFESTATION "station_trait_carp_infestation" #define STATION_TRAIT_CYBERNETIC_REVOLUTION "station_trait_cybernetic_revolution" diff --git a/code/_globalvars/traits/_traits.dm b/code/_globalvars/traits/_traits.dm index 64e81541e73..e012ea34329 100644 --- a/code/_globalvars/traits/_traits.dm +++ b/code/_globalvars/traits/_traits.dm @@ -80,6 +80,7 @@ GLOBAL_LIST_INIT(traits_by_type, list( "STATION_TRAIT_BIGGER_PODS" = STATION_TRAIT_BIGGER_PODS, "STATION_TRAIT_BIRTHDAY" = STATION_TRAIT_BIRTHDAY, "STATION_TRAIT_BOTS_GLITCHED" = STATION_TRAIT_BOTS_GLITCHED, + "STATION_TRAIT_MACHINES_GLITCHED" = STATION_TRAIT_MACHINES_GLITCHED, "STATION_TRAIT_BRIGHT_DAY" = STATION_TRAIT_BRIGHT_DAY, "STATION_TRAIT_CARP_INFESTATION" = STATION_TRAIT_CARP_INFESTATION, "STATION_TRAIT_CYBERNETIC_REVOLUTION" = STATION_TRAIT_CYBERNETIC_REVOLUTION, diff --git a/code/datums/station_traits/negative_traits.dm b/code/datums/station_traits/negative_traits.dm index 266725cf337..727f487bd3e 100644 --- a/code/datums/station_traits/negative_traits.dm +++ b/code/datums/station_traits/negative_traits.dm @@ -185,6 +185,22 @@ for(var/mob/living/found_bot as anything in GLOB.bots_list) found_bot.randomize_language_if_on_station() +/datum/station_trait/machine_languages + name = "Machine Language Matrix Malfunction" + trait_type = STATION_TRAIT_NEGATIVE + weight = 2 + cost = STATION_TRAIT_COST_FULL + show_in_report = TRUE + report_message = "Your station's machines have had their language matrix fried due to an event, \ + resulting in some strange and unfamiliar speech patterns." + trait_to_give = STATION_TRAIT_MACHINES_GLITCHED + +/datum/station_trait/machine_languages/New() + . = ..() + // What "caused" our machines to go haywire (fluff) + var/event_source = pick("an ion storm", "a malfunction", "a software update", "a power surge", "a computer virus", "a subdued machine uprising", "a clown's prank") + report_message = "Your station's machinery have had their language matrix fried due to [event_source], resulting in some strange and unfamiliar speech patterns." + /datum/station_trait/revenge_of_pun_pun name = "Revenge of Pun Pun" trait_type = STATION_TRAIT_NEGATIVE diff --git a/code/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm index 45257841c46..40d9ef556dc 100644 --- a/code/game/machinery/_machinery.dm +++ b/code/game/machinery/_machinery.dm @@ -177,7 +177,7 @@ flags_1 |= PREVENT_CONTENTS_EXPLOSION_1 } - if(HAS_TRAIT(SSstation, STATION_TRAIT_BOTS_GLITCHED)) + if(HAS_TRAIT(SSstation, STATION_TRAIT_MACHINES_GLITCHED) && mapload) randomize_language_if_on_station() SEND_GLOBAL_SIGNAL(COMSIG_GLOB_NEW_MACHINE, src) diff --git a/code/game/machinery/announcement_system.dm b/code/game/machinery/announcement_system.dm index edb945f483e..1700abb0af1 100644 --- a/code/game/machinery/announcement_system.dm +++ b/code/game/machinery/announcement_system.dm @@ -32,6 +32,9 @@ GLOBAL_LIST_EMPTY(announcement_systems) radio = new /obj/item/radio/headset/silicon/ai(src) update_appearance() +/obj/machinery/announcement_system/randomize_language_if_on_station() + return + /obj/machinery/announcement_system/update_icon_state() icon_state = "[base_icon_state]_[is_operational ? "On" : "Off"][panel_open ? "_Open" : null]" return ..() diff --git a/code/modules/mob/living/basic/bots/_bots.dm b/code/modules/mob/living/basic/bots/_bots.dm index 22ab4532269..86fe0b5cf57 100644 --- a/code/modules/mob/living/basic/bots/_bots.dm +++ b/code/modules/mob/living/basic/bots/_bots.dm @@ -142,9 +142,6 @@ GLOBAL_LIST_INIT(command_strings, list( var/datum/atom_hud/datahud = GLOB.huds[data_hud_type] datahud.show_to(src) - if(HAS_TRAIT(SSstation, STATION_TRAIT_BOTS_GLITCHED)) - randomize_language_if_on_station() - if(mapload && is_station_level(z) && (bot_mode_flags & BOT_MODE_CAN_BE_SAPIENT) && (bot_mode_flags & BOT_MODE_ROUNDSTART_POSSESSION)) enable_possession(mapload = mapload) diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index 48d83da80a9..49b44122ac0 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -196,9 +196,6 @@ path_hud.add_atom_to_hud(src) path_hud.show_to(src) - if(HAS_TRAIT(SSstation, STATION_TRAIT_BOTS_GLITCHED)) - randomize_language_if_on_station() - if(mapload && is_station_level(z) && bot_mode_flags & BOT_MODE_CAN_BE_SAPIENT && bot_mode_flags & BOT_MODE_ROUNDSTART_POSSESSION) enable_possession(mapload = mapload)