Merge remote-tracking branch 'upstream/master' into dev

Conflicts:
	code/game/objects/structures.dm
	code/game/objects/structures/inflatable.dm
This commit is contained in:
PsiOmega
2014-11-29 10:05:21 +01:00
13 changed files with 42 additions and 68 deletions

View File

@@ -2,7 +2,7 @@
/atom/var/pressure_resistance = ONE_ATMOSPHERE
atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
/atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
//Purpose: Determines if the object (or airflow) can pass this atom.
//Called by: Movement, airflow.
//Inputs: The moving atom (optional), target turf, "height" and air group
@@ -30,6 +30,16 @@ atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
return 1
//Convenience function for atoms to update turfs they occupy
/atom/movable/proc/update_nearby_tiles(need_rebuild)
if(!air_master)
return 0
for(var/turf/simulated/turf in locs)
air_master.mark_for_update(turf)
return 1
//Basically another way of calling CanPass(null, other, 0, 0) and CanPass(null, other, 1.5, 1).
//Returns:
// 0 - Not blocked
@@ -63,4 +73,4 @@ turf/c_airblock(turf/other)
for(var/atom/movable/M in contents)
result |= M.c_airblock(other)
if(result == BLOCKED) return BLOCKED
return result
return result

View File

@@ -350,7 +350,7 @@
/obj/machinery/door/proc/requiresID()
return 1
/obj/machinery/door/proc/update_nearby_tiles(need_rebuild)
/obj/machinery/door/update_nearby_tiles(need_rebuild)
if(!air_master)
return 0
@@ -374,7 +374,7 @@
return
/obj/machinery/door/Move(new_loc, new_dir)
update_nearby_tiles()
//update_nearby_tiles()
. = ..()
if(width > 1)
if(dir in list(EAST, WEST))
@@ -387,4 +387,4 @@
update_nearby_tiles()
/obj/machinery/door/morgue
icon = 'icons/obj/doors/doormorgue.dmi'
icon = 'icons/obj/doors/doormorgue.dmi'

View File

@@ -16,18 +16,9 @@
explosion_resistance = 5
air_properties_vary_with_direction = 1
/obj/machinery/door/window/update_nearby_tiles(need_rebuild)
if(!air_master)
return 0
air_master.mark_for_update(get_turf(src))
return 1
/obj/machinery/door/window/New()
..()
update_nearby_tiles()
if (src.req_access && src.req_access.len)
src.icon_state = "[src.icon_state]"
src.base_state = src.icon_state
@@ -36,6 +27,7 @@
/obj/machinery/door/window/Del()
density = 0
playsound(src, "shatter", 70, 1)
update_nearby_tiles()
..()
/obj/machinery/door/window/Bumped(atom/movable/AM as mob|obj)

View File

@@ -697,15 +697,6 @@ steam.start() -- spawns the effect
if(air_group) return 0
return !density
proc/update_nearby_tiles(need_rebuild)
if(!air_master)
return 0
air_master.mark_for_update(get_turf(src))
return 1
/datum/effect/effect/system/reagents_explosion
var/amount // TNT equivalent
var/flashing = 0 // does explosion creates flash effect?

View File

@@ -52,6 +52,9 @@
if(climbable)
verbs += /obj/structure/proc/climb_on
/obj/structure/Del()
..()
/obj/structure/proc/climb_on()
set name = "Climb structure"
@@ -173,4 +176,4 @@
return 0
visible_message("<span class='danger'>[user] [attack_verb] the [src] apart!</span>")
spawn(1) destroy()
return 1
return 1

View File

@@ -34,12 +34,6 @@
update_nearby_tiles()
..()
/obj/structure/inflatable/proc/update_nearby_tiles(need_rebuild) //Copypasta from airlock code
if(!air_master)
return 0
air_master.mark_for_update(get_turf(src))
return 1
/obj/structure/inflatable/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
return 0
@@ -265,4 +259,4 @@
new /obj/item/inflatable(src)
new /obj/item/inflatable(src)
new /obj/item/inflatable(src)
new /obj/item/inflatable(src)
new /obj/item/inflatable(src)

