Ports Hover Overlays (#8870)

* HUD Overlay

* finishes up the port

* fixes
This commit is contained in:
Geeves
2020-05-19 00:28:23 +02:00
committed by GitHub
parent d7231e6ee5
commit 3ec99c8d64
13 changed files with 144 additions and 45 deletions
+2 -2
View File
@@ -57,7 +57,7 @@
return 0
//BS12: Species-restricted clothing check.
/obj/item/clothing/mob_can_equip(M as mob, slot)
/obj/item/clothing/mob_can_equip(M as mob, slot, disable_warning = FALSE)
//if we can't equip the item anyway, don't bother with species_restricted (cuts down on spam)
if (!..())
@@ -381,7 +381,7 @@
species_restricted -= "Vaurca"
return
/obj/item/clothing/gloves/mob_can_equip(mob/user, slot)
/obj/item/clothing/gloves/mob_can_equip(mob/user, slot, disable_warning = FALSE)
var/mob/living/carbon/human/H = user
if(slot && slot == slot_gloves)
if(istype(H.gloves, /obj/item/clothing/ring))
+1 -1
View File
@@ -9,7 +9,7 @@
siemens_coefficient = 0.35
drop_sound = 'sound/items/drop/metalshield.ogg'
/obj/item/clothing/gloves/arm_guard/mob_can_equip(var/mob/living/carbon/human/H, slot)
/obj/item/clothing/gloves/arm_guard/mob_can_equip(var/mob/living/carbon/human/H, slot, disable_warning = 0)
if(..()) //This will only run if no other problems occured when equiping.
if(H.wear_suit)
if(H.wear_suit.body_parts_covered & ARMS)
+1 -1
View File
@@ -56,7 +56,7 @@
else
return 0
/obj/item/clothing/shoes/magboots/mob_can_equip(mob/user)
/obj/item/clothing/shoes/magboots/mob_can_equip(mob/user, slot, disable_warning = FALSE)
var/mob/living/carbon/human/H = user
if(H.shoes)
+1 -1
View File
@@ -106,7 +106,7 @@
item_state = initial(item_state)
update_held_icon()
/obj/item/pickaxe/mob_can_equip(M, slot)
/obj/item/pickaxe/mob_can_equip(M, slot, disable_warning = FALSE)
//Cannot equip wielded items.
if(wielded)
to_chat(M, SPAN_WARNING("Unwield the [initial(name)] first!"))
@@ -1056,6 +1056,11 @@ There are several things that need to be remembered:
if(hud_used)
hud_used.hidden_inventory_update() //Updates the screenloc of the items on the 'other' inventory bar
//update whether handcuffs appears on our hud.
/mob/living/carbon/proc/update_hud_handcuffed()
if(hud_used && hud_used.l_hand_hud_object && hud_used.r_hand_hud_object)
hud_used.l_hand_hud_object.update_icon()
hud_used.r_hand_hud_object.update_icon()
/mob/living/carbon/human/update_inv_handcuffed(var/update_icons=1)
if (QDELING(src))
@@ -1077,6 +1082,7 @@ There are several things that need to be remembered:
else
overlays_raw[HANDCUFF_LAYER] = null
update_hud_handcuffed()
if(update_icons)
update_icons()
+2 -2
View File
@@ -748,8 +748,8 @@
if (!QDELETED(src))
qdel(src)
/obj/item/offhand/mob_can_equip(var/mob/M, slot)
return FALSE
/obj/item/offhand/mob_can_equip(var/mob/M, slot, disable_warning = FALSE)
return FALSE
/obj/item/gun/Destroy()
if (istype(pin))