mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 00:29:02 +01:00
Replaces like 70-80% of 0 and such, as a side effect cleaned up a bunch of returns Edit: Most left out ones are in mecha which should be done in mecha refactor already Oh my look how clean it is Co-authored-by: TiviPlus <TiviPlus> Co-authored-by: Couls <coul422@gmail.com> Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com> Co-authored-by: Couls <coul422@gmail.com>
This commit is contained in:
co-authored by
TiviPlus <TiviPlus>
Couls
TiviPlus
parent
f600605607
commit
ec09510459
@@ -99,9 +99,9 @@
|
||||
/obj/structure/window/CanAllowThrough(atom/movable/mover, turf/target)
|
||||
. = ..()
|
||||
if(istype(mover) && (mover.pass_flags & PASSGLASS))
|
||||
return 1
|
||||
return TRUE
|
||||
if(dir == FULLTILE_WINDOW_DIR)
|
||||
return 0 //full tile window, you can't move into it!
|
||||
return FALSE //full tile window, you can't move into it!
|
||||
var/attempted_dir = get_dir(loc, target)
|
||||
if(attempted_dir == dir)
|
||||
return
|
||||
@@ -120,10 +120,10 @@
|
||||
|
||||
/obj/structure/window/CheckExit(atom/movable/O, turf/target)
|
||||
if(istype(O) && (O.pass_flags & PASSGLASS))
|
||||
return 1
|
||||
return TRUE
|
||||
if(get_dir(O.loc, target) == dir)
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/window/attack_tk(mob/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
@@ -227,8 +227,8 @@
|
||||
if(get_dir(user,src) & dir)
|
||||
for(var/obj/O in loc)
|
||||
if(!O.CanPass(user, user.loc, 1))
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/window/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
|
||||
. = ..()
|
||||
@@ -337,11 +337,11 @@
|
||||
|
||||
/obj/structure/window/CanAStarPass(ID, to_dir)
|
||||
if(!density)
|
||||
return 1
|
||||
return TRUE
|
||||
if((dir == FULLTILE_WINDOW_DIR) || (dir == to_dir))
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/structure/window/GetExplosionBlock()
|
||||
return reinf && fulltile ? real_explosion_block : 0
|
||||
|
||||
Reference in New Issue
Block a user