mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-07-12 23:52:34 +01:00
Grilles and rods.
Grilles no longer return more rods than they were created from when destroyed (by method other than wirecutters). Rods are now acquired from and returned to a pool. Also adds a pre-broken grille for mapping, avoids the case where one might be able to destroy the same grille twice.
This commit is contained in:
@@ -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(initial(health)*0.8, initial(health)*0.9) //Largely under broken threshold, this is used to adjust the health, NOT to break it
|
||||
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"
|
||||
|
||||
@@ -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