mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 06:57:42 +01:00
I started with the desire to fix issue 634. It sounded like a simple issue, right? Well one complete rewrite of how equipping and stripping works later, this commit fixes issue 645
Code-wide changes: /mob -level procs: equip_if_possible() is now known as equip_to_slot_or_del() to prevent confusion with equip_to_slot_if_possible() and to better describe what it does. equip_to_slot_if_possible(item, slot, del_on_fail, disable_warning, redraw_mob) equip_to_appropriate_slot() is now a /mob - level proc. equip_to_slot() is an unsafe proc, which just handles the final step of actually getting an item onto the mob. It has no checks of whether it can or can't do that. Use equip_to_slot_if_possible() for that purpose. New /obj/item -level proc: /obj/item/proc/mob_can_equip(M as mob, slot, disable_warning = 0) This proc can be used to determine whehter a mob can pick up an item from the item's side. Carn, I'll need you to review code/modules/mob/living/carbon/human/inventory.dm to ensure that I'm not redrawing the mob too many times. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4423 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
+10
-10
@@ -589,11 +589,11 @@ datum/mind
|
||||
var/obj/item/weapon/tome/T = new(H)
|
||||
|
||||
var/list/slots = list (
|
||||
"backpack" = H.slot_in_backpack,
|
||||
"left pocket" = H.slot_l_store,
|
||||
"right pocket" = H.slot_r_store,
|
||||
"left hand" = H.slot_l_hand,
|
||||
"right hand" = H.slot_r_hand,
|
||||
"backpack" = slot_in_backpack,
|
||||
"left pocket" = slot_l_store,
|
||||
"right pocket" = slot_r_store,
|
||||
"left hand" = slot_l_hand,
|
||||
"right hand" = slot_r_hand,
|
||||
)
|
||||
var/where = H.equip_in_one_of_slots(T, slots)
|
||||
if (!where)
|
||||
@@ -1050,11 +1050,11 @@ datum/mind
|
||||
var/obj/item/weapon/tome/T = new(H)
|
||||
|
||||
var/list/slots = list (
|
||||
"backpack" = H.slot_in_backpack,
|
||||
"left pocket" = H.slot_l_store,
|
||||
"right pocket" = H.slot_r_store,
|
||||
"left hand" = H.slot_l_hand,
|
||||
"right hand" = H.slot_r_hand,
|
||||
"backpack" = slot_in_backpack,
|
||||
"left pocket" = slot_l_store,
|
||||
"right pocket" = slot_r_store,
|
||||
"left hand" = slot_l_hand,
|
||||
"right hand" = slot_r_hand,
|
||||
)
|
||||
var/where = H.equip_in_one_of_slots(T, slots)
|
||||
if (!where)
|
||||
|
||||
Reference in New Issue
Block a user