Fixes scythes cutting kudzu (#2185)

This commit is contained in:
CitadelStationBot
2017-07-29 21:50:24 -05:00
committed by kevinz000
parent d07b21a9d8
commit 2342c8f2bc
3 changed files with 17 additions and 12 deletions

View File

@@ -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())

View File

@@ -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("<span class='suicide'>[user] is beheading [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
@@ -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
// *************************************

View File

@@ -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)