mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 15:08:02 +01:00
Fixes tableflips flipping ghosts (#26288)
This commit is contained in:
@@ -343,26 +343,28 @@
|
||||
|
||||
/obj/structure/table/proc/flip(direction)
|
||||
if(flipped)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(!straight_table_check(turn(direction,90)) || !straight_table_check(turn(direction,-90)))
|
||||
return 0
|
||||
if(!straight_table_check(turn(direction, 90)) || !straight_table_check(turn(direction, -90)))
|
||||
return FALSE
|
||||
|
||||
dir = direction
|
||||
if(dir != NORTH)
|
||||
layer = 5
|
||||
var/list/targets = list(get_step(src,dir),get_step(src,turn(dir, 45)),get_step(src,turn(dir, -45)))
|
||||
|
||||
var/list/targets = list(get_step(src, dir), get_step(src, turn(dir, 45)), get_step(src, turn(dir, -45)))
|
||||
for(var/atom/movable/A in get_turf(src))
|
||||
if(isobserver(A))
|
||||
continue
|
||||
if(!A.anchored)
|
||||
spawn(0)
|
||||
A.throw_at(pick(targets),1,1)
|
||||
INVOKE_ASYNC(A, TYPE_PROC_REF(/atom/movable/, throw_at), pick(targets), 1, 1)
|
||||
|
||||
flipped = TRUE
|
||||
smoothing_flags = NONE
|
||||
flags |= ON_BORDER
|
||||
for(var/D in list(turn(direction, 90), turn(direction, -90)))
|
||||
if(locate(/obj/structure/table,get_step(src,D)))
|
||||
var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,D))
|
||||
if(locate(/obj/structure/table, get_step(src, D)))
|
||||
var/obj/structure/table/T = locate(/obj/structure/table, get_step(src, D))
|
||||
T.flip(direction)
|
||||
update_icon()
|
||||
|
||||
@@ -370,7 +372,7 @@
|
||||
if(isturf(loc))
|
||||
REMOVE_TRAIT(loc, TRAIT_TURF_COVERED, UNIQUE_TRAIT_SOURCE(src))
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/structure/table/proc/unflip()
|
||||
if(!flipped)
|
||||
|
||||
Reference in New Issue
Block a user