Skip to content

Commit

Permalink
Made machete cut in front
Browse files Browse the repository at this point in the history
  • Loading branch information
Rigó János committed Aug 28, 2023
1 parent 30a8638 commit 9a84f1e
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions code/game/objects/items/weapons/blades.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,25 @@
icon_state = "machete"
w_class = SIZE_LARGE

/obj/item/weapon/claymore/mercsword/machete/attack_self(mob/user)
if(user.action_busy)
return

var/turf/root = get_turf(user)
var/facing = user.dir
// List containing the 3 tiles in front of the user
var/list/in_front = list(get_step(root, facing), get_step(root, turn(facing, 45)), get_step(root, turn(facing, -45)))

// We check each tile in front of us, if it has flora that can be cut we will attempt to cut it
for(var/turf/current_turf in in_front)
for(var/obj/structure/flora/target in current_turf)
if(target.cut_level > 1)
if(!do_after(user, 10, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD))
return
target.attackby(src, user)

return ..()

/obj/item/weapon/claymore/mercsword/machete/arnold
name = "\improper M2100 \"Ngájhe\" machete"
desc = "An older issue USCM machete, never left testing. Designed in the Central African Republic. The notching made it hard to clean, and as such the USCM refused to adopt it - despite the superior bludgeoning power offered. Difficult to carry with the usual kit."
Expand Down

0 comments on commit 9a84f1e

Please sign in to comment.