diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 347d837856..dd646a7145 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -140,12 +140,13 @@ piece.name = "[suit_type] [initial(piece.name)]" piece.desc = "It seems to be part of a [src.name]." piece.icon_state = "[initial(icon_state)]" - piece.armor = armor.Copy() piece.min_cold_protection_temperature = min_cold_protection_temperature piece.max_heat_protection_temperature = max_heat_protection_temperature piece.siemens_coefficient = siemens_coefficient piece.permeability_coefficient = permeability_coefficient piece.unacidable = unacidable + if(islist(species_restricted)) piece.species_restricted = species_restricted.Copy() + if(islist(armor)) piece.armor = armor.Copy() update_icon(1) @@ -631,14 +632,15 @@ use_obj.loc = src else if (deploy_mode != ONLY_RETRACT) - if(check_slot) - if(check_slot != use_obj) - H << "You are unable to deploy \the [piece] as \the [check_slot] [check_slot.gender == PLURAL ? "are" : "is"] in the way." - return + if(check_slot && check_slot != use_obj) + H << "You are unable to deploy \the [piece] as \the [check_slot] [check_slot.gender == PLURAL ? "are" : "is"] in the way." + return else - H << "Your [use_obj.name] [use_obj.gender == PLURAL ? "deploy" : "deploys"] swiftly." use_obj.loc = H - H.equip_to_slot(use_obj, equip_to) + if(!H.equip_to_slot_if_possible(use_obj, equip_to, 0)) + use_obj.loc = src + else + H << "Your [use_obj.name] [use_obj.gender == PLURAL ? "deploy" : "deploys"] swiftly." if(piece == "helmet" && helmet) helmet.update_light(H) diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 44b212694e..35cb9840cb 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -215,10 +215,11 @@ This saves us from having to call add_fingerprint() any time something is put in //This is an UNSAFE proc. Use mob_can_equip() before calling this one! Or rather use equip_to_slot_if_possible() or advanced_equip_to_slot_if_possible() //set redraw_mob to 0 if you don't wish the hud to be updated - if you're doing it manually in your own proc. /mob/living/carbon/human/equip_to_slot(obj/item/W as obj, slot, redraw_mob = 1) + if(!slot) return 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 switch(slot) if(slot_back) @@ -337,7 +338,7 @@ This saves us from having to call add_fingerprint() any time something is put in W.layer = 20 - return + return 1 /obj/effect/equip_e name = "equip e" diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 6f4ac6543c..82e7af8452 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -142,7 +142,7 @@ del(W) else if(!disable_warning) - src << "\red You are unable to equip that." //Only print if del_on_fail is false + src << "\red You are unable to equip \the [W]." //Only print if del_on_fail is false return 0 equip_to_slot(W, slot, redraw_mob) //This proc should not ever fail.