Summary (a quick, 2-3 sentence summary):
Change the Quick-Equip Verb (Default Key "E" for hotkey mode) to use tgstation's code.
Benefits (How this will benefit the server and game as a whole):
Baystation's code equips items in your active hand into your immediate slots: pockets, suit storage, belt, ID slot, etc.
Tg's code attempts to do that, and, if failed (belts/pockets full), it tries to insert it into your current active container (backpack, toolbelt, marine belt, etc.).
Details (Description of how you think this would work, the benefits, etc):
The greatest benefits would be giving more use to a hotkey, which currently is fairly limited.
Implementation (Optional, if you have an idea how to implement it):
Tg's code (to be implemented):
► Show Spoiler
Code: Select all
/mob/living/carbon/human/verb/quick_equip()
set name = "quick-equip"
set hidden = 1
if(ishuman(src))
var/mob/living/carbon/human/H = src
var/obj/item/I = H.get_active_hand()
var/obj/item/weapon/storage/S = H.get_inactive_hand()
if(!I)
H << "<span class='warning'>You are not holding anything to equip!</span>"
return
if(H.equip_to_appropriate_slot(I))
if(hand)
update_inv_l_hand(0)
else
update_inv_r_hand(0)
else if(s_active && s_active.can_be_inserted(I,1)) //if storage active insert there
s_active.handle_item_insertion(I)
else if(istype(S, /obj/item/weapon/storage) && S.can_be_inserted(I,1)) //see if we have box in other hand
S.handle_item_insertion(I)
else
S = H.get_item_by_slot(slot_belt)
if(istype(S, /obj/item/weapon/storage) && S.can_be_inserted(I,1)) //else we put in belt
S.handle_item_insertion(I)
else
S = H.get_item_by_slot(slot_back) //else we put in backpack
if(istype(S, /obj/item/weapon/storage) && S.can_be_inserted(I,1))
S.handle_item_insertion(I)
else
H << "<span class='warning'>You are unable to equip that!</span>"
Baystation's code (current code, I believe):
► Show Spoiler
Code: Select all
/mob/living/carbon/human/verb/quick_equip()
set name = "quick-equip"
set hidden = 1
if(ishuman(src))
var/mob/living/carbon/human/H = src
var/obj/item/I = H.get_active_hand()
if(!I)
H << "<span class='notice'>You are not holding anything to equip.</span>"
return
if(H.equip_to_appropriate_slot(I))
if(hand)
update_inv_l_hand(0)
else
update_inv_r_hand(0)
else
H << "\red You are unable to equip that."