Equip-O-Matic (#12641)

This commit is contained in:
Geeves
2021-10-25 12:12:46 +02:00
committed by GitHub
parent 2b94f6f0ef
commit 46007880ab
6 changed files with 30 additions and 3 deletions
+4 -1
View File
@@ -948,4 +948,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
return "on [user.get_pronoun("his")] [ear_text] ear"
/obj/item/proc/get_mask_examine_text(var/mob/user)
return "on [user.get_pronoun("his")] face"
return "on [user.get_pronoun("his")] face"
/obj/item/proc/should_equip() // when you press E with an empty hand, will this item be pulled from suit storage / back slot and put into your hand
return FALSE
@@ -36,6 +36,9 @@
if(!isnull(matter[material_type]))
matter[material_type] *= force_divisor // May require a new var instead.
/obj/item/material/should_equip()
return TRUE
/obj/item/material/get_material()
return material
@@ -5,6 +5,9 @@
slot_r_hand_str = 'icons/mob/items/weapons/righthand_melee.dmi'
)
/obj/item/melee/should_equip()
return TRUE
/obj/item/melee/chainofcommand
name = "chain of command"
desc = "A tool used by great men to placate the frothing masses."
@@ -11,7 +11,16 @@ This saves us from having to call add_fingerprint() any time something is put in
var/mob/living/carbon/human/H = src
var/obj/item/I = H.get_active_hand()
if(!I)
to_chat(H, "<span class='notice'>You are not holding anything to equip.</span>")
if(istype(s_store) && s_store.should_equip())
var/obj/item/S = s_store
H.remove_from_mob(S)
H.put_in_active_hand(S)
return
if(istype(back) && back.should_equip())
var/obj/item/B = back
H.remove_from_mob(B)
H.put_in_active_hand(B)
return
return
if(H.equip_to_appropriate_slot(I))
if(hand)
+4 -1
View File
@@ -154,6 +154,9 @@
queue_icon_update()
/obj/item/gun/should_equip()
return TRUE
/obj/item/gun/update_icon()
..()
underlays.Cut()
@@ -959,4 +962,4 @@
if(no_clear)
. = ""
. += "Burst: [burst]<br>"
. += "Reliability: [reliability]<br>"
. += "Reliability: [reliability]<br>"
+6
View File
@@ -0,0 +1,6 @@
author: Geeves
delete-after: True
changes:
- rscadd: "Hitting equip with an empty hand will now pull an eligible weapon out of your suit slot, if it doesn't find one, then it will pull from the back slot."