mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 03:55:11 +01:00
Merge pull request #10967 from astralenigma/digfix
Digging gets the same progress bar as minning.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -432,9 +432,8 @@ var/global/list/rockTurfEdgeCache
|
||||
P.playDigSound()
|
||||
|
||||
if(do_after(user,P.digspeed, target = src))
|
||||
if(istype(src, /turf/simulated/mineral)) //sanity check against turf being deleted during digspeed delay
|
||||
if(istype(src, /turf/simulated/mineral))
|
||||
user << "<span class='notice'>You finish cutting into the rock.</span>"
|
||||
P.update_icon()
|
||||
gets_drilled(user)
|
||||
feedback_add_details("pick_used_mining","[P.name]")
|
||||
else
|
||||
@@ -548,27 +547,14 @@ var/global/list/rockTurfEdgeCache
|
||||
//note that this proc does not call ..()
|
||||
if(!W || !user)
|
||||
return 0
|
||||
|
||||
if ((istype(W, /obj/item/weapon/shovel)))
|
||||
var/turf/T = user.loc
|
||||
if (!( istype(T, /turf) ))
|
||||
return
|
||||
|
||||
if (dug)
|
||||
user << "<span class='warning'>This area has already been dug!</span>"
|
||||
return
|
||||
|
||||
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 ((istype(W, /obj/item/weapon/pickaxe)))
|
||||
var/digging_speed = 0
|
||||
if (istype(W, /obj/item/weapon/shovel))
|
||||
var/obj/item/weapon/shovel/S = W
|
||||
digging_speed = S.digspeed
|
||||
else if (istype(W, /obj/item/weapon/pickaxe))
|
||||
var/obj/item/weapon/pickaxe/P = W
|
||||
digging_speed = P.digspeed
|
||||
if (digging_speed)
|
||||
var/turf/T = user.loc
|
||||
if (!( istype(T, /turf) ))
|
||||
return
|
||||
@@ -579,13 +565,13 @@ 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, digging_speed, target = src))
|
||||
if(istype(src, /turf/simulated/floor/plating/asteroid))
|
||||
user << "<span class='notice'>You dig a hole.</span>"
|
||||
gets_dug()
|
||||
feedback_add_details("pick_used_mining","[W.name]")
|
||||
|
||||
if(istype(W,/obj/item/weapon/storage/bag/ore))
|
||||
var/obj/item/weapon/storage/bag/ore/S = W
|
||||
if(S.collection_mode == 1)
|
||||
|
||||
Reference in New Issue
Block a user