Merge branch 'master' into upstream-merge-27344

This commit is contained in:
Poojawa
2017-05-20 23:26:28 -05:00
committed by GitHub
95 changed files with 3681 additions and 1609 deletions
+3 -3
View File
@@ -42,7 +42,7 @@
if (opacity)
has_opaque_atom = TRUE
return INITIALIZE_HINT_NORMAL
/turf/open/space/attack_ghost(mob/dead/observer/user)
@@ -177,7 +177,7 @@
ChangeTurf(/turf/open/floor/plating)
return TRUE
return FALSE
/turf/open/space/ReplaceWithLattice()
var/dest_x = destination_x
var/dest_y = destination_y
@@ -186,4 +186,4 @@
destination_x = dest_x
destination_y = dest_y
destination_z = dest_z
+19 -18
View File
@@ -92,39 +92,39 @@
LC.attackby(C,user)
return
coil.place_turf(src, user)
return 1
return TRUE
return 0
return FALSE
/turf/CanPass(atom/movable/mover, turf/target, height=1.5)
if(!target) return 0
if(!target) return FALSE
if(istype(mover)) // turf/Enter(...) will perform more advanced checks
return !density
else // Now, doing more detailed checks for air movement and air group formation
if(target.blocks_air||blocks_air)
return 0
return FALSE
for(var/obj/obstacle in src)
if(!obstacle.CanPass(mover, target, height))
return 0
return FALSE
for(var/obj/obstacle in target)
if(!obstacle.CanPass(mover, src, height))
return 0
return FALSE
return 1
return TRUE
/turf/Enter(atom/movable/mover as mob|obj, atom/forget as mob|obj|turf|area)
if (!mover)
return 1
return TRUE
// First, make sure it can leave its square
if(isturf(mover.loc))
// Nothing but border objects stop you from leaving a tile, only one loop is needed
for(var/obj/obstacle in mover.loc)
if(!obstacle.CheckExit(mover, src) && obstacle != mover && obstacle != forget)
mover.Bump(obstacle, 1)
return 0
return FALSE
var/list/large_dense = list()
//Next, check objects to block entry that are on the border
@@ -132,14 +132,14 @@
if(border_obstacle.flags & ON_BORDER)
if(!border_obstacle.CanPass(mover, mover.loc, 1) && (forget != border_obstacle))
mover.Bump(border_obstacle, 1)
return 0
return FALSE
else
large_dense += border_obstacle
//Then, check the turf itself
if (!src.CanPass(mover, src))
mover.Bump(src, 1)
return 0
return FALSE
//Finally, check objects/mobs to block entry that are not on the border
var/atom/movable/tompost_bump
@@ -151,8 +151,9 @@
top_layer = obstacle.layer
if(tompost_bump)
mover.Bump(tompost_bump,1)
return 0
return 1 //Nothing found to block so return success!
return FALSE
return TRUE //Nothing found to block so return success!
/turf/Entered(atom/movable/AM)
if(explosion_level && AM.ex_check(explosion_id))
@@ -185,7 +186,7 @@
O.make_unfrozen()
/turf/proc/is_plasteel_floor()
return 0
return FALSE
/turf/proc/levelupdate()
for(var/obj/O in src)
@@ -303,7 +304,7 @@
if(src_object.contents.len)
to_chat(usr, "<span class='notice'>You start dumping out the contents...</span>")
if(!do_after(usr,20,target=src_object))
return 0
return FALSE
var/list/things = src_object.contents.Copy()
var/datum/progressbar/progress = new(user, things.len, src)
@@ -311,7 +312,7 @@
sleep(1)
qdel(progress)
return 1
return TRUE
//////////////////////////////
//Distance procs
@@ -325,7 +326,7 @@
// possible. It results in more efficient (CPU-wise) pathing
// for bots and anything else that only moves in cardinal dirs.
/turf/proc/Distance_cardinal(turf/T)
if(!src || !T) return 0
if(!src || !T) return FALSE
return abs(x - T.x) + abs(y - T.y)
////////////////////////////////////////////////////
@@ -341,7 +342,7 @@
return(2)
/turf/proc/can_have_cabling()
return 1
return TRUE
/turf/proc/can_lay_cable()
return can_have_cabling() & !intact