Files
Mnemeory 277346c438 bar fixes round 2.1 (#21504)
- adds a new hostile_events check to prevent hostile events from
spawning in maintenance areas that are crew-facing, so far just the deck
3 crew lounge maintenance and bar maintenance.
- deletes errant holopad under the bartender scrubber
- relocates smartfridge interaction point so it's next to all the other
machines

---------

Signed-off-by: Mnemeory <227217321+Mnemeory@users.noreply.github.com>
Co-authored-by: hazelrat <83198434+hazelrat@users.noreply.github.com>
2025-10-22 09:13:13 +00:00

42 lines
1.3 KiB
Plaintext

/datum/event/rogue_maint_drones/start()
..()
var/drons = severity * 2 - 1
var/groups = rand(3, 8)
for(var/i = 0 to groups)
var/list/spots = get_infestation_turfs()
if(!LAZYLEN(spots))
break
var/turf/T = pick(spots)
for(var/j = 0 to drons)
new /mob/living/simple_animal/hostile/rogue_drone(T)
/datum/event/rogue_maint_drones/announce()
var/stealth_chance = 70 - 20*severity
if(prob(stealth_chance))
return
var/naming
switch(severity)
if(EVENT_LEVEL_MUNDANE)
naming = "minor"
if(EVENT_LEVEL_MODERATE)
naming = "serious"
if(EVENT_LEVEL_MAJOR)
naming = "major"
command_announcement.Announce("A [naming] maintenance drone hijacking has occurred. The hacked drones are aggressive and dangerous. Caution is advised when entering maintenance tunnels.", "Drone Behaviour Control", zlevels = affecting_z)
/datum/event/rogue_maint_drones/proc/get_infestation_turfs()
var/area/location = pick_area(list(/proc/is_not_space_area, /proc/is_station_area, /proc/is_maint_area, /proc/allows_hostile_events))
if(!location)
LOG_DEBUG("Drone infestation failed to find a viable area. Aborting.")
kill()
return
var/list/dron_turfs = get_area_turfs(location, list(/proc/not_turf_contains_dense_objects))
if(!dron_turfs.len)
LOG_DEBUG("Drone infestation failed to find viable turfs in \the [location].")
kill()
return
return dron_turfs