Merge pull request #3680 from Crazylemon64/miner_walk_ore_collection

Miners can now collect ore by walking on it while having an ore satchel on
This commit is contained in:
Fox McCloud
2016-02-24 18:29:02 -05:00
2 changed files with 23 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)
+23
View File
@@ -16,6 +16,29 @@
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
for(var/thing in H.get_body_slots())
if(istype(thing, /obj/item/weapon/storage/bag/ore))
OB = thing
break
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"