Skip to content

Commit

Permalink
[MIRROR] Borg module activations are now announced to their department (
Browse files Browse the repository at this point in the history
#2949)

Co-authored-by: HeyBanditoz <[email protected]>
  • Loading branch information
SierraHelper and HeyBanditoz authored Dec 4, 2024
1 parent d37f08a commit 078e3d3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
name = "cultivator drone module"
display_name = "Cultivator"
channels = list(
"Science" = TRUE,
"Service" = TRUE
"Service" = TRUE,
"Science" = TRUE
)
sprites = list("Drone" = "drone-hydro")

Expand Down
14 changes: 14 additions & 0 deletions code/modules/mob/living/silicon/robot/robot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,20 @@
recalculate_synth_capacities()
if(module)
notify_ai(ROBOT_NOTIFICATION_NEW_MODULE, module.name)
addtimer(new Callback(src, .proc/announce_module_change), 2 SECONDS)

/mob/living/silicon/robot/proc/announce_module_change()
var/singleton/security_state/security_state = GET_SINGLETON(GLOB.using_map.security_state)

if(!src || !(src.z in GLOB.using_map.station_levels))
return // don't announce offmap borgs

var/channel
if(length(module.channels) >= 1 && !security_state.current_security_level_is_same_or_higher_than(security_state.high_security_level))
channel = module.channels[1]
else
channel = "Common" // common if code red or no radio channels, replicates behavior that crew have
GLOB.global_announcer.autosay("[name] has loaded the [module.name].", "Robotic Module Oversight", channel)

/mob/living/silicon/robot/get_cell()
return cell
Expand Down
4 changes: 2 additions & 2 deletions maps/torch/robot/module_flying_surveyor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
name = "survey drone module"
display_name = "Surveyor"
channels = list(
"Science" = TRUE,
"Exploration" = TRUE
"Exploration" = TRUE,
"Science" = TRUE
)
networks = list(NETWORK_RESEARCH)
sprites = list(
Expand Down

0 comments on commit 078e3d3

Please sign in to comment.