mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
[MIRROR] Cleans up some unused procs and makes is_blocked_turf a turf proc. (#136)
* Cleans up some unused procs and makes is_blocked_turf a turf proc. (#52482) * Cleans up some unused procs and makes is_blocked_turf a turf proc. * Update code/game/turfs/turf.dm Co-authored-by: Rohesie <rohesie@gmail.com> Co-authored-by: Rohesie <rohesie@gmail.com> * Cleans up some unused procs and makes is_blocked_turf a turf proc. Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com> Co-authored-by: Rohesie <rohesie@gmail.com>
This commit is contained in:
co-authored by
Rohesie
ShizCalev
parent
b7e1bd1973
commit
284f2de8a1
@@ -261,7 +261,7 @@
|
||||
|
||||
var/turf/turret_turf = get_turf(remote_eye)
|
||||
|
||||
if(is_blocked_turf(turret_turf))
|
||||
if(turret_turf.is_blocked_turf())
|
||||
to_chat(owner, "<span class='warning'>Location is obstructed by something. Please clear the location and try again.</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -1260,7 +1260,8 @@
|
||||
if(get_dist(user, beacon) <= 2) //beacon too close abort
|
||||
to_chat(user, "<span class='warning'>You are too close to the beacon to teleport to it!</span>")
|
||||
return
|
||||
if(is_blocked_turf(get_turf(beacon), TRUE))
|
||||
var/turf/beacon_turf = get_turf(beacon)
|
||||
if(beacon_turf?.is_blocked_turf(TRUE))
|
||||
to_chat(user, "<span class='warning'>The beacon is blocked by something, preventing teleportation!</span>")
|
||||
return
|
||||
if(!isturf(user.loc))
|
||||
@@ -1277,7 +1278,7 @@
|
||||
if(do_after(user, 40, target = user) && user && beacon)
|
||||
var/turf/T = get_turf(beacon)
|
||||
var/turf/source = get_turf(user)
|
||||
if(is_blocked_turf(T, TRUE))
|
||||
if(T.is_blocked_turf(TRUE))
|
||||
teleporting = FALSE
|
||||
to_chat(user, "<span class='warning'>The beacon is blocked by something, preventing teleportation!</span>")
|
||||
user.update_action_buttons_icon()
|
||||
@@ -1298,7 +1299,7 @@
|
||||
if(beacon)
|
||||
beacon.icon_state = "hierophant_tele_off"
|
||||
return
|
||||
if(is_blocked_turf(T, TRUE))
|
||||
if(T.is_blocked_turf(TRUE))
|
||||
teleporting = FALSE
|
||||
to_chat(user, "<span class='warning'>The beacon is blocked by something, preventing teleportation!</span>")
|
||||
user.update_action_buttons_icon()
|
||||
@@ -1333,7 +1334,7 @@
|
||||
|
||||
/obj/item/hierophant_club/proc/teleport_mob(turf/source, mob/M, turf/target, mob/user)
|
||||
var/turf/turf_to_teleport_to = get_step(target, get_dir(source, M)) //get position relative to caster
|
||||
if(!turf_to_teleport_to || is_blocked_turf(turf_to_teleport_to, TRUE))
|
||||
if(!turf_to_teleport_to || turf_to_teleport_to.is_blocked_turf(TRUE))
|
||||
return
|
||||
animate(M, alpha = 0, time = 2, easing = EASE_OUT) //fade out
|
||||
sleep(1)
|
||||
|
||||
Reference in New Issue
Block a user