diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index a3a7d0e648..c7e9296991 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -25,6 +25,19 @@ icon_scale_x = 1.2 icon_scale_y = 1.2 +/obj/mecha/working/ripley/Move() + . = ..() + if(.) + collect_ore() + +/obj/mecha/working/ripley/proc/collect_ore() + if(locate(/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp) in equipment) + var/obj/structure/ore_box/ore_box = locate(/obj/structure/ore_box) in cargo + if(ore_box) + for(var/obj/item/weapon/ore/ore in range(1, src)) + if(ore.Adjacent(src) && ((get_dir(src, ore) & dir) || ore.loc == loc)) //we can reach it and it's in front of us? grab it! + ore.forceMove(ore_box) + /obj/mecha/working/ripley/Destroy() for(var/atom/movable/A in src.cargo) A.loc = loc