mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-24 09:02:27 +00:00
Makes inventory code not use : for get_equipped_items()
Also corrects a couple of forceMove()s.
This commit is contained in:
@@ -244,23 +244,4 @@ var/list/slot_equipment_priority = list( \
|
||||
|
||||
//Outdated but still in use apparently. This should at least be a human proc.
|
||||
/mob/proc/get_equipped_items()
|
||||
var/list/items = new/list()
|
||||
|
||||
if(hasvar(src,"back")) if(src:back) items += src:back
|
||||
if(hasvar(src,"belt")) if(src:belt) items += src:belt
|
||||
if(hasvar(src,"l_ear")) if(src:l_ear) items += src:l_ear
|
||||
if(hasvar(src,"r_ear")) if(src:r_ear) items += src:r_ear
|
||||
if(hasvar(src,"glasses")) if(src:glasses) items += src:glasses
|
||||
if(hasvar(src,"gloves")) if(src:gloves) items += src:gloves
|
||||
if(hasvar(src,"head")) if(src:head) items += src:head
|
||||
if(hasvar(src,"shoes")) if(src:shoes) items += src:shoes
|
||||
if(hasvar(src,"wear_id")) if(src:wear_id) items += src:wear_id
|
||||
if(hasvar(src,"wear_mask")) if(src:wear_mask) items += src:wear_mask
|
||||
if(hasvar(src,"wear_suit")) if(src:wear_suit) items += src:wear_suit
|
||||
// if(hasvar(src,"w_radio")) if(src:w_radio) items += src:w_radio commenting this out since headsets go on your ears now PLEASE DON'T BE MAD KEELIN
|
||||
if(hasvar(src,"w_uniform")) if(src:w_uniform) items += src:w_uniform
|
||||
|
||||
//if(hasvar(src,"l_hand")) if(src:l_hand) items += src:l_hand
|
||||
//if(hasvar(src,"r_hand")) if(src:r_hand) items += src:r_hand
|
||||
|
||||
return items
|
||||
return list()
|
||||
|
||||
@@ -184,7 +184,7 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
if(!istype(W)) return
|
||||
if(!has_organ_for_slot(slot)) return
|
||||
if(!species || !species.hud || !(slot in species.hud.equip_slots)) return
|
||||
W.loc = src
|
||||
W.forceMove(src)
|
||||
switch(slot)
|
||||
if(slot_back)
|
||||
src.back = W
|
||||
@@ -224,7 +224,7 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
src.l_ear = W
|
||||
if(l_ear.slot_flags & SLOT_TWOEARS)
|
||||
var/obj/item/clothing/ears/offear/O = new(W)
|
||||
O.loc = src
|
||||
O.forceMove(src)
|
||||
src.r_ear = O
|
||||
O.layer = 20
|
||||
W.equipped(src, slot)
|
||||
@@ -233,7 +233,7 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
src.r_ear = W
|
||||
if(r_ear.slot_flags & SLOT_TWOEARS)
|
||||
var/obj/item/clothing/ears/offear/O = new(W)
|
||||
O.loc = src
|
||||
O.forceMove(src)
|
||||
src.l_ear = O
|
||||
O.layer = 20
|
||||
W.equipped(src, slot)
|
||||
@@ -285,12 +285,12 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
if(slot_in_backpack)
|
||||
if(src.get_active_hand() == W)
|
||||
src.remove_from_mob(W)
|
||||
W.loc = src.back
|
||||
W.forceMove(src.back)
|
||||
if(slot_tie)
|
||||
var/obj/item/clothing/under/uniform = src.w_uniform
|
||||
uniform.attackby(W,src)
|
||||
else
|
||||
src << "\red You are trying to eqip this item to an unsupported inventory slot. How the heck did you manage that? Stop it..."
|
||||
src << "<span class='danger'>You are trying to eqip this item to an unsupported inventory slot. If possible, please write a ticket with steps to reproduce. Slot was: [slot]</span>"
|
||||
return
|
||||
|
||||
if((W == src.l_hand) && (slot != slot_l_hand))
|
||||
@@ -349,3 +349,30 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
if(slot_l_ear) return l_ear
|
||||
if(slot_r_ear) return r_ear
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/get_equipped_items(var/include_carried = 0)
|
||||
var/list/items = new/list()
|
||||
|
||||
if(back) items += back
|
||||
if(belt) items += belt
|
||||
if(l_ear) items += l_ear
|
||||
if(r_ear) items += r_ear
|
||||
if(glasses) items += glasses
|
||||
if(gloves) items += gloves
|
||||
if(head) items += head
|
||||
if(shoes) items += shoes
|
||||
if(wear_id) items += wear_id
|
||||
if(wear_mask) items += wear_mask
|
||||
if(wear_suit) items += wear_suit
|
||||
if(w_uniform) items += w_uniform
|
||||
|
||||
if(include_carried)
|
||||
if(slot_l_hand) items += l_hand
|
||||
if(slot_r_hand) items += r_hand
|
||||
if(slot_l_store) items += l_store
|
||||
if(slot_r_store) items += r_store
|
||||
if(slot_legcuffed) items += legcuffed
|
||||
if(slot_handcuffed) items += handcuffed
|
||||
if(slot_s_store) items += s_store
|
||||
|
||||
return items
|
||||
|
||||
Reference in New Issue
Block a user