mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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?
|
||||
|
||||
@@ -52,6 +52,9 @@
|
||||
if(climbable)
|
||||
verbs += /obj/structure/proc/climb_on
|
||||
|
||||
/obj/structure/Del()
|
||||
..()
|
||||
|
||||
/obj/structure/proc/climb_on()
|
||||
|
||||
set name = "Climb structure"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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!
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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,6 +52,7 @@
|
||||
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
|
||||
@@ -51,6 +60,9 @@
|
||||
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.
|
||||
//Called by: Movement, airflow.
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user