mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-20 23:21:10 +00:00
Inhibitor Check Fix (#10980)
This commit is contained in:
@@ -42,16 +42,15 @@
|
||||
if(istype(adestination))
|
||||
var/list/turf/good_turfs = list()
|
||||
var/list/turf/bad_turfs = list()
|
||||
for(var/found_inhibitor in circlerange(adestination,8))
|
||||
if(!istype(found_inhibitor,/obj/machinery/anti_bluespace))
|
||||
continue
|
||||
var/turf/T = get_turf(adestination)
|
||||
for(var/found_inhibitor in bluespace_inhibitors)
|
||||
var/obj/machinery/anti_bluespace/AB = found_inhibitor
|
||||
if(AB.stat & (NOPOWER | BROKEN) )
|
||||
if(T.z != AB.z || get_dist(adestination, AB) > 8 || (AB.stat & (NOPOWER | BROKEN)))
|
||||
continue
|
||||
AB.use_power(AB.active_power_usage)
|
||||
bad_turfs += circlerangeturfs(get_turf(AB),8)
|
||||
good_turfs += circlerangeturfs(get_turf(AB),9)
|
||||
if(good_turfs.len && bad_turfs.len)
|
||||
if(length(good_turfs) && length(bad_turfs))
|
||||
good_turfs -= bad_turfs
|
||||
return pick(good_turfs)
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
var/global/list/bluespace_inhibitors
|
||||
|
||||
/obj/machinery/anti_bluespace
|
||||
name = "bluespace inhibitor"
|
||||
desc = "Scrambles any bluespace related activity and displaces it away from the beacon's area of effect."
|
||||
@@ -9,6 +11,14 @@
|
||||
active_power_usage = 5000
|
||||
idle_power_usage = 1000
|
||||
|
||||
/obj/machinery/anti_bluespace/Initialize()
|
||||
. = ..()
|
||||
LAZYADD(bluespace_inhibitors, src)
|
||||
|
||||
/obj/machinery/anti_bluespace/Destroy()
|
||||
LAZYREMOVE(bluespace_inhibitors, src)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/anti_bluespace/update_icon()
|
||||
. = ..()
|
||||
if(stat & BROKEN)
|
||||
|
||||
@@ -921,6 +921,14 @@ var/list/total_extraction_beacons = list()
|
||||
return
|
||||
if(A.anchored)
|
||||
return
|
||||
var/turf/T = get_turf(A)
|
||||
for(var/found_inhibitor in bluespace_inhibitors)
|
||||
var/obj/machinery/anti_bluespace/AB = found_inhibitor
|
||||
if(T.z != AB.z || get_dist(T, AB) > 8 || (AB.stat & (NOPOWER | BROKEN)))
|
||||
continue
|
||||
AB.use_power(AB.active_power_usage)
|
||||
to_chat(user, SPAN_WARNING("A nearby bluespace inhibitor interferes with \the [src]!"))
|
||||
return
|
||||
to_chat(user, SPAN_NOTICE("You start attaching the pack to \the [A]..."))
|
||||
if(do_after(user,50))
|
||||
to_chat(user, SPAN_NOTICE("You attach the pack to \the [A] and activate it."))
|
||||
@@ -968,11 +976,10 @@ var/list/total_extraction_beacons = list()
|
||||
var/area/area_name = get_area(src)
|
||||
name += " ([rand(100,999)]) ([area_name.name])"
|
||||
total_extraction_beacons += src
|
||||
..()
|
||||
|
||||
/obj/structure/extraction_point/Destroy()
|
||||
total_extraction_beacons -= src
|
||||
. = ..()
|
||||
return ..()
|
||||
|
||||
/**********************Resonator**********************/
|
||||
|
||||
|
||||
6
html/changelogs/geeves-inhibitor_check.yml
Normal file
6
html/changelogs/geeves-inhibitor_check.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
author: Geeves
|
||||
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- bugfix: "Bluespace inhibitors now inhibit warp extraction packs."
|
||||
Reference in New Issue
Block a user