diff --git a/aurorastation.dme b/aurorastation.dme index 57267fbbdfc..03e74de4231 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -1588,6 +1588,7 @@ #include "code\modules\events\grid_check.dm" #include "code\modules\events\infestation.dm" #include "code\modules\events\ion_storm.dm" +#include "code\modules\events\maint_drones.dm" #include "code\modules\events\meteors.dm" #include "code\modules\events\money_hacker.dm" #include "code\modules\events\money_lotto.dm" @@ -2147,6 +2148,7 @@ #include "code\modules\mob\living\simple_animal\hostile\phoron_worm.dm" #include "code\modules\mob\living\simple_animal\hostile\pirate.dm" #include "code\modules\mob\living\simple_animal\hostile\pra.dm" +#include "code\modules\mob\living\simple_animal\hostile\rogue_maint_drone.dm" #include "code\modules\mob\living\simple_animal\hostile\russian.dm" #include "code\modules\mob\living\simple_animal\hostile\sarlacc.dm" #include "code\modules\mob\living\simple_animal\hostile\spider_queen.dm" diff --git a/code/modules/events/event_container.dm b/code/modules/events/event_container.dm index da15f9470ff..c1c49ecbe01 100644 --- a/code/modules/events/event_container.dm +++ b/code/modules/events/event_container.dm @@ -144,6 +144,7 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Golem Rune", /datum/event/supply_drop/golem, 20), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "CCIA General Notice", /datum/event/ccia_general_notice, 300), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Mundane Vermin Infestation",/datum/event/infestation, 60, list(ASSIGNMENT_JANITOR = 15, ASSIGNMENT_SECURITY = 15, ASSIGNMENT_MEDICAL = 15)), + new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Drone Malfunction", /datum/event/rogue_maint_drones, 10, list(ASSIGNMENT_ENGINEER = 30)), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Visitor", /datum/event/visitor, 50, is_one_shot = TRUE) ) @@ -166,6 +167,7 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rogue Drones", /datum/event/rogue_drone, 15, list(ASSIGNMENT_SECURITY = 15)), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Moderate Spider Infestation", /datum/event/spider_infestation/moderate, 50, list(ASSIGNMENT_SECURITY = 10)), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Moderate Vermin Infestation", /datum/event/infestation/moderate, 30, list(ASSIGNMENT_JANITOR = 15, ASSIGNMENT_SECURITY = 15, ASSIGNMENT_MEDICAL = 10)), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Drone Uprising", /datum/event/rogue_maint_drones, 25, list(ASSIGNMENT_ENGINEER = 30)), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rescue Pod", /datum/event/rescue_pod, 50, list(ASSIGNMENT_MEDICAL = 10, ASSIGNMENT_SECURITY = 2), is_one_shot = TRUE), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Burglar Pod", /datum/event/rescue_pod/burglar, 50, list(ASSIGNMENT_SECURITY = 5), is_one_shot = TRUE, excluded_roundtypes = list("Extended")) ) @@ -180,7 +182,8 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT new /datum/event_meta(EVENT_LEVEL_MAJOR, "Downed Ship", /datum/event/meteor_wave/downed_ship, 5, list(ASSIGNMENT_ENGINEER = 10),1), new /datum/event_meta(EVENT_LEVEL_MAJOR, "Space Vines", /datum/event/spacevine, 75, list(ASSIGNMENT_ENGINEER = 10, ASSIGNMENT_GARDENER = 20), 1), new /datum/event_meta(EVENT_LEVEL_MAJOR, "Spider Infestation", /datum/event/spider_infestation, 25, list(ASSIGNMENT_SECURITY = 10, ASSIGNMENT_MEDICAL = 5), 1), - new /datum/event_meta(EVENT_LEVEL_MAJOR, "Major Vermin Infestation", /datum/event/infestation/major, 15, list(ASSIGNMENT_SECURITY = 15, ASSIGNMENT_MEDICAL = 5)) + new /datum/event_meta(EVENT_LEVEL_MAJOR, "Major Vermin Infestation", /datum/event/infestation/major, 15, list(ASSIGNMENT_SECURITY = 15, ASSIGNMENT_MEDICAL = 5)), + new /datum/event_meta(EVENT_LEVEL_MAJOR, "Drone Revolution", /datum/event/rogue_maint_drones, 0, list(ASSIGNMENT_ENGINEER = 10, ASSIGNMENT_MEDICAL = 5, ASSIGNMENT_SECURITY = 5)) ) #undef ASSIGNMENT_ANY diff --git a/code/modules/events/maint_drones.dm b/code/modules/events/maint_drones.dm new file mode 100644 index 00000000000..1be7e63f163 --- /dev/null +++ b/code/modules/events/maint_drones.dm @@ -0,0 +1,39 @@ +/datum/event/rogue_maint_drones/start() + var/drons = severity * 2 - 1 + var/groups = rand(3, 8) + + var/list/spots = get_infestation_turfs() + for(var/i = 0 to groups) + 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") + +/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)) + 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 \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/rogue_maint_drone.dm b/code/modules/mob/living/simple_animal/hostile/rogue_maint_drone.dm new file mode 100644 index 00000000000..43b46a0a1e7 --- /dev/null +++ b/code/modules/mob/living/simple_animal/hostile/rogue_maint_drone.dm @@ -0,0 +1,55 @@ +/mob/living/simple_animal/hostile/rogue_drone + name = "maintenance drone" + desc = "A small robot. It looks angry." + icon = 'icons/mob/robots.dmi' + icon_state = "repairbot" + blood_type = "#000000" + speak = list("Removing organic waste.", "Pest control in progress.", "Engaging self-preservation protocols.", "Moving to eject unauthorized personnel.") + speak_emote = list("blares", "buzzes", "beeps") + speak_chance = 1 + density = FALSE + health = 50 + maxHealth = 50 + melee_damage_lower = 5 + melee_damage_upper = 8 + attacktext = "sliced" + faction = "silicon" + min_oxy = 0 + minbodytemp = 0 + speed = 4 + mob_size = MOB_TINY + var/image/eye_overlay + +/mob/living/simple_animal/hostile/rogue_drone/Initialize() + . = ..() + name = "[initial(name)] ([rand(100, 999)])" + eye_overlay = image(icon, "eyes-[icon_state]-emag", layer = EFFECTS_ABOVE_LIGHTING_LAYER) + eye_overlay.appearance_flags = KEEP_APART + add_overlay(eye_overlay) + +/mob/living/simple_animal/hostile/rogue_drone/CanPass(atom/movable/mover, turf/target, height, air_group) + . = ..() + if(.) + if(istype(mover, /mob/living/simple_animal/hostile/rogue_drone)) + return FALSE + +/mob/living/simple_animal/hostile/rogue_drone/death() + ..(null, "blows apart!") + var/T = get_turf(src) + new /obj/effect/gibspawner/robot(T) + spark(T, 1, alldirs) + qdel(src) + +/mob/living/simple_animal/hostile/rogue_drone/validator_living(var/mob/living/L, var/atom/current) + . = ..() + if(.) + if(issilicon(L)) + return FALSE + if(ishuman(L)) + var/mob/living/carbon/human/H = L + if(H.isSynthetic() && !H.isShell()) + return FALSE + if(istype(H.head, /obj/item/holder/drone)) + return FALSE + if(istype(H.wear_suit, /obj/item/clothing/suit/cardborg) && istype(H.head, /obj/item/clothing/head/cardborg)) + return FALSE \ No newline at end of file diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 0c7393daa64..e489734dd9d 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -19,6 +19,9 @@ /mob/living/carbon/human/proc/isFBP() return species && (species.appearance_flags & HAS_FBP) +/mob/living/carbon/human/proc/isShell() + return species && (species.name in list(SPECIES_IPC_SHELL, SPECIES_IPC_SHELL_ROGUE)) + /proc/isMMI(A) if(isbrain(A)) var/mob/living/carbon/brain/B = A diff --git a/html/changelogs/geeves-drone_uprising.yml b/html/changelogs/geeves-drone_uprising.yml new file mode 100644 index 00000000000..2d7343e0999 --- /dev/null +++ b/html/changelogs/geeves-drone_uprising.yml @@ -0,0 +1,6 @@ +author: Geeves + +delete-after: True + +changes: + - rscadd: "Added a new event where hostile (non-player) drones spawn in maintenance." \ No newline at end of file diff --git a/tools/Event Probabilities/Event Probabilities.xlsx b/tools/Event Probabilities/Event Probabilities.xlsx index 1b137ead77c..07439c398d4 100644 Binary files a/tools/Event Probabilities/Event Probabilities.xlsx and b/tools/Event Probabilities/Event Probabilities.xlsx differ