mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +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/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.
|
//Purpose: Determines if the object (or airflow) can pass this atom.
|
||||||
//Called by: Movement, airflow.
|
//Called by: Movement, airflow.
|
||||||
//Inputs: The moving atom (optional), target turf, "height" and air group
|
//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
|
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).
|
//Basically another way of calling CanPass(null, other, 0, 0) and CanPass(null, other, 1.5, 1).
|
||||||
//Returns:
|
//Returns:
|
||||||
// 0 - Not blocked
|
// 0 - Not blocked
|
||||||
@@ -63,4 +73,4 @@ turf/c_airblock(turf/other)
|
|||||||
for(var/atom/movable/M in contents)
|
for(var/atom/movable/M in contents)
|
||||||
result |= M.c_airblock(other)
|
result |= M.c_airblock(other)
|
||||||
if(result == BLOCKED) return BLOCKED
|
if(result == BLOCKED) return BLOCKED
|
||||||
return result
|
return result
|
||||||
|
|||||||
@@ -350,7 +350,7 @@
|
|||||||
/obj/machinery/door/proc/requiresID()
|
/obj/machinery/door/proc/requiresID()
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/obj/machinery/door/proc/update_nearby_tiles(need_rebuild)
|
/obj/machinery/door/update_nearby_tiles(need_rebuild)
|
||||||
if(!air_master)
|
if(!air_master)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
@@ -374,7 +374,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
/obj/machinery/door/Move(new_loc, new_dir)
|
/obj/machinery/door/Move(new_loc, new_dir)
|
||||||
update_nearby_tiles()
|
//update_nearby_tiles()
|
||||||
. = ..()
|
. = ..()
|
||||||
if(width > 1)
|
if(width > 1)
|
||||||
if(dir in list(EAST, WEST))
|
if(dir in list(EAST, WEST))
|
||||||
@@ -387,4 +387,4 @@
|
|||||||
update_nearby_tiles()
|
update_nearby_tiles()
|
||||||
|
|
||||||
/obj/machinery/door/morgue
|
/obj/machinery/door/morgue
|
||||||
icon = 'icons/obj/doors/doormorgue.dmi'
|
icon = 'icons/obj/doors/doormorgue.dmi'
|
||||||
|
|||||||
@@ -16,18 +16,9 @@
|
|||||||
explosion_resistance = 5
|
explosion_resistance = 5
|
||||||
air_properties_vary_with_direction = 1
|
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()
|
/obj/machinery/door/window/New()
|
||||||
..()
|
..()
|
||||||
|
update_nearby_tiles()
|
||||||
if (src.req_access && src.req_access.len)
|
if (src.req_access && src.req_access.len)
|
||||||
src.icon_state = "[src.icon_state]"
|
src.icon_state = "[src.icon_state]"
|
||||||
src.base_state = src.icon_state
|
src.base_state = src.icon_state
|
||||||
@@ -36,6 +27,7 @@
|
|||||||
/obj/machinery/door/window/Del()
|
/obj/machinery/door/window/Del()
|
||||||
density = 0
|
density = 0
|
||||||
playsound(src, "shatter", 70, 1)
|
playsound(src, "shatter", 70, 1)
|
||||||
|
update_nearby_tiles()
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/machinery/door/window/Bumped(atom/movable/AM as mob|obj)
|
/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
|
if(air_group) return 0
|
||||||
return !density
|
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
|
/datum/effect/effect/system/reagents_explosion
|
||||||
var/amount // TNT equivalent
|
var/amount // TNT equivalent
|
||||||
var/flashing = 0 // does explosion creates flash effect?
|
var/flashing = 0 // does explosion creates flash effect?
|
||||||
|
|||||||
@@ -52,6 +52,9 @@
|
|||||||
if(climbable)
|
if(climbable)
|
||||||
verbs += /obj/structure/proc/climb_on
|
verbs += /obj/structure/proc/climb_on
|
||||||
|
|
||||||
|
/obj/structure/Del()
|
||||||
|
..()
|
||||||
|
|
||||||
/obj/structure/proc/climb_on()
|
/obj/structure/proc/climb_on()
|
||||||
|
|
||||||
set name = "Climb structure"
|
set name = "Climb structure"
|
||||||
@@ -173,4 +176,4 @@
|
|||||||
return 0
|
return 0
|
||||||
visible_message("<span class='danger'>[user] [attack_verb] the [src] apart!</span>")
|
visible_message("<span class='danger'>[user] [attack_verb] the [src] apart!</span>")
|
||||||
spawn(1) destroy()
|
spawn(1) destroy()
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -34,12 +34,6 @@
|
|||||||
update_nearby_tiles()
|
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)
|
/obj/structure/inflatable/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||||
return 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)
|
new /obj/item/inflatable(src)
|
||||||
new /obj/item/inflatable(src)
|
new /obj/item/inflatable(src)
|
||||||
|
|||||||
@@ -154,12 +154,6 @@
|
|||||||
CheckHardness()
|
CheckHardness()
|
||||||
return
|
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
|
/obj/structure/mineral_door/iron
|
||||||
mineralType = "metal"
|
mineralType = "metal"
|
||||||
hardness = 3
|
hardness = 3
|
||||||
|
|||||||
@@ -295,11 +295,3 @@ obj/structure/windoor_assembly/Del()
|
|||||||
|
|
||||||
update_icon()
|
update_icon()
|
||||||
return
|
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
|
dir = ini_dir
|
||||||
update_nearby_tiles(need_rebuild=1)
|
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
|
//checks if this window is full-tile one
|
||||||
/obj/structure/window/proc/is_fulltile()
|
/obj/structure/window/proc/is_fulltile()
|
||||||
if(dir & (dir - 1))
|
if(dir & (dir - 1))
|
||||||
|
|||||||
@@ -231,7 +231,7 @@
|
|||||||
t = replacetext(t, "\[/grid\]", "</td></tr></table>")
|
t = replacetext(t, "\[/grid\]", "</td></tr></table>")
|
||||||
t = replacetext(t, "\[row\]", "</td><tr>")
|
t = replacetext(t, "\[row\]", "</td><tr>")
|
||||||
t = replacetext(t, "\[cell\]", "<td>")
|
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>"
|
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!
|
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
|
if(!height || air_group) return 0
|
||||||
else return ..()
|
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)
|
/obj/machinery/shield/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
if(!istype(W)) return
|
if(!istype(W)) return
|
||||||
|
|
||||||
@@ -357,4 +347,4 @@
|
|||||||
src.icon_state = malfunction ? "shieldonbr":"shieldon"
|
src.icon_state = malfunction ? "shieldonbr":"shieldon"
|
||||||
else
|
else
|
||||||
src.icon_state = malfunction ? "shieldoffbr":"shieldoff"
|
src.icon_state = malfunction ? "shieldoffbr":"shieldoff"
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -13,6 +13,14 @@
|
|||||||
var/strength = 0
|
var/strength = 0
|
||||||
var/ticks_recovering = 10
|
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)
|
/obj/effect/energy_field/ex_act(var/severity)
|
||||||
Stress(0.5 + severity)
|
Stress(0.5 + severity)
|
||||||
|
|
||||||
@@ -44,12 +52,16 @@
|
|||||||
strength = 0
|
strength = 0
|
||||||
|
|
||||||
//if we take too much damage, drop out - the generator will bring us back up if we have enough power
|
//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)
|
if(strength >= 1)
|
||||||
invisibility = 0
|
invisibility = 0
|
||||||
density = 1
|
density = 1
|
||||||
else if(strength < 1)
|
else if(strength < 1)
|
||||||
invisibility = 101
|
invisibility = 101
|
||||||
density = 0
|
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)
|
/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.
|
//Purpose: Determines if the object (or airflow) can pass this atom.
|
||||||
|
|||||||
@@ -242,6 +242,7 @@
|
|||||||
|
|
||||||
/obj/machinery/shieldwall/New(var/obj/machinery/shieldwallgen/A, var/obj/machinery/shieldwallgen/B)
|
/obj/machinery/shieldwall/New(var/obj/machinery/shieldwallgen/A, var/obj/machinery/shieldwallgen/B)
|
||||||
..()
|
..()
|
||||||
|
update_nearby_tiles()
|
||||||
src.gen_primary = A
|
src.gen_primary = A
|
||||||
src.gen_secondary = B
|
src.gen_secondary = B
|
||||||
if(A && B && A.active && B.active)
|
if(A && B && A.active && B.active)
|
||||||
@@ -253,6 +254,10 @@
|
|||||||
else
|
else
|
||||||
del(src) //need at least two generator posts
|
del(src) //need at least two generator posts
|
||||||
|
|
||||||
|
/obj/machinery/shieldwall/Del()
|
||||||
|
update_nearby_tiles()
|
||||||
|
..()
|
||||||
|
|
||||||
/obj/machinery/shieldwall/attack_hand(mob/user as mob)
|
/obj/machinery/shieldwall/attack_hand(mob/user as mob)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -321,4 +326,4 @@
|
|||||||
if (istype(mover, /obj/item/projectile))
|
if (istype(mover, /obj/item/projectile))
|
||||||
return prob(10)
|
return prob(10)
|
||||||
else
|
else
|
||||||
return !src.density
|
return !src.density
|
||||||
|
|||||||
Reference in New Issue
Block a user