mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-26 13:39:16 +01:00
Merge branch 'dev' into ofChemistryAndStuff
Conflicts: code/game/objects/effects/chem/chemsmoke.dm code/modules/reagents/Chemistry-Reagents.dm code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Other.dm code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
var/welded = 0
|
||||
var/wall_mounted = 0 //never solid (You can always pass over it)
|
||||
var/health = 100
|
||||
var/lastbang
|
||||
var/breakout = 0 //if someone is currently breaking out. mutex
|
||||
var/storage_capacity = 30 //This is so that someone can't pack hundreds of items in a locker/crate
|
||||
//then open it in a populated area to crash clients.
|
||||
var/open_sound = 'sound/machines/click.ogg'
|
||||
@@ -262,12 +262,6 @@
|
||||
|
||||
if(!src.open())
|
||||
user << "<span class='notice'>It won't budge!</span>"
|
||||
if(!lastbang)
|
||||
lastbang = 1
|
||||
for (var/mob/M in hearers(src, null))
|
||||
M << text("<FONT size=[]>BANG, bang!</FONT>", max(0, 5 - get_dist(src, M)))
|
||||
spawn(30)
|
||||
lastbang = 0
|
||||
|
||||
/obj/structure/closet/attack_hand(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
@@ -315,3 +309,64 @@
|
||||
dump_contents()
|
||||
spawn(1) qdel(src)
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/req_breakout()
|
||||
if(breakout)
|
||||
return 0 //Already breaking out.
|
||||
if(opened)
|
||||
return 0 //Door's open... wait, why are you in it's contents then?
|
||||
if(!welded)
|
||||
return 0 //closed but not welded...
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/mob_breakout(var/mob/living/escapee)
|
||||
var/breakout_time = 2 //2 minutes by default
|
||||
|
||||
if(!req_breakout())
|
||||
return
|
||||
|
||||
//okay, so the closet is either welded or locked... resist!!!
|
||||
escapee.next_move = world.time + 100
|
||||
escapee.last_special = world.time + 100
|
||||
escapee << "<span class='warning'>You lean on the back of \the [src] and start pushing the door open. (this will take about [breakout_time] minutes)</span>"
|
||||
|
||||
visible_message("<span class='danger'>The [src] begins to shake violently!</span>")
|
||||
|
||||
breakout = 1 //can't think of a better way to do this right now.
|
||||
for(var/i in 1 to (6*breakout_time * 2)) //minutes * 6 * 5seconds * 2
|
||||
playsound(src.loc, 'sound/effects/grillehit.ogg', 100, 1)
|
||||
animate_shake()
|
||||
|
||||
if(!do_after(escapee, 50)) //5 seconds
|
||||
breakout = 0
|
||||
return
|
||||
if(!escapee || escapee.stat || escapee.loc != src)
|
||||
breakout = 0
|
||||
return //closet/user destroyed OR user dead/unconcious OR user no longer in closet OR closet opened
|
||||
//Perform the same set of checks as above for weld and lock status to determine if there is even still a point in 'resisting'...
|
||||
if(!req_breakout())
|
||||
breakout = 0
|
||||
return
|
||||
|
||||
//Well then break it!
|
||||
breakout = 0
|
||||
escapee << "<span class='warning'>You successfully break out!</span>"
|
||||
visible_message("<span class='danger'>\the [escapee] successfully broke out of \the [src]!</span>")
|
||||
playsound(src.loc, 'sound/effects/grillehit.ogg', 100, 1)
|
||||
break_open()
|
||||
animate_shake()
|
||||
|
||||
/obj/structure/closet/proc/break_open()
|
||||
welded = 0
|
||||
update_icon()
|
||||
//Do this to prevent contents from being opened into nullspace (read: bluespace)
|
||||
if(istype(loc, /obj/structure/bigDelivery))
|
||||
var/obj/structure/bigDelivery/BD = loc
|
||||
BD.unwrap()
|
||||
open()
|
||||
|
||||
/obj/structure/closet/proc/animate_shake()
|
||||
var/init_px = pixel_x
|
||||
var/shake_dir = pick(-1, 1)
|
||||
animate(src, transform=turn(matrix(), 8*shake_dir), pixel_x=init_px + 2*shake_dir, time=1)
|
||||
animate(transform=null, pixel_x=init_px, time=6, easing=ELASTIC_EASING)
|
||||
|
||||
@@ -132,3 +132,25 @@
|
||||
overlays += "welded"
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/req_breakout()
|
||||
if(!opened && locked) return 1
|
||||
return ..() //It's a secure closet, but isn't locked.
|
||||
|
||||
/obj/structure/closet/secure_closet/break_open()
|
||||
desc += " It appears to be broken."
|
||||
icon_state = icon_off
|
||||
spawn()
|
||||
flick(icon_broken, src)
|
||||
sleep(10)
|
||||
flick(icon_broken, src)
|
||||
sleep(10)
|
||||
broken = 1
|
||||
locked = 0
|
||||
update_icon()
|
||||
//Do this to prevent contents from being opened into nullspace (read: bluespace)
|
||||
if(istype(loc, /obj/structure/bigDelivery))
|
||||
var/obj/structure/bigDelivery/BD = loc
|
||||
BD.unwrap()
|
||||
open()
|
||||
@@ -8,7 +8,7 @@
|
||||
flags = CONDUCT
|
||||
pressure_resistance = 5*ONE_ATMOSPHERE
|
||||
layer = 2.9
|
||||
explosion_resistance = 5
|
||||
explosion_resistance = 1
|
||||
var/health = 10
|
||||
var/destroyed = 0
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
if(iswirecutter(W))
|
||||
if(!shock(user, 100))
|
||||
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
new /obj/item/stack/rods(loc, 2)
|
||||
PoolOrNew(/obj/item/stack/rods, list(get_turf(src), destroyed ? 1 : 2))
|
||||
qdel(src)
|
||||
else if((isscrewdriver(W)) && (istype(loc, /turf/simulated) || anchored))
|
||||
if(!shock(user, 90))
|
||||
@@ -173,11 +173,11 @@
|
||||
density = 0
|
||||
destroyed = 1
|
||||
update_icon()
|
||||
new /obj/item/stack/rods(loc)
|
||||
PoolOrNew(/obj/item/stack/rods, get_turf(src))
|
||||
|
||||
else
|
||||
if(health <= -6)
|
||||
new /obj/item/stack/rods(loc)
|
||||
PoolOrNew(/obj/item/stack/rods, get_turf(src))
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
@@ -221,6 +221,16 @@
|
||||
spawn(1) healthcheck()
|
||||
return 1
|
||||
|
||||
// Used in mapping to avoid
|
||||
/obj/structure/grille/broken
|
||||
destroyed = 1
|
||||
icon_state = "grille-b"
|
||||
density = 0
|
||||
New()
|
||||
..()
|
||||
health = rand(-5, -1) //In the destroyed but not utterly threshold.
|
||||
healthcheck() //Send this to healthcheck just in case we want to do something else with it.
|
||||
|
||||
/obj/structure/grille/cult
|
||||
name = "cult grille"
|
||||
desc = "A matrice built out of an unknown material, with some sort of force field blocking air around it"
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
var/obj/item/weapon/weldingtool/WT = C
|
||||
if(WT.remove_fuel(0, user))
|
||||
user << "\blue Slicing lattice joints ..."
|
||||
new /obj/item/stack/rods(src.loc)
|
||||
PoolOrNew(/obj/item/stack/rods, src.loc)
|
||||
qdel(src)
|
||||
|
||||
return
|
||||
|
||||
@@ -78,7 +78,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
user << "\blue You dissasembled the windoor assembly!"
|
||||
new /obj/item/stack/sheet/glass/reinforced(get_turf(src), 5)
|
||||
if(secure)
|
||||
new /obj/item/stack/rods(get_turf(src), 4)
|
||||
PoolOrNew(/obj/item/stack/rods, list(get_turf(src), 4))
|
||||
qdel(src)
|
||||
else
|
||||
user << "\blue You need more welding fuel to dissassemble the windoor assembly."
|
||||
|
||||
@@ -88,11 +88,11 @@
|
||||
index = 0
|
||||
while(index < 2)
|
||||
new shardtype(loc)
|
||||
if(reinf) new /obj/item/stack/rods(loc)
|
||||
if(reinf) PoolOrNew(/obj/item/stack/rods, loc)
|
||||
index++
|
||||
else
|
||||
new shardtype(loc)
|
||||
if(reinf) new /obj/item/stack/rods(loc)
|
||||
if(reinf) PoolOrNew(/obj/item/stack/rods, loc)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user