Skip to content

Commit

Permalink
fix(tables): fix table flip check
Browse files Browse the repository at this point in the history
  • Loading branch information
BaraBarax authored Sep 17, 2024
1 parent 11a0a42 commit 66cf83f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions code/modules/tables/flipping.dm
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

/obj/structure/table/proc/straight_table_check(direction)
if(health > 100)
return 0
if(reinforced)
return FALSE
var/obj/structure/table/T
for(var/angle in list(-90,90))
T = locate() in get_step(src.loc,turn(direction,angle))
if(T && T.flipped == 0 && T.material && material && T.material.name == material.name)
return 0
if(T && T.flipped == FALSE && T.material && material && T.material.name == material.name)
return FALSE
T = locate() in get_step(src.loc,direction)
if (!T || T.flipped == 1 || T.material != material)
return 1
if (!T || T.flipped == TRUE || T.material != material)
return TRUE
return T.straight_table_check(direction)

/obj/structure/table/verb/do_flip()
Expand Down

0 comments on commit 66cf83f

Please sign in to comment.