Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Machete in-hand activation #4277

Merged
merged 2 commits into from
Aug 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 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,23 @@
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
var/turf/in_front = get_step(root, facing)

// We check the tile in front of us, if it has flora that can be cut we will attempt to cut it
for(var/obj/structure/flora/target in in_front)
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