QoL: Hacking (#6810)

* Makes hacking window consider all hands instead of just the active one.

* Makes bottom indicators in hacking window go bold if they changed since the last refresh.

* Changelog
This commit is contained in:
Neerti
2020-03-11 17:36:26 -07:00
committed by GitHub
parent 1133795814
commit 09f9e0b3d7
23 changed files with 406 additions and 81 deletions
+4
View File
@@ -99,6 +99,10 @@ var/list/slot_equipment_priority = list( \
/mob/proc/is_holding_item_of_type(typepath)
return FALSE
// Override for your specific mob's hands or lack thereof.
/mob/proc/get_all_held_items()
return list()
//Puts the item into your l_hand if possible and calls all necessary triggers/updates. returns 1 on success.
/mob/proc/put_in_l_hand(var/obj/item/W)
if(lying || !istype(W))
@@ -397,4 +397,12 @@ This saves us from having to call add_fingerprint() any time something is put in
for(var/obj/item/I in list(l_hand, r_hand))
if(istype(I, typepath))
return I
return FALSE
return FALSE
// Returns a list of items held in both hands.
/mob/living/carbon/human/get_all_held_items()
. = list()
if(l_hand)
. += l_hand
if(r_hand)
. += r_hand
@@ -261,4 +261,14 @@
for(var/obj/item/I in list(module_state_1, module_state_2, module_state_3))
if(istype(I, typepath))
return I
return FALSE
return FALSE
// Returns a list of all held items in a borg's 'hands'.
/mob/living/silicon/robot/get_all_held_items()
. = list()
if(module_state_1)
. += module_state_1
if(module_state_2)
. += module_state_2
if(module_state_3)
. += module_state_3
@@ -141,3 +141,16 @@
target = src.loc
if(.)
W.forceMove(src.loc)
/mob/living/simple_mob/is_holding_item_of_type(typepath)
for(var/obj/item/I in list(l_hand, r_hand))
if(istype(I, typepath))
return I
return FALSE
/mob/living/simple_mob/get_all_held_items()
. = list()
if(l_hand)
. += l_hand
if(r_hand)
. += r_hand