mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-24 17:11:40 +00:00
Fixes assorted mining toolspeed uses
This commit is contained in:
@@ -127,9 +127,8 @@
|
||||
/obj/structure/simple_door/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
if(istype(W,/obj/item/weapon/pickaxe))
|
||||
var/obj/item/weapon/pickaxe/digTool = W
|
||||
visible_message("<span class='danger'>[user] starts digging [src]!</span>")
|
||||
if(do_after(user,digTool.digspeed*hardness) && src)
|
||||
if(do_after(user,40 / W.get_tool_quality(TOOL_MINING) * hardness) && src)
|
||||
visible_message("<span class='danger'>[user] finished digging [src]!</span>")
|
||||
Dismantle()
|
||||
else if(istype(W,/obj/item/weapon)) //not sure, can't not just weapons get passed to this proc?
|
||||
|
||||
@@ -266,7 +266,7 @@
|
||||
var/obj/item/weapon/pickaxe/P = W
|
||||
dismantle_verb = P.drill_verb
|
||||
dismantle_sound = P.drill_sound
|
||||
cut_delay -= P.digspeed
|
||||
cut_delay -= 40 / P.get_tool_quality(TOOL_MINING)
|
||||
dismantle_toolspeed = W.get_tool_speed(TOOL_MINING)
|
||||
|
||||
if(dismantle_toolspeed)
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
item_state = "jackhammer"
|
||||
w_class = ITEMSIZE_LARGE
|
||||
matter = list(MAT_STEEL = 3750)
|
||||
var/digspeed = 40 //moving the delay to an item var so R&D can make improved picks. --NEO
|
||||
var/sand_dig = FALSE // does this thing dig sand?
|
||||
origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINEERING = 1)
|
||||
attack_verb = list("hit", "pierced", "sliced", "attacked")
|
||||
var/drill_sound = "pickaxe"
|
||||
@@ -30,42 +28,42 @@
|
||||
|
||||
var/excavation_amount = 200
|
||||
var/destroy_artefacts = FALSE // some mining tools will destroy artefacts completely while avoiding side-effects.
|
||||
tool_qualities = list(TOOL_MINING = TOOL_QUALITY_MEDIOCRE)
|
||||
|
||||
/obj/item/weapon/pickaxe/silver
|
||||
name = "silver pickaxe"
|
||||
icon_state = "spickaxe"
|
||||
item_state = "spickaxe"
|
||||
digspeed = 30
|
||||
origin_tech = list(TECH_MATERIAL = 3)
|
||||
desc = "This makes no metallurgic sense."
|
||||
tool_qualities = list(TOOL_MINING = TOOL_QUALITY_STANDARD)
|
||||
|
||||
/obj/item/weapon/pickaxe/drill
|
||||
name = "advanced mining drill" // Can dig sand as well!
|
||||
icon_state = "handdrill"
|
||||
item_state = "jackhammer"
|
||||
digspeed = 30
|
||||
sand_dig = TRUE
|
||||
origin_tech = list(TECH_MATERIAL = 2, TECH_POWER = 3, TECH_ENGINEERING = 2)
|
||||
desc = "Yours is the drill that will pierce through the rock walls."
|
||||
drill_verb = "drilling"
|
||||
tool_qualities = list(TOOL_MINING = TOOL_QUALITY_STANDARD, TOOL_SHOVEL = TOOL_QUALITY_STANDARD)
|
||||
|
||||
/obj/item/weapon/pickaxe/jackhammer
|
||||
name = "sonic jackhammer"
|
||||
icon_state = "jackhammer"
|
||||
item_state = "jackhammer"
|
||||
digspeed = 20 //faster than drill, but cannot dig
|
||||
origin_tech = list(TECH_MATERIAL = 3, TECH_POWER = 2, TECH_ENGINEERING = 2)
|
||||
desc = "Cracks rocks with sonic blasts, perfect for killing cave lizards."
|
||||
drill_verb = "hammering"
|
||||
tool_qualities = list(TOOL_MINING = TOOL_QUALITY_DECENT)
|
||||
|
||||
/obj/item/weapon/pickaxe/gold
|
||||
name = "golden pickaxe"
|
||||
icon_state = "gpickaxe"
|
||||
item_state = "gpickaxe"
|
||||
digspeed = 20
|
||||
origin_tech = list(TECH_MATERIAL = 4)
|
||||
desc = "This makes no metallurgic sense."
|
||||
drill_verb = "picking"
|
||||
tool_qualities = list(TOOL_MINING = TOOL_QUALITY_DECENT)
|
||||
|
||||
/obj/item/weapon/pickaxe/plasmacutter
|
||||
name = "plasma cutter"
|
||||
@@ -73,41 +71,39 @@
|
||||
item_state = "gun"
|
||||
w_class = ITEMSIZE_NORMAL //it is smaller than the pickaxe
|
||||
damtype = "fire"
|
||||
digspeed = 20 //Can slice though normal walls, all girders, or be used in reinforced wall deconstruction/ light thermite on fire
|
||||
origin_tech = list(TECH_MATERIAL = 4, TECH_PHORON = 3, TECH_ENGINEERING = 3)
|
||||
desc = "A rock cutter that uses bursts of hot plasma. You could use it to cut limbs off of xenos! Or, you know, mine stuff."
|
||||
drill_verb = "cutting"
|
||||
drill_sound = 'sound/items/Welder.ogg'
|
||||
sharp = 1
|
||||
edge = 1
|
||||
tool_qualities = list(TOOL_MINING = TOOL_QUALITY_DECENT)
|
||||
|
||||
/obj/item/weapon/pickaxe/diamond
|
||||
name = "diamond pickaxe"
|
||||
icon_state = "dpickaxe"
|
||||
item_state = "dpickaxe"
|
||||
digspeed = 10
|
||||
origin_tech = list(TECH_MATERIAL = 6, TECH_ENGINEERING = 4)
|
||||
desc = "A pickaxe with a diamond pick head."
|
||||
drill_verb = "picking"
|
||||
tool_qualities = list(TOOL_MINING = TOOL_QUALITY_GOOD)
|
||||
|
||||
/obj/item/weapon/pickaxe/diamonddrill //When people ask about the badass leader of the mining tools, they are talking about ME!
|
||||
name = "diamond mining drill"
|
||||
icon_state = "diamonddrill"
|
||||
item_state = "jackhammer"
|
||||
digspeed = 5 //Digs through walls, girders, and can dig up sand
|
||||
sand_dig = TRUE
|
||||
origin_tech = list(TECH_MATERIAL = 6, TECH_POWER = 4, TECH_ENGINEERING = 5)
|
||||
desc = "Yours is the drill that will pierce the heavens!"
|
||||
drill_verb = "drilling"
|
||||
tool_qualities = list(TOOL_MINING = TOOL_QUALITY_BEST, TOOL_SHOVEL = TOOL_QUALITY_BEST)
|
||||
|
||||
/obj/item/weapon/pickaxe/borgdrill
|
||||
name = "enhanced sonic jackhammer"
|
||||
icon_state = "jackhammer"
|
||||
item_state = "jackhammer"
|
||||
digspeed = 15
|
||||
sand_dig = TRUE
|
||||
desc = "Cracks rocks with sonic blasts. This one seems like an improved design."
|
||||
drill_verb = "hammering"
|
||||
tool_qualities = list(TOOL_MINING = TOOL_QUALITY_DECENT, TOOL_SHOVEL = TOOL_QUALITY_DECENT)
|
||||
|
||||
/*****************************Shovel********************************/
|
||||
|
||||
@@ -126,7 +122,6 @@
|
||||
attack_verb = list("bashed", "bludgeoned", "thrashed", "whacked")
|
||||
sharp = 0
|
||||
edge = 1
|
||||
var/digspeed = 40
|
||||
|
||||
/obj/item/weapon/shovel/wood
|
||||
icon_state = "whiteshovel"
|
||||
|
||||
@@ -352,39 +352,7 @@ var/list/mining_overlay_cache = list()
|
||||
return
|
||||
|
||||
if(!density)
|
||||
var/valid_tool = 0
|
||||
var/digspeed = 40
|
||||
|
||||
if(istype(W, /obj/item/weapon/shovel))
|
||||
var/obj/item/weapon/shovel/S = W
|
||||
valid_tool = 1
|
||||
digspeed = S.digspeed
|
||||
|
||||
if(istype(W, /obj/item/weapon/pickaxe))
|
||||
var/obj/item/weapon/pickaxe/P = W
|
||||
if(P.sand_dig)
|
||||
valid_tool = 1
|
||||
digspeed = P.digspeed
|
||||
|
||||
|
||||
if(valid_tool)
|
||||
if (sand_dug)
|
||||
to_chat(user, "<span class='warning'>This area has already been dug.</span>")
|
||||
return
|
||||
|
||||
var/turf/T = user.loc
|
||||
if (!(istype(T)))
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You start digging.</span>")
|
||||
playsound(user, 'sound/effects/rustle1.ogg', 50, 1)
|
||||
|
||||
if(!do_after(user,digspeed)) return
|
||||
|
||||
to_chat(user, "<span class='notice'>You dug a hole.</span>")
|
||||
GetDrilled()
|
||||
|
||||
else if(istype(W,/obj/item/weapon/storage/bag/ore))
|
||||
if(istype(W,/obj/item/weapon/storage/bag/ore))
|
||||
var/obj/item/weapon/storage/bag/ore/S = W
|
||||
if(S.collection_mode)
|
||||
for(var/obj/item/weapon/ore/O in contents)
|
||||
@@ -423,20 +391,38 @@ var/list/mining_overlay_cache = list()
|
||||
to_chat(user, "<span class='warning'>The plating is going to need some support.</span>")
|
||||
return
|
||||
|
||||
else if(W.get_tool_quality(TOOL_SHOVEL))
|
||||
var/digspeed = 40 / W.get_tool_quality(TOOL_SHOVEL)
|
||||
if(sand_dug)
|
||||
to_chat(user, "<span class='warning'>This area has already been dug.</span>")
|
||||
return
|
||||
|
||||
var/turf/T = user.loc
|
||||
if(!istype(T))
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You start digging.</span>")
|
||||
playsound(user, 'sound/effects/rustle1.ogg', 50, 1)
|
||||
|
||||
if(!do_after(user,digspeed))
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You dug a hole.</span>")
|
||||
GetDrilled()
|
||||
|
||||
else
|
||||
if (istype(W, /obj/item/device/core_sampler))
|
||||
if(istype(W, /obj/item/device/core_sampler))
|
||||
geologic_data.UpdateNearbyArtifactInfo(src)
|
||||
var/obj/item/device/core_sampler/C = W
|
||||
C.sample_item(src, user)
|
||||
return
|
||||
|
||||
if (istype(W, /obj/item/device/depth_scanner))
|
||||
if(istype(W, /obj/item/device/depth_scanner))
|
||||
var/obj/item/device/depth_scanner/C = W
|
||||
C.scan_atom(user, src)
|
||||
return
|
||||
|
||||
if (istype(W, /obj/item/device/measuring_tape))
|
||||
if(istype(W, /obj/item/device/measuring_tape))
|
||||
var/obj/item/device/measuring_tape/P = W
|
||||
user.visible_message("<span class='notice'>\The [user] extends \a [P] towards \the [src].</span>","<span class='notice'>You extend \the [P] towards \the [src].</span>")
|
||||
if(do_after(user, 15))
|
||||
@@ -453,12 +439,13 @@ var/list/mining_overlay_cache = list()
|
||||
to_chat(user, "<span class='notice'>\The [src] has been excavated to a depth of [excavation_level]cm.</span>")
|
||||
return
|
||||
|
||||
if (istype(W, /obj/item/weapon/pickaxe))
|
||||
if(!istype(user.loc, /turf))
|
||||
if(istype(W, /obj/item/weapon/pickaxe))
|
||||
if(!isturf(user.loc))
|
||||
return
|
||||
|
||||
var/digspeed = 40 / W.get_tool_quality(TOOL_MINING)
|
||||
var/obj/item/weapon/pickaxe/P = W
|
||||
if(last_act + P.digspeed > world.time)//prevents message spam
|
||||
if(last_act + digspeed > world.time)//prevents message spam
|
||||
return
|
||||
last_act = world.time
|
||||
|
||||
@@ -474,7 +461,7 @@ var/list/mining_overlay_cache = list()
|
||||
wreckfinds(P.destroy_artefacts)
|
||||
to_chat(user, "<span class='notice'>You start [P.drill_verb][fail_message].</span>")
|
||||
|
||||
if(do_after(user,P.digspeed))
|
||||
if(do_after(user,digspeed))
|
||||
|
||||
if(finds && finds.len)
|
||||
var/datum/find/F = finds[1]
|
||||
|
||||
@@ -50,14 +50,15 @@
|
||||
|
||||
if(istype(I, /obj/item/weapon/pickaxe))
|
||||
var/obj/item/weapon/pickaxe/P = I
|
||||
var/digspeed = 40 / P.get_tool_quality(TOOL_MINING)
|
||||
|
||||
if(last_act + P.digspeed > world.time)//prevents message spam
|
||||
if(last_act + digspeed > world.time)//prevents message spam
|
||||
return
|
||||
last_act = world.time
|
||||
|
||||
to_chat(user, "<span class='warning'>You start [P.drill_verb] [src].</span>")
|
||||
|
||||
if(!do_after(user, P.digspeed))
|
||||
if(!do_after(user, digspeed))
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You finish [P.drill_verb] [src].</span>")
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
icon_state = "pick_brush"
|
||||
item_state = "syringe_0"
|
||||
slot_flags = SLOT_EARS
|
||||
digspeed = 20
|
||||
force = 0
|
||||
throwforce = 0
|
||||
desc = "Thick metallic wires for clearing away dust and loose scree (1 centimetre excavation depth)."
|
||||
@@ -12,6 +11,7 @@
|
||||
drill_sound = 'sound/weapons/thudswoosh.ogg'
|
||||
drill_verb = "brushing"
|
||||
w_class = ITEMSIZE_SMALL
|
||||
tool_qualities = list(TOOL_MINING = TOOL_QUALITY_DECENT)
|
||||
|
||||
/obj/item/weapon/pickaxe/one_pick
|
||||
name = "2cm pick"
|
||||
@@ -19,12 +19,12 @@
|
||||
icon_state = "pick1"
|
||||
item_state = "syringe_0"
|
||||
force = 2
|
||||
digspeed = 20
|
||||
desc = "A miniature excavation tool for precise digging (2 centimetre excavation depth)."
|
||||
excavation_amount = 2
|
||||
drill_sound = 'sound/items/Screwdriver.ogg'
|
||||
drill_verb = "delicately picking"
|
||||
w_class = ITEMSIZE_SMALL
|
||||
tool_qualities = list(TOOL_MINING = TOOL_QUALITY_DECENT)
|
||||
|
||||
/obj/item/weapon/pickaxe/two_pick
|
||||
name = "4cm pick"
|
||||
@@ -32,12 +32,12 @@
|
||||
icon_state = "pick2"
|
||||
item_state = "syringe_0"
|
||||
force = 2
|
||||
digspeed = 20
|
||||
desc = "A miniature excavation tool for precise digging (4 centimetre excavation depth)."
|
||||
excavation_amount = 4
|
||||
drill_sound = 'sound/items/Screwdriver.ogg'
|
||||
drill_verb = "delicately picking"
|
||||
w_class = ITEMSIZE_SMALL
|
||||
tool_qualities = list(TOOL_MINING = TOOL_QUALITY_DECENT)
|
||||
|
||||
/obj/item/weapon/pickaxe/three_pick
|
||||
name = "6cm pick"
|
||||
@@ -45,12 +45,12 @@
|
||||
icon_state = "pick3"
|
||||
item_state = "syringe_0"
|
||||
force = 3
|
||||
digspeed = 20
|
||||
desc = "A miniature excavation tool for precise digging (6 centimetre excavation depth)."
|
||||
excavation_amount = 6
|
||||
drill_sound = 'sound/items/Screwdriver.ogg'
|
||||
drill_verb = "delicately picking"
|
||||
w_class = ITEMSIZE_SMALL
|
||||
tool_qualities = list(TOOL_MINING = TOOL_QUALITY_DECENT)
|
||||
|
||||
/obj/item/weapon/pickaxe/four_pick
|
||||
name = "8cm pick"
|
||||
@@ -58,12 +58,12 @@
|
||||
icon_state = "pick4"
|
||||
item_state = "syringe_0"
|
||||
force = 3
|
||||
digspeed = 20
|
||||
desc = "A miniature excavation tool for precise digging (8 centimetre excavation depth)."
|
||||
excavation_amount = 8
|
||||
drill_sound = 'sound/items/Screwdriver.ogg'
|
||||
drill_verb = "delicately picking"
|
||||
w_class = ITEMSIZE_SMALL
|
||||
tool_qualities = list(TOOL_MINING = TOOL_QUALITY_DECENT)
|
||||
|
||||
/obj/item/weapon/pickaxe/five_pick
|
||||
name = "10cm pick"
|
||||
@@ -71,12 +71,12 @@
|
||||
icon_state = "pick5"
|
||||
item_state = "syringe_0"
|
||||
force = 5
|
||||
digspeed = 20
|
||||
desc = "A miniature excavation tool for precise digging (10 centimetre excavation depth)."
|
||||
excavation_amount = 10
|
||||
drill_sound = 'sound/items/Screwdriver.ogg'
|
||||
drill_verb = "delicately picking"
|
||||
w_class = ITEMSIZE_SMALL
|
||||
tool_qualities = list(TOOL_MINING = TOOL_QUALITY_DECENT)
|
||||
|
||||
/obj/item/weapon/pickaxe/six_pick
|
||||
name = "12cm pick"
|
||||
@@ -84,12 +84,12 @@
|
||||
icon_state = "pick6"
|
||||
item_state = "syringe_0"
|
||||
force = 5
|
||||
digspeed = 20
|
||||
desc = "A miniature excavation tool for precise digging (12 centimetre excavation depth)."
|
||||
excavation_amount = 12
|
||||
drill_sound = 'sound/items/Screwdriver.ogg'
|
||||
drill_verb = "delicately picking"
|
||||
w_class = ITEMSIZE_SMALL
|
||||
tool_qualities = list(TOOL_MINING = TOOL_QUALITY_DECENT)
|
||||
|
||||
/obj/item/weapon/pickaxe/hand
|
||||
name = "hand pickaxe"
|
||||
@@ -97,12 +97,12 @@
|
||||
icon_state = "pick_hand"
|
||||
item_state = "syringe_0"
|
||||
force = 10
|
||||
digspeed = 30
|
||||
desc = "A smaller, more precise version of the pickaxe (30 centimetre excavation depth)."
|
||||
excavation_amount = 30
|
||||
drill_sound = 'sound/items/Crowbar.ogg'
|
||||
drill_verb = "clearing"
|
||||
w_class = ITEMSIZE_SMALL
|
||||
tool_qualities = list(TOOL_MINING = TOOL_QUALITY_STANDARD)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Pack for holding pickaxes
|
||||
@@ -165,13 +165,13 @@
|
||||
icon_state = "excavationdrill2"
|
||||
item_state = "syringe_0"
|
||||
excavation_amount = 15
|
||||
digspeed = 30
|
||||
desc = "Advanced archaeological drill combining ultrasonic excitation and bluespace manipulation to provide extreme precision. The tip is adjustable from 1 to 30 cm."
|
||||
drill_sound = 'sound/weapons/thudswoosh.ogg'
|
||||
drill_verb = "drilling"
|
||||
force = 5
|
||||
w_class = 2
|
||||
attack_verb = list("drilled")
|
||||
tool_qualities = list(TOOL_MINING = TOOL_QUALITY_STANDARD)
|
||||
|
||||
/obj/item/weapon/pickaxe/excavationdrill/attack_self(mob/user as mob)
|
||||
var/depth = input("Put the desired depth (1-30 centimeters).", "Set Depth", 30) as num
|
||||
|
||||
Reference in New Issue
Block a user