diff --git a/code/game/area/depot-areas.dm b/code/game/area/depot-areas.dm index 3a3e4d7f1fd..977a272d3af 100644 --- a/code/game/area/depot-areas.dm +++ b/code/game/area/depot-areas.dm @@ -31,6 +31,7 @@ var/detected_mech = FALSE var/detected_pod = FALSE var/detected_double_agent = FALSE + var/mine_trigger_count = 0 var/obj/machinery/computer/syndicate_depot/syndiecomms/comms_computer = null var/obj/structure/fusionreactor/reactor @@ -81,9 +82,9 @@ detected_mech = FALSE detected_pod = FALSE detected_double_agent = FALSE + mine_trigger_count = 0 updateicon() - alert_log += "Alert level reset." /area/syndicate_depot/core/proc/increase_alert(reason) @@ -119,6 +120,12 @@ if(on_peaceful) increase_alert("Vandals!") +/area/syndicate_depot/core/proc/mine_triggered(mob/living/M) + if(mine_trigger_count) + return TRUE + mine_trigger_count++ + increase_alert("Intruder detected by sentry mine: [M]") + /area/syndicate_depot/core/proc/saw_mech(obj/mecha/E) if(detected_mech) return diff --git a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm index 1b619faa41b..547df1b96ef 100644 --- a/code/game/objects/effects/mines.dm +++ b/code/game/objects/effects/mines.dm @@ -53,6 +53,15 @@ if(isliving(victim)) victim.Weaken(stun_time) +/obj/effect/mine/depot + name = "sentry mine" + +/obj/effect/mine/depot/mineEffect(mob/living/victim) + var/area/syndicate_depot/core/depotarea = areaMaster + if(istype(depotarea)) + if(depotarea.mine_triggered(victim)) + explosion(loc, 1, 0, 0, 1) // devastate the tile you are on, but leave everything else untouched + /obj/effect/mine/dnascramble name = "Radiation Mine" var/radiation_amount diff --git a/code/game/objects/effects/spawners/random_spawners.dm b/code/game/objects/effects/spawners/random_spawners.dm index 3d39ec5d9cd..18392256fb8 100644 --- a/code/game/objects/effects/spawners/random_spawners.dm +++ b/code/game/objects/effects/spawners/random_spawners.dm @@ -170,7 +170,7 @@ /obj/effect/spawner/random_spawners/syndicate/trap/mine name = "50pc trap landmine" result = list(/datum/nothing = 1, - /obj/effect/mine/explosive = 1) + /obj/effect/mine/depot = 1) /obj/effect/spawner/random_spawners/syndicate/trap/documents name = "66pc trapped documents"