mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
-Reduced the chunks of code about minerals in door_assembly.dm Preeeetty much this commit is just to update all the files to the new path of the minerals. From here, if I can, I'll start changing one by one to remove the huge chunks of code. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5087 316c924e-a436-60f5-8080-3fe189b3f50e
89 lines
2.8 KiB
Plaintext
89 lines
2.8 KiB
Plaintext
/**********************Mineral purifier (not used, replaced with mineral processing unit)**************************/
|
|
|
|
/obj/machinery/mineral/purifier
|
|
name = "Ore Purifier"
|
|
desc = "A machine which makes building material out of ores"
|
|
icon = 'icons/obj/computer.dmi'
|
|
icon_state = "aiupload"
|
|
var/obj/machinery/mineral/input = null
|
|
var/obj/machinery/mineral/output = null
|
|
var/processed = 0
|
|
var/processing = 0
|
|
density = 1
|
|
anchored = 1.0
|
|
|
|
/obj/machinery/mineral/purifier/attack_hand(user as mob)
|
|
|
|
if(processing == 1)
|
|
user << "The machine is processing"
|
|
return
|
|
|
|
var/dat
|
|
dat = text("input connection status: ")
|
|
if (input)
|
|
dat += text("<b><font color='green'>CONNECTED</font></b>")
|
|
else
|
|
dat += text("<b><font color='red'>NOT CONNECTED</font></b>")
|
|
dat += text("<br>output connection status: ")
|
|
if (output)
|
|
dat += text("<b><font color='green'>CONNECTED</font></b>")
|
|
else
|
|
dat += text("<b><font color='red'>NOT CONNECTED</font></b>")
|
|
|
|
dat += text("<br><br><A href='?src=\ref[src];purify=[input]'>Purify</A>")
|
|
|
|
dat += text("<br><br>found: <font color='green'><b>[processed]</b></font>")
|
|
user << browse("[dat]", "window=purifier")
|
|
|
|
/obj/machinery/mineral/purifier/Topic(href, href_list)
|
|
if(..())
|
|
return
|
|
usr.machine = src
|
|
src.add_fingerprint(usr)
|
|
if(href_list["purify"])
|
|
if (src.output)
|
|
processing = 1;
|
|
var/obj/item/weapon/ore/O
|
|
processed = 0;
|
|
while(locate(/obj/item/weapon/ore, input.loc))
|
|
O = locate(/obj/item/weapon/ore, input.loc)
|
|
if (istype(O,/obj/item/weapon/ore/iron))
|
|
new /obj/item/stack/sheet/metal(output.loc)
|
|
del(O)
|
|
if (istype(O,/obj/item/weapon/ore/diamond))
|
|
new /obj/item/stack/sheet/mineral/diamond(output.loc)
|
|
del(O)
|
|
if (istype(O,/obj/item/weapon/ore/plasma))
|
|
new /obj/item/stack/sheet/mineral/plasma(output.loc)
|
|
del(O)
|
|
if (istype(O,/obj/item/weapon/ore/gold))
|
|
new /obj/item/stack/sheet/mineral/gold(output.loc)
|
|
del(O)
|
|
if (istype(O,/obj/item/weapon/ore/silver))
|
|
new /obj/item/stack/sheet/mineral/silver(output.loc)
|
|
del(O)
|
|
if (istype(O,/obj/item/weapon/ore/uranium))
|
|
new /obj/item/weapon/ore/mineral/uranium(output.loc)
|
|
del(O)
|
|
/*if (istype(O,/obj/item/weapon/ore/adamantine))
|
|
new /obj/item/weapon/ore/adamantine(output.loc)
|
|
del(O)*/ //Dunno what this area does so I'll keep it commented out for now -Durandan
|
|
processed++
|
|
sleep(5);
|
|
processing = 0;
|
|
src.updateUsrDialog()
|
|
return
|
|
|
|
|
|
/obj/machinery/mineral/purifier/New()
|
|
..()
|
|
spawn( 5 )
|
|
for (var/dir in cardinal)
|
|
src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
|
|
if(src.input) break
|
|
for (var/dir in cardinal)
|
|
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
|
|
if(src.output) break
|
|
return
|
|
return
|