Skip to content

Commit

Permalink
Reduce to 1 tile
Browse files Browse the repository at this point in the history
  • Loading branch information
Rigó János committed Aug 28, 2023
1 parent 9a84f1e commit 78d95b3
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions code/game/objects/items/weapons/blades.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,14 @@

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

Expand Down

0 comments on commit 78d95b3

Please sign in to comment.