mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
* Fix ore handling. Fixes all the problems caused by #25562 Removed that dumb //legacy material var. Cleans up CC_PER_SHEET amounts. Fix goon ores not having corresponding materials (so they're less borked). Fixed bugs in stacks where update_materials() wasn't running. Fixed recycling not correctly handling amounts now that the furnace works in sheets instead of CCs. Remove Ore Redemption Machine because it wasn't used and refactoring it to work wouldn't be worth the effort. Ore processor/recycling furnace do use CC counts internally now but don't display them like this. Back to how it was. Other cleanup probably Fixes #25584 * Bring back ore redemption.
36 lines
976 B
Plaintext
36 lines
976 B
Plaintext
/**********************Unloading unit**************************/
|
|
|
|
|
|
/obj/machinery/mineral/unloading_machine
|
|
name = "unloading machine"
|
|
desc = "Used to unload ore from ore boxes."
|
|
icon = 'icons/obj/machines/mining_machines.dmi'
|
|
icon_state = "unloader"
|
|
density = 1
|
|
anchored = 1
|
|
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
|
|
|
|
/obj/machinery/mineral/unloading_machine/process()
|
|
if(output && input)
|
|
var/obj/structure/ore_box/BOX = locate(/obj/structure/ore_box, input.loc)
|
|
if (BOX)
|
|
BOX.dump_everything(get_turf(output))
|
|
|
|
var/obj/item/I = locate(/obj/item, input.loc)
|
|
if(I)
|
|
I.forceMove(get_turf(output))
|