Merge pull request #10642 from VOREStation/upstream-merge-8125

[MIRROR] ripleys autoscoop ore in an aoe
This commit is contained in:
Novacat
2021-06-14 07:57:53 -04:00
committed by Chompstation Bot
parent 7e0da20bae
commit 00fbf2b6ed

View File

@@ -27,6 +27,19 @@
icon_scale_x = 1.2 icon_scale_x = 1.2
icon_scale_y = 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() /obj/mecha/working/ripley/Destroy()
for(var/atom/movable/A in src.cargo) for(var/atom/movable/A in src.cargo)
A.loc = loc A.loc = loc