Digging gets the same progress bar as minning.

Fixes #10854
This commit is contained in:
Rui Neves Carvalho
2015-08-01 08:18:33 +01:00
parent 7b94435e9c
commit f0ebee0467
3 changed files with 55 additions and 12 deletions
+1
View File
@@ -129,6 +129,7 @@
flags = CONDUCT
slot_flags = SLOT_BELT
force = 8.0
var/digspeed = 20
throwforce = 4.0
item_state = "shovel"
w_class = 3.0
+18 -12
View File
@@ -550,7 +550,9 @@ var/global/list/rockTurfEdgeCache
return 0
if ((istype(W, /obj/item/weapon/shovel)))
var/obj/item/weapon/shovel/S = W
var/turf/T = user.loc
if (!( istype(T, /turf) ))
return
@@ -560,12 +562,14 @@ var/global/list/rockTurfEdgeCache
user << "<span class='notice'>You start digging...</span>"
playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1) //FUCK YO RUSTLE I GOT'S THE DIGS SOUND HERE
sleep(20)
if ((user.loc == T && user.get_active_hand() == W))
user << "<span class='notice'>You dig a hole.</span>"
gets_dug()
return
if(do_after(user,S.digspeed, target = src))
if(istype(src, /turf/simulated/floor/plating/asteroid)) //sanity check against turf being deleted during digspeed delay
user << "<span class='notice'>You dig a hole.</span>"
S.update_icon()
gets_dug()
feedback_add_details("pick_used_mining","[S.name]")
if ((istype(W, /obj/item/weapon/pickaxe)))
var/obj/item/weapon/pickaxe/P = W
@@ -579,12 +583,14 @@ var/global/list/rockTurfEdgeCache
user << "<span class='notice'>You start digging...</span>"
playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1) //FUCK YO RUSTLE I GOT'S THE DIGS SOUND HERE
sleep(P.digspeed)
if ((user.loc == T && user.get_active_hand() == W))
user << "<span class='notice'>You dig a hole.</span>"
gets_dug()
return
if(do_after(user,P.digspeed, target = src))
if(istype(src, /turf/simulated/floor/plating/asteroid)) //sanity check against turf being deleted during digspeed delay
user << "<span class='notice'>You dig a hole.</span>"
P.update_icon()
gets_dug()
feedback_add_details("pick_used_mining","[P.name]")
if(istype(W,/obj/item/weapon/storage/bag/ore))
var/obj/item/weapon/storage/bag/ore/S = W
+36
View File
@@ -0,0 +1,36 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# spellcheck (typo fixes)
# experiment
# tgs (TG-ported fixes?)
#################################
# Your name.
author: Astralenigma
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit.
# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog.
changes:
- tweak: "Added a progress bar to digging."