Portable generator Fix

Portable generators properly drop their fuel when deconstructed
Portable generators need their cover open to be destructed now
Fixed a runtime error when building a portable generator with a 2s wire
This commit is contained in:
GauHelldragon
2012-12-12 02:49:29 -08:00
parent aa7d0eec6c
commit 0db60b65c7
2 changed files with 12 additions and 2 deletions
+11 -1
View File
@@ -213,12 +213,22 @@ display round(lastgen) and plasmatank amount
user << "\blue You open the access panel."
else
user << "\blue You close the access panel."
else if(istype(O, /obj/item/weapon/crowbar) && !open)
else if(istype(O, /obj/item/weapon/crowbar) && open)
var/obj/machinery/constructable_frame/machine_frame/new_frame = new /obj/machinery/constructable_frame/machine_frame(src.loc)
for(var/obj/item/I in component_parts)
if(I.reliability < 100)
I.crit_fail = 1
I.loc = src.loc
while ( sheets > 0 )
var/obj/item/stack/sheet/G = new sheet_path(src.loc)
if ( sheets > 50 )
G.amount = 50
else
G.amount = sheets
sheets -= G.amount
new_frame.state = 2
new_frame.icon_state = "box_1"
del(src)