Adds Bluespace Inhibitors (Telescience Nerf) (#5652)

Adds telescience inhibitors to the station. These are fragile, powered machines that inhibit where bluespace activity can occur. The way it works is that it creates an 8 radius (16 tile wide) circular field that displaces any incoming or outgoing bluespace signal to an unintended destination just outside the area of effect.

Basically, incoming teleport signals are redirected to around a random location around the circle, and outgoing teleport signals are redirected to around a random location around the circle. For example, if a ninja was inside the area of effect and tried to teleport outside of it, it wouldn't work but instead teleport something else around me just outside the circle. This will very rarely occur, so most that will happen is that the ninja won't be able to teleport while inside the area of effect. If a ninja was outside the area of effect and tried teleporting inside the circle, they would instead teleport to a random location outside the circle.

A semi-intended side effect is that it would be harder for ninjas/wizards to break into the armory/vault/ai core. Of course, they could use other tools and walk inside the vault. This does not stop them from ever entering it, but makes it unsafe to teleport out.

EMPing a bluespace inhibitor teleports everything in a 20 tile radius to a random location on the station. This teleportation is "safe" and will only teleport the objects in a random station area in unoccupied space.
This commit is contained in:
BurgerLUA
2018-12-16 05:08:02 -08:00
committed by Erki
parent 0d8fc09676
commit 0c842b5c84
12 changed files with 284 additions and 73 deletions

View File

@@ -39,22 +39,51 @@
return 1
return 0
/datum/teleport/proc/checkInhibitors(atom/adestination)
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/obj/machinery/anti_bluespace/AB = found_inhibitor
if(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)
good_turfs -= bad_turfs
return pick(good_turfs)
return adestination
//must succeed
/datum/teleport/proc/setDestination(atom/adestination)
if(istype(adestination))
destination = adestination
destination = checkInhibitors(adestination)
return 1
return 0
//must succeed in most cases
/datum/teleport/proc/setTeleatom(atom/movable/ateleatom)
if(!istype(ateleatom))
return 0
teleatom = checkInhibitors(ateleatom)
if(isturf(teleatom))
var/turf/T = teleatom
var/atom/valid_atoms = list()
for(var/atom/movable in T)
valid_atoms += T
ateleatom = pick(valid_atoms)
if(istype(ateleatom, /obj/effect) && !istype(ateleatom, /obj/effect/dummy/chameleon))
qdel(ateleatom)
return 0
if(istype(ateleatom))
teleatom = ateleatom
return 1
return 0
return 1
//custom effects must be properly set up first for instant-type teleports
//optional