Miners can now collect ore by walking on it while having an ore satchel on

This commit is contained in:
Crazylemon64
2016-02-23 06:30:03 -08:00
parent 0266fe9109
commit 343bbb28c1
2 changed files with 25 additions and 16 deletions
-16
View File
@@ -542,22 +542,6 @@ var/global/list/rockTurfEdgeCache
for (var/turf/t in range(1,src))
t.updateMineralOverlays()
/turf/simulated/floor/plating/airless/asteroid/Entered(atom/movable/M as mob|obj)
..()
if(istype(M,/mob/living/silicon/robot))
var/mob/living/silicon/robot/R = M
if(istype(R.module, /obj/item/weapon/robot_module/miner))
if(istype(R.module_state_1,/obj/item/weapon/storage/bag/ore))
attackby(R.module_state_1,R)
else if(istype(R.module_state_2,/obj/item/weapon/storage/bag/ore))
attackby(R.module_state_2,R)
else if(istype(R.module_state_3,/obj/item/weapon/storage/bag/ore))
attackby(R.module_state_3,R)
else
return
/turf/simulated/floor/plating/airless/asteroid/cave
var/length = 100
var/mob_spawn_list = list("Goldgrub" = 1, "Goliath" = 5, "Basilisk" = 4, "Hivelord" = 3)
+25
View File
@@ -16,6 +16,31 @@
user << "<span class='info'>Not enough fuel to smelt [src].</span>"
..()
/obj/item/weapon/ore/Crossed(AM as mob|obj)
var/obj/item/weapon/storage/bag/ore/OB
var/turf/simulated/floor/F = get_turf(src)
if(loc != F)
return ..()
if(ishuman(AM))
var/mob/living/carbon/human/H = AM
OB = H.is_in_hands(/obj/item/weapon/storage/bag/ore)
if(!OB)
if(istype(H.s_store, /obj/item/weapon/storage/bag/ore))
OB = H.s_store
else if(istype(H.belt, /obj/item/weapon/storage/bag/ore))
OB = H.belt
else if(isrobot(AM))
var/mob/living/silicon/robot/R = AM
for(var/thing in R.get_all_slots())
if(istype(thing, /obj/item/weapon/storage/bag/ore))
OB = thing
break
if(OB && istype(F, /turf/simulated/floor/plating/airless/asteroid))
F.attackby(OB, AM)
return ..()
/obj/item/weapon/ore/uranium
name = "uranium ore"
icon_state = "Uranium ore"