Ports "Bluespace research updates" and "Teleportation standardization, channels, and interception"
This commit is contained in:
@@ -190,11 +190,11 @@
|
||||
/obj/effect/anomaly/bluespace/anomalyEffect()
|
||||
..()
|
||||
for(var/mob/living/M in range(1,src))
|
||||
do_teleport(M, locate(M.x, M.y, M.z), 4)
|
||||
do_teleport(M, locate(M.x, M.y, M.z), 4, channel = TELEPORT_CHANNEL_BLUESPACE)
|
||||
|
||||
/obj/effect/anomaly/bluespace/Bumped(atom/movable/AM)
|
||||
if(isliving(AM))
|
||||
do_teleport(AM, locate(AM.x, AM.y, AM.z), 8)
|
||||
do_teleport(AM, locate(AM.x, AM.y, AM.z), 8, channel = TELEPORT_CHANNEL_BLUESPACE)
|
||||
|
||||
/obj/effect/anomaly/bluespace/detonate()
|
||||
var/turf/T = safepick(get_area_turfs(impact_area))
|
||||
|
||||
@@ -16,3 +16,12 @@
|
||||
I.alpha = 64
|
||||
I.appearance_flags = RESET_ALPHA
|
||||
add_alt_appearance(/datum/atom_hud/alternate_appearance/basic/blessedAware, "blessing", I)
|
||||
RegisterSignal(loc, COMSIG_ATOM_INTERCEPT_TELEPORT, .proc/block_cult_teleport)
|
||||
|
||||
/obj/effect/blessing/Destroy()
|
||||
UnregisterSignal(loc, COMSIG_ATOM_INTERCEPT_TELEPORT)
|
||||
return ..()
|
||||
|
||||
/obj/effect/blessing/proc/block_cult_teleport(datum/source, channel, turf/origin, turf/destination)
|
||||
if(channel == TELEPORT_CHANNEL_CULT)
|
||||
return COMPONENT_BLOCK_TELEPORT
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
/obj/effect/particle_effect/sparks/Initialize()
|
||||
. = ..()
|
||||
flick("sparks", src) // replay the animation
|
||||
flick(icon_state, src) // replay the animation
|
||||
playsound(src, "sparks", 100, TRUE)
|
||||
var/turf/T = loc
|
||||
if(isturf(T))
|
||||
@@ -48,6 +48,8 @@
|
||||
/datum/effect_system/spark_spread
|
||||
effect_type = /obj/effect/particle_effect/sparks
|
||||
|
||||
/datum/effect_system/spark_spread/quantum
|
||||
effect_type = /obj/effect/particle_effect/sparks/quantum
|
||||
|
||||
//electricity
|
||||
|
||||
@@ -55,5 +57,9 @@
|
||||
name = "lightning"
|
||||
icon_state = "electricity"
|
||||
|
||||
/obj/effect/particle_effect/sparks/quantum
|
||||
name = "quantum sparks"
|
||||
icon_state = "quantum_sparks"
|
||||
|
||||
/datum/effect_system/lightning_spread
|
||||
effect_type = /obj/effect/particle_effect/sparks/electricity
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
var/mech_sized = FALSE
|
||||
var/obj/effect/portal/linked
|
||||
var/hardlinked = TRUE //Requires a linked portal at all times. Destroy if there's no linked portal, if there is destroy it when this one is deleted.
|
||||
var/teleport_channel = TELEPORT_CHANNEL_BLUESPACE
|
||||
var/creator
|
||||
var/turf/hard_target //For when a portal needs a hard target and isn't to be linked.
|
||||
var/atmos_link = FALSE //Link source/destination atmos.
|
||||
@@ -34,6 +35,7 @@
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "anom"
|
||||
mech_sized = TRUE
|
||||
teleport_channel = TELEPORT_CHANNEL_WORMHOLE
|
||||
|
||||
/obj/effect/portal/Move(newloc)
|
||||
for(var/T in newloc)
|
||||
@@ -160,7 +162,7 @@
|
||||
no_effect = TRUE
|
||||
else
|
||||
last_effect = world.time
|
||||
if(do_teleport(M, real_target, innate_accuracy_penalty, no_effects = no_effect))
|
||||
if(do_teleport(M, real_target, innate_accuracy_penalty, no_effects = no_effect, channel = teleport_channel))
|
||||
if(istype(M, /obj/item/projectile))
|
||||
var/obj/item/projectile/P = M
|
||||
P.ignore_source_check = TRUE
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/obj/item/quantum_keycard
|
||||
name = "quantum keycard"
|
||||
desc = "A keycard able to link to a quantum pad's particle signature, allowing other quantum pads to travel there instead of their linked pad."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "quantum_keycard"
|
||||
item_state = "card-id"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/idcards_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/idcards_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
var/obj/machinery/quantumpad/qpad
|
||||
|
||||
/obj/item/quantum_keycard/examine(mob/user)
|
||||
..()
|
||||
if(qpad)
|
||||
to_chat(user, "It's currently linked to a quantum pad.")
|
||||
to_chat(user, "<span class='notice'>Alt-click to unlink the keycard.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Insert [src] into an active quantum pad to link it.</span>")
|
||||
|
||||
/obj/item/quantum_keycard/AltClick(mob/living/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start pressing [src]'s unlink button...</span>")
|
||||
if(do_after(user, 40, target = src))
|
||||
to_chat(user, "<span class='notice'>The keycard beeps twice and disconnects the quantum link.</span>")
|
||||
qpad = null
|
||||
|
||||
/obj/item/quantum_keycard/update_icon()
|
||||
if(qpad)
|
||||
icon_state = "quantum_keycard_on"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
@@ -66,7 +66,8 @@
|
||||
to_chat(user, "The spell matrix was unable to locate a suitable teleport destination for an unknown reason. Sorry.")
|
||||
return
|
||||
|
||||
user.forceMove(pick(L))
|
||||
|
||||
smoke.start()
|
||||
uses--
|
||||
if(do_teleport(user, pick(L), forceMove = TRUE, channel = TELEPORT_CHANNEL_MAGIC, forced = TRUE))
|
||||
smoke.start()
|
||||
uses--
|
||||
else
|
||||
to_chat(user, "The spell matrix was disrupted by something near the destination.")
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
use(1)
|
||||
|
||||
/obj/item/stack/ore/bluespace_crystal/proc/blink_mob(mob/living/L)
|
||||
do_teleport(L, get_turf(L), blink_range, asoundin = 'sound/effects/phasein.ogg')
|
||||
do_teleport(L, get_turf(L), blink_range, asoundin = 'sound/effects/phasein.ogg', channel = TELEPORT_CHANNEL_BLUESPACE)
|
||||
|
||||
/obj/item/stack/ore/bluespace_crystal/throw_impact(atom/hit_atom)
|
||||
if(!..()) // not caught in mid-air
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
. = ..()
|
||||
if(!. || !istype(M) || M.anchored)
|
||||
return
|
||||
do_teleport(M, get_turf(M), 15)
|
||||
do_teleport(M, get_turf(M), 15, channel = TELEPORT_CHANNEL_BLUESPACE)
|
||||
|
||||
/obj/item/melee/baton/cattleprod/teleprod/clowning_around(mob/living/user)
|
||||
user.visible_message("<span class='danger'>[user] accidentally hits [user.p_them()]self with [src]!</span>", \
|
||||
@@ -18,7 +18,7 @@
|
||||
SEND_SIGNAL(user, COMSIG_LIVING_MINOR_SHOCK)
|
||||
user.Knockdown(stunforce*3)
|
||||
playsound(loc, 'sound/weapons/egloves.ogg', 50, 1, -1)
|
||||
if(do_teleport(user, get_turf(user), 50))
|
||||
if(do_teleport(user, get_turf(user), 50, channel = TELEPORT_CHANNEL_BLUESPACE))
|
||||
deductcharge(hitcost)
|
||||
else
|
||||
deductcharge(hitcost * 0.25)
|
||||
|
||||
Reference in New Issue
Block a user