Files
Bubberstation/code/modules/vehicles/mecha/working/working.dm
TiviPlus 0eaab0bc54 Grep for space indentation (#54850)
#54604 atomizing
Since a lot of the space indents are in lists ill atomize those later
2020-11-30 12:48:40 -05:00

29 lines
924 B
Plaintext

/obj/vehicle/sealed/mecha/working
internal_damage_threshold = 60
allow_diagonal_movement = TRUE
/// Handles an internal ore box for working mechs
var/obj/structure/ore_box/box
/obj/vehicle/sealed/mecha/working/Destroy()
QDEL_NULL(box)
return ..()
/obj/vehicle/sealed/mecha/working/Move()
. = ..()
if(.)
collect_ore()
/**
* Handles collecting ore.
*
* Checks for a hydraulic clamp or ore box manager and if it finds an ore box inside them puts ore in the ore box.
*/
/obj/vehicle/sealed/mecha/working/proc/collect_ore()
if(!box)
return
if(!(locate(/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp) in equipment) && !(locate(/obj/item/mecha_parts/mecha_equipment/orebox_manager) in equipment))
return
for(var/obj/item/stack/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(box)