From 1a01ff8d37de9019b26c4532ae8cab8191e3331f Mon Sep 17 00:00:00 2001 From: HaultyAnonie Date: Sun, 5 Nov 2023 23:37:34 +0000 Subject: [PATCH 1/2] bim bim bam bam --- code/game/turfs/floor_attackby.dm | 2 +- code/modules/1713/tools.dm | 18 ++++++++++++------ code/modules/1713/trench.dm | 11 ++++++----- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/code/game/turfs/floor_attackby.dm b/code/game/turfs/floor_attackby.dm index 3c32de32fe..f5d4a323a2 100644 --- a/code/game/turfs/floor_attackby.dm +++ b/code/game/turfs/floor_attackby.dm @@ -168,7 +168,7 @@ var/turf/T = get_turf(src) var/mob/living/human/H = user var/obj/item/weapon/material/shovel/SH = C - if (H.a_intent != I_DISARM) + if (H.a_intent != I_HARM) if (!H.shoveling) if (T.icon == 'icons/turf/snow.dmi' && istype(H)) if (T.available_snow > 0) diff --git a/code/modules/1713/tools.dm b/code/modules/1713/tools.dm index 7241346a3e..b52cba210b 100644 --- a/code/modules/1713/tools.dm +++ b/code/modules/1713/tools.dm @@ -117,6 +117,7 @@ sharp = FALSE edge = TRUE slot_flags = SLOT_BACK|SLOT_BELT + var/dig_speed = 7 var/usespeed = 1.5 default_material = "iron" force_divisor = 0.25 @@ -130,13 +131,16 @@ default_material = "steel" health = 50 maxhealth = 50 + dig_speed = 7 /obj/item/weapon/material/shovel/bone icon_state = "shovel_bone" + desc = "A shovel made out of some bone, it's not the best but it gets the job done." usespeed = 0.6 default_material = "bone" health = 7.5 maxhealth = 7.5 + dig_speed = 7 // Foldable shovels /obj/item/weapon/material/shovel/spade/foldable @@ -144,6 +148,7 @@ icon_state = "trench_shovel" item_state = "lopata" usespeed = 0.9 + dig_speed = 7 var/path = /obj/item/weapon/foldable_shovel secondary_action = TRUE @@ -156,26 +161,24 @@ /obj/item/weapon/material/shovel/trench name = "entrenching tool" - desc = "A shovel used specifically for digging trenches." + desc = "A compact shovel used specifically for digging and moving dirt.." icon_state = "trench_shovel" - var/dig_speed = 7 + dig_speed = 7 force = 35 usespeed = 0.8 /obj/item/weapon/material/shovel/trench/foldable name = "foldable entrenching tool" - desc = "A foldable shovel used specifically for digging trenches." + desc = "A foldable shovel used specifically for digging and moving dirt.." icon_state = "trench_shovel" - dig_speed = 8 usespeed = 0.8 var/path = /obj/item/weapon/foldable_shovel/trench secondary_action = TRUE /obj/item/weapon/material/shovel/trench/foldable/etool name = "foldable entrenching tool" - desc = "A foldable shovel used specifically for digging trenches." + desc = "A foldable shovel used specifically for digging and moving dirt." icon_state = "etool" - dig_speed = 8 usespeed = 0.8 path = /obj/item/weapon/foldable_shovel/trench/etool @@ -196,9 +199,11 @@ w_class = ITEM_SIZE_SMALL weight = 1.18 usespeed = 0.8 + dig_speed = 7 /obj/item/weapon/material/shovel/spade/wood usespeed = 0.4 + dig_speed = 7 default_material = "wood" material = "wood" icon_state = "spadem" @@ -242,6 +247,7 @@ name = "small shovel" icon_state = "lopata" item_state = "lopata" + dig_speed = 7 usespeed = 0.9 /obj/item/weapon/material/pickaxe diff --git a/code/modules/1713/trench.dm b/code/modules/1713/trench.dm index c7c548d1ec..2270216fbb 100644 --- a/code/modules/1713/trench.dm +++ b/code/modules/1713/trench.dm @@ -322,7 +322,7 @@ var/list/global/floor_cache = list() return ..() /turf/floor/dirt/attackby(obj/item/C as obj, mob/user as mob) - if (istype(C, /obj/item/weapon/material/shovel/trench)) + if (istype(C, /obj/item/weapon/material/shovel) && user.a_intent == I_HARM) var/obj/item/weapon/material/shovel/trench/S = C visible_message("[user] starts to dig a trench.") if (!do_after(user, (10 - S.dig_speed)*10, src)) @@ -345,7 +345,7 @@ var/list/global/floor_cache = list() /turf/floor/beach/sand var/trench_stage = 0 /turf/floor/beach/sand/attackby(obj/item/C as obj, mob/user as mob) - if (istype(C, /obj/item/weapon/material/shovel/trench)) + if (istype(C, /obj/item/weapon/material/shovel) && user.a_intent == I_HARM) var/obj/item/weapon/material/shovel/trench/S = C visible_message("[user] starts to dig a trench.") if (!do_after(user, (10 - S.dig_speed)*10, src)) @@ -367,7 +367,7 @@ var/list/global/floor_cache = list() ..() /turf/floor/dirt/attackby(obj/item/C as obj, mob/user as mob) - if (istype(C, /obj/item/weapon/material/shovel/trench)) + if (istype(C, /obj/item/weapon/material/shovel) && user.a_intent == I_HARM) var/obj/item/weapon/material/shovel/trench/S = C visible_message("[user] starts to dig a trench.") if (!do_after(user, (10 - S.dig_speed)*10, src)) @@ -388,9 +388,10 @@ var/list/global/floor_cache = list() return ..() + /turf/floor/grass/attackby(obj/item/C as obj, mob/user as mob) var/mob/living/human/H = user - if (istype(C, /obj/item/weapon/material/shovel/trench)) + if (istype(C, /obj/item/weapon/material/shovel)) var/obj/item/weapon/material/shovel/trench/S = C visible_message("[user] starts to remove grass layer.") if (!do_after(user, (100/(H.getStatCoeff("strength"))/(12/S.dig_speed)))) //Think a DEFINE for the number being divided over S.dig_speed could be helpful, keeping it this for now @@ -420,7 +421,7 @@ var/list/global/floor_cache = list() /turf/floor/winter/attackby(obj/item/C as obj, mob/user as mob) var/mob/living/human/H = user - if (istype(C, /obj/item/weapon/material/shovel/trench)) + if (istype(C, /obj/item/weapon/material/shovel)) var/obj/item/weapon/material/shovel/trench/S = C visible_message("[user] starts to remove snow layer.") if (!do_after(user, (100/(H.getStatCoeff("strength"))/(12/S.dig_speed)))) From 1604b22951f53dd471ee6e9c3b87230235a7af52 Mon Sep 17 00:00:00 2001 From: HaultyAnonie Date: Mon, 6 Nov 2023 18:28:49 +0000 Subject: [PATCH 2/2] Fixes some descriptions. Fixes some descriptions. --- code/modules/1713/tools.dm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/code/modules/1713/tools.dm b/code/modules/1713/tools.dm index b52cba210b..1038c45ae6 100644 --- a/code/modules/1713/tools.dm +++ b/code/modules/1713/tools.dm @@ -57,21 +57,21 @@ /obj/item/weapon/foldable/generic name = "Foldable Mortar" - desc = "A light-weight portable mortar" + desc = "A light-weight portable mortar." icon_state = "mortar" item_state = "type89" path = /obj/structure/cannon/mortar/foldable/generic /obj/item/weapon/foldable/type89_mortar name = "Type 89 Mortar" - desc = "A light-weight portable mortar" + desc = "A light-weight portable mortar." icon_state = "type89" item_state = "type89" path = /obj/structure/cannon/mortar/foldable/type89 /obj/item/weapon/foldable/atgm name = "Anti-Tank Guided Missile system" - desc = "A light-weight portable ATGM" + desc = "A light-weight portable ATGM." icon_state = "atgm" item_state = "atgm" path = /obj/item/weapon/gun/projectile/automatic/stationary/atgm/foldable @@ -135,7 +135,7 @@ /obj/item/weapon/material/shovel/bone icon_state = "shovel_bone" - desc = "A shovel made out of some bone, it's not the best but it gets the job done." + desc = "A shovel made out of some bone." usespeed = 0.6 default_material = "bone" health = 7.5 @@ -161,7 +161,7 @@ /obj/item/weapon/material/shovel/trench name = "entrenching tool" - desc = "A compact shovel used specifically for digging and moving dirt.." + desc = "A compact shovel used specifically for digging and moving dirt." icon_state = "trench_shovel" dig_speed = 7 force = 35 @@ -169,7 +169,7 @@ /obj/item/weapon/material/shovel/trench/foldable name = "foldable entrenching tool" - desc = "A foldable shovel used specifically for digging and moving dirt.." + desc = "A foldable shovel used specifically for digging and moving dirt." icon_state = "trench_shovel" usespeed = 0.8 var/path = /obj/item/weapon/foldable_shovel/trench @@ -212,7 +212,7 @@ /obj/item/weapon/foldable_shovel name = "foldable shovel" icon = 'icons/obj/items.dmi' - desc = "A foldable shovel which is currently, folded" + desc = "A foldable shovel which is currently, folded." icon_state = "trench_shovel_folded" item_state = "lopata" edge = FALSE @@ -224,14 +224,14 @@ /obj/item/weapon/foldable_shovel/trench name = "foldable entrenching tool" - desc = "A foldable entrenching tool which is currently, folded" + desc = "A foldable entrenching tool which is currently, folded." icon_state = "trench_shovel_folded" item_state = "lopata" path = /obj/item/weapon/material/shovel/trench/foldable /obj/item/weapon/foldable_shovel/trench/etool name = "foldable entrenching tool" - desc = "A foldable entrenching tool which is currently, folded" + desc = "A foldable entrenching tool which is currently, folded." icon_state = "etool_folded" item_state = "lopata" path = /obj/item/weapon/material/shovel/trench/foldable/etool