Finished code

This commit is contained in:
Poojawa
2018-09-26 08:03:59 -05:00
parent a4810b6666
commit 865b6a5b3a
5 changed files with 14 additions and 18 deletions
+5 -3
View File
@@ -16,8 +16,8 @@
var/equipped_before_drop = FALSE
//CITADEL EDIT Enables digitigrade shoe styles
adjusted = NORMAL_STYLE
alternate_worn_icon = 'modular_citadel/icons/mob/digishoes.dmi'
var/adjusted = NORMAL_STYLE
var/mutantrace_variation = MUTANTRACE_VARIATION
/obj/item/clothing/shoes/ComponentInitialize()
. = ..()
@@ -63,11 +63,13 @@
worn_y_dimension -= (offset * 2)
user.update_inv_shoes()
equipped_before_drop = TRUE
if(mutantrace_variation && ishuman(user))
var/mob/living/carbon/human/H = user
if(DIGITIGRADE in H.dna.species.species_traits)
adjusted = DIGITIGRADE_STYLE
H.update_inv_shoes()
else if(adjusted == DIGITIGRADE_STYLE)
adjusted = NORMAL_STYLE
/obj/item/clothing/shoes/proc/restore_offsets(mob/user)
equipped_before_drop = FALSE
@@ -917,10 +917,6 @@ GLOBAL_LIST_EMPTY(roundstart_races)
return FALSE
if(num_legs < 2)
return FALSE
if(DIGITIGRADE in species_traits)
if(!disable_warning)
to_chat(H, "<span class='warning'>The footwear around here isn't compatible with your feet!</span>")
return FALSE
return equip_delay_self_check(I, H, bypass_equip_delay_self)
if(SLOT_BELT)
if(H.belt)
@@ -274,6 +274,11 @@ There are several things that need to be remembered:
if(hud_used.inventory_shown) //if the inventory is open
client.screen += shoes //add it to client's screen
update_observer_view(shoes,1)
if(S.adjusted == DIGITIGRADE_STYLE)
S.icon_override = 'modular_citadel/icons/mob/digishoes.dmi'
else if(S.adjusted == NORMAL_STYLE)
S.icon_override = null
overlays_standing[SHOES_LAYER] = shoes.build_worn_icon(state = shoes.icon_state, default_layer = SHOES_LAYER, default_icon_file = ((shoes.icon_override) ? shoes.icon_override : 'icons/mob/feet.dmi'))
var/mutable_appearance/shoes_overlay = overlays_standing[SHOES_LAYER]
if(OFFSET_SHOES in dna.species.offset_features)
@@ -282,13 +287,6 @@ There are several things that need to be remembered:
overlays_standing[SHOES_LAYER] = shoes_overlay
apply_overlay(SHOES_LAYER)
var/obj/item/clothing/shoes/S = H.shoes
if(swap_back)
S.adjusted = NORMAL_STYLE
else
S.adjusted = DIGITIGRADE_STYLE
H.update_inv_w_uniform()
/mob/living/carbon/human/update_inv_s_store()
remove_overlay(SUIT_STORE_LAYER)
+4 -4
View File
@@ -301,7 +301,7 @@
if(H.shoes)
var/obj/item/clothing/shoes/S = H.shoes
if(swap_back)
S.adjusted = NORMAL_STYLE
else
S.adjusted = DIGITIGRADE_STYLE
H.update_inv_w_uniform()
S.adjusted = NORMAL_STYLE
else
S.adjusted = DIGITIGRADE_STYLE
H.update_inv_shoes()