mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-25 09:31:30 +00: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:
@@ -868,8 +868,8 @@
|
||||
var/turf/Tsec = get_turf(src)
|
||||
|
||||
new /obj/item/device/assembly/prox_sensor(Tsec)
|
||||
new /obj/item/stack/rods(Tsec)
|
||||
new /obj/item/stack/rods(Tsec)
|
||||
PoolOrNew(/obj/item/stack/rods, Tsec)
|
||||
PoolOrNew(/obj/item/stack/rods, Tsec)
|
||||
new /obj/item/stack/cable_coil/cut(Tsec)
|
||||
if (cell)
|
||||
cell.loc = Tsec
|
||||
|
||||
@@ -264,7 +264,7 @@ for reference:
|
||||
var/turf/Tsec = get_turf(src)
|
||||
|
||||
/* var/obj/item/stack/rods/ =*/
|
||||
new /obj/item/stack/rods(Tsec)
|
||||
PoolOrNew(/obj/item/stack/rods, Tsec)
|
||||
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
switch (Proj.damage_type)
|
||||
if(BRUTE)
|
||||
new /obj/item/stack/sheet/metal(src.loc, 2)
|
||||
new /obj/item/stack/rods(src.loc, 3)
|
||||
PoolOrNew(/obj/item/stack/rods, list(src.loc, 3))
|
||||
if(BURN)
|
||||
new /obj/effect/decal/cleanable/ash(src.loc) // Turn it to ashes!
|
||||
qdel(src)
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
if(ptank)
|
||||
ptank.loc = T
|
||||
ptank = null
|
||||
new /obj/item/stack/rods(T)
|
||||
PoolOrNew(/obj/item/stack/rods, T)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -144,11 +144,11 @@
|
||||
var/obj/structure/window/W = A
|
||||
|
||||
new /obj/item/weapon/shard( W.loc )
|
||||
if(W.reinf) new /obj/item/stack/rods( W.loc)
|
||||
if(W.reinf) PoolOrNew(/obj/item/stack/rods, W.loc)
|
||||
|
||||
if (W.dir == SOUTHWEST)
|
||||
new /obj/item/weapon/shard( W.loc )
|
||||
if(W.reinf) new /obj/item/stack/rods( W.loc)
|
||||
if(W.reinf) PoolOrNew(/obj/item/stack/rods, W.loc)
|
||||
qdel(A)
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
user << "\blue Removing rods..."
|
||||
playsound(src, 'sound/items/Ratchet.ogg', 80, 1)
|
||||
if(do_after(user, 30))
|
||||
new /obj/item/stack/rods(src, 2)
|
||||
PoolOrNew(/obj/item/stack/rods, list(loc, 2))
|
||||
ChangeTurf(/turf/simulated/floor)
|
||||
var/turf/simulated/floor/F = src
|
||||
F.make_plating()
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
playsound(src, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
src.d_state = 1
|
||||
src.icon_state = "r_wall-1"
|
||||
new /obj/item/stack/rods( src )
|
||||
PoolOrNew(/obj/item/stack/rods, src)
|
||||
user << "<span class='notice'>You cut the outer grille.</span>"
|
||||
return
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
if( d_state == 5 && user.loc == T && user.get_active_hand() == WT )
|
||||
src.d_state = 6
|
||||
src.icon_state = "r_wall-6"
|
||||
new /obj/item/stack/rods( src )
|
||||
PoolOrNew(/obj/item/stack/rods, src)
|
||||
user << "<span class='notice'>The support rods drop out as you cut them loose from the frame.</span>"
|
||||
else
|
||||
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
@@ -223,7 +223,7 @@
|
||||
if( d_state == 5 && user.loc == T && user.get_active_hand() == W )
|
||||
src.d_state = 6
|
||||
src.icon_state = "r_wall-6"
|
||||
new /obj/item/stack/rods( src )
|
||||
PoolOrNew(/obj/item/stack/rods, src)
|
||||
user << "<span class='notice'>The support rods drop out as you cut them loose from the frame.</span>"
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user