You can now put items into bags, belts and the suit slot using hotkeys. (#19957)

* you have committed cringe, now die

* proc>verb

* shit

* dufflebugfix

* mob/living/carbon/human/proc/quick_equip_bag(

* hal review

* drawdie

* typo

* siiryan review

* now with less runtimes

* oh you piece of shit

* reformatted

* hal
This commit is contained in:
Bm0n
2023-01-04 22:21:46 +00:00
committed by GitHub
parent cfc31154e7
commit 6491512cbd
2 changed files with 39 additions and 0 deletions
@@ -432,3 +432,15 @@
/mob/living/carbon/human/proc/delete_equipment()
for(var/slot in get_all_slots())//order matters, dependant slots go first
qdel(slot)
/mob/living/carbon/human/proc/quick_equip_item(slot_item) // puts things in belt or bag
var/obj/item/thing = get_active_hand()
var/obj/item/storage/equipped_item = get_item_by_slot(slot_item)
if(ismecha(loc) || HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
return
if(!istype(equipped_item)) // We also let you equip things like this
equip_to_slot_if_possible(thing, slot_item)
return
if(thing && equipped_item.can_be_inserted(thing)) // put thing in belt or bag
equipped_item.handle_item_insertion(thing)
playsound(loc, "rustle", 50, 1, -5)