mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 18:22:14 +00:00
Added some new area sprites for the mining station. Lots of new sprites by Petethegoat. Made sprite for the disposal delivery chute facing the other way. Moved the mining-related sprites to their own file. Updated the Mining Consoles, and the 3 mining production machines with new sprites. UPDATED CHANGELOG. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2013 316c924e-a436-60f5-8080-3fe189b3f50e
47 lines
1.1 KiB
Plaintext
47 lines
1.1 KiB
Plaintext
/**********************Unloading unit**************************/
|
|
|
|
|
|
/obj/machinery/mineral/unloading_machine
|
|
name = "Unloading machine"
|
|
icon = 'mining_machines.dmi'
|
|
icon_state = "unloader"
|
|
density = 1
|
|
anchored = 1.0
|
|
var/obj/machinery/mineral/input = null
|
|
var/obj/machinery/mineral/output = null
|
|
|
|
|
|
/obj/machinery/mineral/unloading_machine/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
|
|
processing_items.Add(src)
|
|
return
|
|
return
|
|
|
|
/obj/machinery/mineral/unloading_machine/process()
|
|
if (src.output && src.input)
|
|
if (locate(/obj/ore_box, input.loc))
|
|
var/obj/ore_box/BOX = locate(/obj/ore_box, input.loc)
|
|
var/i = 0
|
|
for (var/obj/item/weapon/ore/O in BOX.contents)
|
|
BOX.contents -= O
|
|
O.loc = output.loc
|
|
i++
|
|
if (i>=10)
|
|
return
|
|
if (locate(/obj/item, input.loc))
|
|
var/obj/item/O
|
|
var/i
|
|
for (i = 0; i<10; i++)
|
|
O = locate(/obj/item, input.loc)
|
|
if (O)
|
|
O.loc = src.output.loc
|
|
else
|
|
return
|
|
return |