This commit is contained in:
Zuhayr
2015-04-01 06:49:31 -07:00
parent 015fb291fa
commit 63a2fc6bff
3 changed files with 13 additions and 10 deletions
+9 -7
View File
@@ -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 << "<span class='danger'>You are unable to deploy \the [piece] as \the [check_slot] [check_slot.gender == PLURAL ? "are" : "is"] in the way.</span>"
return
if(check_slot && check_slot != use_obj)
H << "<span class='danger'>You are unable to deploy \the [piece] as \the [check_slot] [check_slot.gender == PLURAL ? "are" : "is"] in the way.</span>"
return
else
H << "<font color='blue'><b>Your [use_obj.name] [use_obj.gender == PLURAL ? "deploy" : "deploys"] swiftly.</b></span>"
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 << "<font color='blue'><b>Your [use_obj.name] [use_obj.gender == PLURAL ? "deploy" : "deploys"] swiftly.</b></span>"
if(piece == "helmet" && helmet)
helmet.update_light(H)
@@ -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"
+1 -1
View File
@@ -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.