From 12b5db483e212cc5deaf83704a35f33ce0244128 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Sat, 29 Mar 2014 16:07:47 -0500 Subject: [PATCH] Oversight, miners can now bump mine boulders just like the rock around them. Screw you xenoarch code, screw you. --- .../xenoarchaeology/artifact/artifact.dm | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/code/modules/research/xenoarchaeology/artifact/artifact.dm b/code/modules/research/xenoarchaeology/artifact/artifact.dm index 6300a6d71a4..ad794517942 100644 --- a/code/modules/research/xenoarchaeology/artifact/artifact.dm +++ b/code/modules/research/xenoarchaeology/artifact/artifact.dm @@ -39,6 +39,7 @@ var/excavation_level = 0 var/datum/geosample/geological_data var/datum/artifact_find/artifact_find + var/last_act = 0 /obj/structure/boulder/New() icon_state = "boulder[rand(1,4)]" @@ -68,8 +69,14 @@ if (istype(W, /obj/item/weapon/pickaxe)) var/obj/item/weapon/pickaxe/P = W + if(last_act + P.digspeed > world.time)//prevents message spam + return + last_act = world.time + user << "\red You start [P.drill_verb] [src]." + + if(!do_after(user,P.digspeed)) return @@ -97,3 +104,22 @@ user.visible_message("[src] suddenly crumbles away.",\ "\blue [src] has been whittled away under your careful excavation, but there was nothing of interest inside.") del(src) + +/obj/structure/boulder/Bumped(AM) + . = ..() + if(istype(AM,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = AM + if((istype(H.l_hand,/obj/item/weapon/pickaxe)) && (!H.hand)) + attackby(H.l_hand,H) + else if((istype(H.r_hand,/obj/item/weapon/pickaxe)) && H.hand) + attackby(H.r_hand,H) + + else if(istype(AM,/mob/living/silicon/robot)) + var/mob/living/silicon/robot/R = AM + if(istype(R.module_active,/obj/item/weapon/pickaxe)) + attackby(R.module_active,R) + + else if(istype(AM,/obj/mecha)) + var/obj/mecha/M = AM + if(istype(M.selected,/obj/item/mecha_parts/mecha_equipment/tool/drill)) + M.selected.action(src)