Skip to content

Commit

Permalink
Random language trait tweak (tgstation#84816)
Browse files Browse the repository at this point in the history
## About The Pull Request

- Splits the trait into two, one that affects only bots (like the
original version) and one that only affects machines
- Only mapload bots are affected (again)
- Only mapload machines are affected
- The Automated Announcer is immune

## Why It's Good For The Game

I made this trait a while back and then someone else changed it to be
far more disruptive and annoying without adjusting the weight, so I feel
like I have the right to reign it back in a little bit.

This aims to retain some of the charm intended behind the original trait
while maintaining some of the changes made to it.

## Changelog

:cl: Melbert
add: Bot Language station trait split into two: One that affects bots
(retains the old weight and cost) and one that affects machine (half
weight, double the cost)
del: Bot Language station trait and (new) Machine Language station trait
no longer affect newly created machines or bots, just those present at
game start
del: Machine Language station trait cannot affect the Automated
Announcer in telecomms
/:cl:
  • Loading branch information
MrMelbert authored Jul 10, 2024
1 parent a39c0a8 commit dcca367
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 7 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
16 changes: 16 additions & 0 deletions code/datums/station_traits/negative_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/_machinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 3 additions & 0 deletions code/game/machinery/announcement_system.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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 ..()
Expand Down
3 changes: 0 additions & 3 deletions code/modules/mob/living/basic/bots/_bots.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 0 additions & 3 deletions code/modules/mob/living/simple_animal/bot/bot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit dcca367

Please sign in to comment.