mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 11:36:24 +01:00
Merge pull request #9628 from spasticVerbalizer/droneQuickEquip
Adds quick-equip verb for drones
This commit is contained in:
@@ -112,4 +112,29 @@
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/stripPanelEquip(obj/item/what, mob/who, where)
|
||||
..(what, who, where, 1)
|
||||
..(what, who, where, 1)
|
||||
|
||||
/mob/living/simple_animal/drone/verb/quick_equip()
|
||||
set name = "quick-equip"
|
||||
set hidden = 1
|
||||
var/obj/item/I = get_active_hand()
|
||||
var/obj/item/weapon/storage/S = get_inactive_hand()
|
||||
var/obj/item/weapon/storage/T = internal_storage
|
||||
if (!I)
|
||||
usr << "<span class='warning'>You are not holding anything to equip!</span>"
|
||||
return
|
||||
if(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 if (istype(T) && T.can_be_inserted(I,1)) // If carrying storage item like toolbox
|
||||
T.handle_item_insertion(I)
|
||||
else if(!internal_storage)
|
||||
equip_to_slot(I, "drone_storage_slot")
|
||||
else
|
||||
usr << "<span class='warning'>You are unable to equip that!</span>"
|
||||
|
||||
Reference in New Issue
Block a user