View File

@@ -154,12 +154,6 @@
CheckHardness()
return
proc/update_nearby_tiles(need_rebuild) //Copypasta from airlock code
if(!air_master)
return 0
air_master.mark_for_update(get_turf(src))
return 1
/obj/structure/mineral_door/iron
mineralType = "metal"
hardness = 3

View File

@@ -295,11 +295,3 @@ obj/structure/windoor_assembly/Del()
update_icon()
return
/obj/structure/windoor_assembly/proc/update_nearby_tiles(need_rebuild)
if(!air_master)
return 0
air_master.mark_for_update(loc)
return 1

View File

@@ -316,15 +316,6 @@
dir = ini_dir
update_nearby_tiles(need_rebuild=1)
//This proc has to do with airgroups and atmos, it has nothing to do with smoothwindows, that's update_nearby_tiles().
/obj/structure/window/proc/update_nearby_tiles(need_rebuild)
if(!air_master)
return 0
air_master.mark_for_update(get_turf(src))
return 1
//checks if this window is full-tile one
/obj/structure/window/proc/is_fulltile()
if(dir & (dir - 1))

View File

@@ -231,7 +231,7 @@
t = replacetext(t, "\[/grid\]", "</td></tr></table>")
t = replacetext(t, "\[row\]", "</td><tr>")
t = replacetext(t, "\[cell\]", "<td>")
t = replacetext(t, "\[logo\]", "<img src = html/images/ntlogo.png>")
t = replacetext(t, "\[logo\]", "<img src = ntlogo.png>")
t = "<font face=\"[deffont]\" color=[P ? P.colour : "black"]>[t]</font>"
else // If it is a crayon, and he still tries to use these, make them empty!

View File

@@ -27,16 +27,6 @@
if(!height || air_group) return 0
else return ..()
//Looks like copy/pasted code... I doubt 'need_rebuild' is even used here - Nodrak
/obj/machinery/shield/proc/update_nearby_tiles(need_rebuild)
if(!air_master)
return 0
air_master.mark_for_update(get_turf(src))
return 1
/obj/machinery/shield/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(!istype(W)) return
@@ -357,4 +347,4 @@
src.icon_state = malfunction ? "shieldonbr":"shieldon"
else
src.icon_state = malfunction ? "shieldoffbr":"shieldoff"
return
return

View File

@@ -13,6 +13,14 @@
var/strength = 0
var/ticks_recovering = 10
/obj/effect/energy_field/New()
..()
update_nearby_tiles()
/obj/effect/energy_field/Del()
update_nearby_tiles()
..()
/obj/effect/energy_field/ex_act(var/severity)
Stress(0.5 + severity)
@@ -44,12 +52,16 @@
strength = 0
//if we take too much damage, drop out - the generator will bring us back up if we have enough power
var/old_density = density
if(strength >= 1)
invisibility = 0
density = 1
else if(strength < 1)
invisibility = 101
density = 0
if (density != old_density)
update_nearby_tiles()
/obj/effect/energy_field/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
//Purpose: Determines if the object (or airflow) can pass this atom.

View File

@@ -242,6 +242,7 @@
/obj/machinery/shieldwall/New(var/obj/machinery/shieldwallgen/A, var/obj/machinery/shieldwallgen/B)
..()
update_nearby_tiles()
src.gen_primary = A
src.gen_secondary = B
if(A && B && A.active && B.active)
@@ -253,6 +254,10 @@
else
del(src) //need at least two generator posts
/obj/machinery/shieldwall/Del()
update_nearby_tiles()
..()
/obj/machinery/shieldwall/attack_hand(mob/user as mob)
return
@@ -321,4 +326,4 @@
if (istype(mover, /obj/item/projectile))
return prob(10)
else
return !src.density
return !src.density