Merge pull request #4650 from Ccomp5950/damn_boulders

Oversight, miners can now bump mine boulders just like the rock around them
This commit is contained in:
DJSnapshot
2014-03-31 00:27:04 -07:00

View File

@@ -39,6 +39,7 @@
var/excavation_level = 0 var/excavation_level = 0
var/datum/geosample/geological_data var/datum/geosample/geological_data
var/datum/artifact_find/artifact_find var/datum/artifact_find/artifact_find
var/last_act = 0
/obj/structure/boulder/New() /obj/structure/boulder/New()
icon_state = "boulder[rand(1,4)]" icon_state = "boulder[rand(1,4)]"
@@ -68,8 +69,14 @@
if (istype(W, /obj/item/weapon/pickaxe)) if (istype(W, /obj/item/weapon/pickaxe))
var/obj/item/weapon/pickaxe/P = W 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]." user << "\red You start [P.drill_verb] [src]."
if(!do_after(user,P.digspeed)) if(!do_after(user,P.digspeed))
return return
@@ -97,3 +104,22 @@
user.visible_message("<font color='red'><b>[src] suddenly crumbles away.</b></font>",\ user.visible_message("<font color='red'><b>[src] suddenly crumbles away.</b></font>",\
"\blue [src] has been whittled away under your careful excavation, but there was nothing of interest inside.") "\blue [src] has been whittled away under your careful excavation, but there was nothing of interest inside.")
del(src) 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)