More portal fixes

This commit is contained in:
Mark van Alphen
2019-06-03 21:57:00 +02:00
parent cd362d6bad
commit 950a4cb5dc
7 changed files with 37 additions and 31 deletions
@@ -173,10 +173,10 @@ var/sc_safecode5 = "[rand(0,9)]"
mezzer()
/obj/singularity/narsie/sc_Narsie/consume(var/atom/A)
if(is_type_in_list(A, uneatable))
return FALSE
if(!A.simulated)
return FALSE
if(is_type_in_list(A, uneatable))
return FALSE
if(istype(A,/mob/living))
var/mob/living/L = A
L.gib()
+21 -19
View File
@@ -34,7 +34,6 @@
qdel(O)
wormholes.Cut()
/obj/effect/portal/wormhole
name = "wormhole"
desc = "It looks highly unstable; It could close at any moment."
@@ -42,23 +41,26 @@
icon_state = "anom"
failchance = 0
/obj/effect/portal/wormhole/attack_hand(mob/user)
teleport(user)
/obj/effect/portal/wormhole/attackby(obj/item/I, mob/user, params)
teleport(user)
/obj/effect/portal/wormhole/teleport(atom/movable/M)
if(istype(M, /obj/effect)) //sparks don't teleport
return
if(M.anchored && istype(M, /obj/mecha))
return
if(!istype(M))
return FALSE
if(istype(M, /atom/movable))
var/turf/target
if(GLOB.portals.len)
var/obj/effect/portal/P = pick(GLOB.portals)
if(P && isturf(P.loc))
target = P.loc
if(!target) return
do_teleport(M, target, 1, 1, 0, 0) ///You will appear adjacent to the beacon
if(!M.simulated || iseffect(M))
return FALSE
if(M.anchored && ismecha(M))
return FALSE
var/turf/target
if(GLOB.portals.len)
var/obj/effect/portal/P = pick(GLOB.portals)
if(P && isturf(P.loc))
target = P.loc
if(!target)
return FALSE
if(!do_teleport(M, target, 1, TRUE)) ///You will appear adjacent to the beacon
return FALSE
return TRUE
+1 -1
View File
@@ -60,7 +60,7 @@
for(var/atom/A in T.contents)
if(!A.simulated)
continue
if(istype(A,/obj/machinery/light))
if(istype(A, /obj/machinery/light))
continue //hacky but whatever, shuttles need three spots each for this shit
contcount++
+2 -2
View File
@@ -138,10 +138,10 @@
if(!AM)
return FALSE
if(is_type_in_list(AM, blacklist))
if(!AM.simulated)
return FALSE
if(!AM.simulated)
if(is_type_in_list(AM, blacklist))
return FALSE
if(AM.anchored)