mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Merge pull request #2318 from Fox-McCloud/no-pools-allowed
Axes Some Pooling of Specific Objects
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
..()
|
||||
if (istype(W, /obj/item/weapon/wrench) && sheets_refunded)
|
||||
//new /obj/item/stack/sheet/metal( get_turf(src.loc), sheets_refunded )
|
||||
var/obj/item/stack/sheet/metal/M = PoolOrNew(/obj/item/stack/sheet/metal, get_turf(src))
|
||||
var/obj/item/stack/sheet/metal/M = new /obj/item/stack/sheet/metal(get_turf(src))
|
||||
M.amount = sheets_refunded
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -35,10 +35,6 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/shard/Destroy()
|
||||
..()
|
||||
return QDEL_HINT_PUTINPOOL
|
||||
|
||||
/obj/item/weapon/shard/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = I
|
||||
|
||||
@@ -11,7 +11,7 @@ var/global/list/captain_display_cases = list()
|
||||
for(var/obj/structure/displaycase/D in captain_display_cases)
|
||||
if(istype(D))
|
||||
D.ue = fingerprint
|
||||
|
||||
|
||||
return 1
|
||||
|
||||
/obj/structure/displaycase_frame
|
||||
@@ -72,7 +72,7 @@ var/global/list/captain_display_cases = list()
|
||||
sensor.forceMove(src)
|
||||
user << "<span class='notice'>You add the proximity sensor to the frame.</span>"
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
|
||||
|
||||
if(pstate != state)
|
||||
pstate = state
|
||||
update_icon()
|
||||
@@ -100,7 +100,7 @@ var/global/list/captain_display_cases = list()
|
||||
var/ue = null
|
||||
var/image/occupant_overlay = null
|
||||
var/obj/item/weapon/airlock_electronics/circuit
|
||||
|
||||
|
||||
/obj/structure/displaycase/captains_laser
|
||||
name = "captain's display case"
|
||||
desc = "A display case for the captain's antique laser gun. Hooked up with an anti-theft system."
|
||||
@@ -113,17 +113,17 @@ var/global/list/captain_display_cases = list()
|
||||
spawn(5)
|
||||
occupant = new /obj/item/weapon/gun/energy/laser/captain(src)
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/structure/displaycase/Destroy()
|
||||
dump()
|
||||
qdel(circuit)
|
||||
circuit = null
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/displaycase/captains_laser/Destroy()
|
||||
captain_display_cases -= src
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/displaycase/examine(mob/user)
|
||||
..(user)
|
||||
user << "<span class='notice'>Peering through the glass, you see that it contains:</span>"
|
||||
@@ -141,7 +141,7 @@ var/global/list/captain_display_cases = list()
|
||||
/obj/structure/displaycase/ex_act(severity)
|
||||
switch(severity)
|
||||
if (1)
|
||||
PoolOrNew(/obj/item/weapon/shard, loc)
|
||||
new /obj/item/weapon/shard(loc)
|
||||
if (occupant)
|
||||
dump()
|
||||
qdel(src)
|
||||
@@ -163,7 +163,7 @@ var/global/list/captain_display_cases = list()
|
||||
|
||||
/obj/structure/displaycase/blob_act()
|
||||
if (prob(75))
|
||||
PoolOrNew(/obj/item/weapon/shard, loc)
|
||||
new /obj/item/weapon/shard(loc)
|
||||
if(occupant) dump()
|
||||
qdel(src)
|
||||
|
||||
@@ -173,15 +173,15 @@ var/global/list/captain_display_cases = list()
|
||||
if (!( src.destroyed ))
|
||||
src.density = 0
|
||||
src.destroyed = 1
|
||||
PoolOrNew(/obj/item/weapon/shard, loc)
|
||||
new /obj/item/weapon/shard(loc)
|
||||
playsound(get_turf(src), "shatter", 70, 1)
|
||||
update_icon()
|
||||
update_icon()
|
||||
spawn(0)
|
||||
burglar_alarm()
|
||||
else
|
||||
playsound(get_turf(src), 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/displaycase/proc/burglar_alarm()
|
||||
if(burglar_alarm)
|
||||
var/area/alarmed = get_area(src)
|
||||
@@ -237,7 +237,7 @@ var/global/list/captain_display_cases = list()
|
||||
C.conf_access = req_access
|
||||
else
|
||||
C.conf_access = req_one_access
|
||||
|
||||
|
||||
if(!destroyed)
|
||||
var/obj/structure/displaycase_frame/F = new(T)
|
||||
F.state = DISPLAYCASE_FRAME_SCREWDRIVER
|
||||
@@ -260,7 +260,7 @@ var/global/list/captain_display_cases = list()
|
||||
else if(!locked)
|
||||
dump()
|
||||
user << "<span class='danger'>You smash \the [W] into the delicate electronics at the bottom of the case, and deactivate the hover field.</span>"
|
||||
update_icon()
|
||||
update_icon()
|
||||
else
|
||||
if(locked)
|
||||
user << "<span class='warning'>It's locked, you can't put anything into it.</span>"
|
||||
|
||||
@@ -36,10 +36,6 @@
|
||||
//height=42
|
||||
icon='icons/fence-ns.dmi'
|
||||
|
||||
/obj/structure/grille/Destroy()
|
||||
..()
|
||||
return QDEL_HINT_PUTINPOOL //pool grilles
|
||||
|
||||
/obj/structure/grille/ex_act(severity)
|
||||
qdel(src)
|
||||
|
||||
@@ -220,11 +216,11 @@
|
||||
icon_state = "brokengrille"
|
||||
density = 0
|
||||
destroyed = 1
|
||||
PoolOrNew(/obj/item/stack/rods,loc)
|
||||
new /obj/item/stack/rods(loc)
|
||||
|
||||
else
|
||||
if(health <= -6)
|
||||
PoolOrNew(/obj/item/stack/rods,loc)
|
||||
new /obj/item/stack/rods(loc)
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
/obj/structure/lamarr/ex_act(severity)
|
||||
switch(severity)
|
||||
if (1)
|
||||
PoolOrNew(/obj/item/weapon/shard, loc)
|
||||
new /obj/item/weapon/shard(loc)
|
||||
Break()
|
||||
qdel(src)
|
||||
if (2)
|
||||
@@ -35,16 +35,16 @@
|
||||
|
||||
/obj/structure/lamarr/blob_act()
|
||||
if (prob(75))
|
||||
PoolOrNew(/obj/item/weapon/shard, loc)
|
||||
new /obj/item/weapon/shard(loc)
|
||||
Break()
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/lamarr/proc/healthcheck()
|
||||
if (src.health <= 0)
|
||||
if (!( src.destroyed ))
|
||||
src.density = 0
|
||||
src.destroyed = 1
|
||||
PoolOrNew(/obj/item/weapon/shard, loc)
|
||||
new /obj/item/weapon/shard(loc)
|
||||
playsound(src, "shatter", 70, 1)
|
||||
Break()
|
||||
else
|
||||
|
||||
@@ -729,9 +729,9 @@
|
||||
/obj/structure/table/glass/proc/collapse() //glass table collapse is called twice in this code, more efficent to just have a proc
|
||||
src.visible_message("<span class='warning'>\The [src] shatters, and the frame collapses!</span>", "<span class='warning'>You hear metal collapsing and glass shattering.</span>")
|
||||
new /obj/item/weapon/table_parts/glass(loc)
|
||||
PoolOrNew(/obj/item/weapon/shard, loc)
|
||||
new /obj/item/weapon/shard(loc)
|
||||
if(prob(50)) //50% chance to spawn two shards
|
||||
PoolOrNew(/obj/item/weapon/shard, loc)
|
||||
new /obj/item/weapon/shard(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table/glass/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
|
||||
@@ -53,7 +53,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
// This should result in the same materials used to make the window.
|
||||
/obj/structure/window/proc/destroy()
|
||||
for(var/i=0;i<sheets;i++)
|
||||
PoolOrNew(shardtype, loc)
|
||||
new shardtype(loc)
|
||||
|
||||
if(reinf)
|
||||
new /obj/item/stack/rods(loc)
|
||||
@@ -219,7 +219,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
else if(istype(W, /obj/item/weapon/wrench) && !anchored && health > 7) //Disassemble deconstructed window into parts
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
for(var/i=0;i<sheets;i++)
|
||||
var/obj/item/stack/sheet/glass/NG = PoolOrNew(glasstype, src.loc)
|
||||
var/obj/item/stack/sheet/glass/NG = new glasstype(src.loc)
|
||||
for (var/obj/item/stack/sheet/glass/G in src.loc) //Stack em up
|
||||
if(G==NG)
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user