Skip to content

Commit

Permalink
Equip exploit fix (#16822)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lumipharon authored Dec 17, 2024
1 parent d6bf2fb commit 25ad09f
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions code/modules/mob/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -233,17 +233,13 @@
if(!do_after(src, item_to_equip.equip_delay_self, NONE, item_to_equip, BUSY_ICON_FRIENDLY))
to_chat(src, "You stop putting on \the [item_to_equip]")
return FALSE
equip_to_slot(item_to_equip, slot) //This proc should not ever fail.
//This will unwield items -without- triggering lights.
if(CHECK_BITFIELD(item_to_equip.item_flags, TWOHANDED))
item_to_equip.unwield(src)
return TRUE
else
equip_to_slot(item_to_equip, slot) //This proc should not ever fail.
//This will unwield items -without- triggering lights.
if(CHECK_BITFIELD(item_to_equip.item_flags, TWOHANDED))
item_to_equip.unwield(src)
return TRUE
//calling the proc again with ignore_delay saves a boatload of copypaste
return equip_to_slot_if_possible(item_to_equip, slot, TRUE, del_on_fail, warning, redraw_mob, override_nodrop)
equip_to_slot(item_to_equip, slot) //This proc should not ever fail.
//This will unwield items -without- triggering lights.
if(CHECK_BITFIELD(item_to_equip.item_flags, TWOHANDED))
item_to_equip.unwield(src)
return TRUE

/**
*This is an UNSAFE proc. It merely handles the actual job of equipping. All the checks on whether you can or can't eqip need to be done before! Use mob_can_equip() for that task.
Expand Down

0 comments on commit 25ad09f

Please sign in to comment.