From 2342c8f2bc06156df5888e506192bcb506fa192f Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sat, 29 Jul 2017 21:50:24 -0500 Subject: [PATCH] Fixes scythes cutting kudzu (#2185) --- code/modules/events/spacevine.dm | 11 ----------- code/modules/hydroponics/hydroitemdefines.dm | 16 ++++++++++++++++ .../modules/mining/lavaland/necropolis_chests.dm | 2 +- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm index 290dfb1e94..dc318cd2a1 100644 --- a/code/modules/events/spacevine.dm +++ b/code/modules/events/spacevine.dm @@ -363,17 +363,6 @@ if(!override) qdel(src) -/obj/structure/spacevine/attackby(obj/item/weapon/W, mob/user, params) - - if(istype(W, /obj/item/weapon/scythe)) - user.changeNext_move(CLICK_CD_MELEE) - for(var/obj/structure/spacevine/B in orange(1,src)) - B.take_damage(W.force * 4, BRUTE, "melee", 1) - return - else - return ..() - - /obj/structure/spacevine/attacked_by(obj/item/I, mob/living/user) var/damage_dealt = I.force if(I.is_sharp()) diff --git a/code/modules/hydroponics/hydroitemdefines.dm b/code/modules/hydroponics/hydroitemdefines.dm index 8eb1057bec..bb53c093c3 100644 --- a/code/modules/hydroponics/hydroitemdefines.dm +++ b/code/modules/hydroponics/hydroitemdefines.dm @@ -110,6 +110,7 @@ origin_tech = "materials=3;combat=2" attack_verb = list("chopped", "sliced", "cut", "reaped") hitsound = 'sound/weapons/bladeslice.ogg' + var/swiping = FALSE /obj/item/weapon/scythe/suicide_act(mob/user) user.visible_message("[user] is beheading [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!") @@ -121,6 +122,21 @@ playsound(loc,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1) return (BRUTELOSS) +/obj/item/weapon/scythe/pre_attackby(atom/A, mob/living/user, params) + if(swiping || !istype(A, /obj/structure/spacevine) || get_turf(A) == get_turf(user)) + return ..() + else + var/turf/user_turf = get_turf(user) + var/dir_to_target = get_dir(user_turf, get_turf(A)) + swiping = TRUE + var/static/list/scythe_slash_angles = list(0, 45, 90, -45, -90) + for(var/i in scythe_slash_angles) + var/turf/T = get_step(user_turf, turn(dir_to_target, i)) + for(var/obj/structure/spacevine/V in T) + if(user.Adjacent(V)) + melee_attack_chain(user, V) + swiping = FALSE + // ************************************* // Nutrient defines for hydroponics // ************************************* diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index 572d840671..e58d0a3c06 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -645,7 +645,7 @@ var/turf/user_turf = get_turf(user) var/dir_to_target = get_dir(user_turf, get_turf(target)) swiping = TRUE - var/static/list/cleaving_saw_cleave_angles = list(0, -90, 90) //so that the animation animates towards the target clicked and not towards a side target + var/static/list/cleaving_saw_cleave_angles = list(0, -45, 45) //so that the animation animates towards the target clicked and not towards a side target for(var/i in cleaving_saw_cleave_angles) var/turf/T = get_step(user_turf, turn(dir_to_target, i)) for(var/mob/living/L in T)