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:
PsiOmega
2015-05-02 21:33:37 +02:00
parent a9b1f8bfe0
commit ca7fa2aa19
15 changed files with 48 additions and 38 deletions
+13 -3
View File
@@ -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."
+2 -2
View File
@@ -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