Merge pull request #7592 from Poojawa/digishoes

Digitigrade Shoes
This commit is contained in:
deathride58
2018-09-27 21:29:39 -04:00
committed by GitHub
6 changed files with 35 additions and 10 deletions

View File

@@ -15,6 +15,10 @@
var/offset = 0
var/equipped_before_drop = FALSE
//CITADEL EDIT Enables digitigrade shoe styles
var/adjusted = NORMAL_STYLE
var/mutantrace_variation = MUTANTRACE_VARIATION
/obj/item/clothing/shoes/ComponentInitialize()
. = ..()
AddComponent(/datum/component/redirect, list(COMSIG_COMPONENT_CLEAN_ACT = CALLBACK(src, .proc/clean_blood)))
@@ -54,6 +58,16 @@
/obj/item/clothing/shoes/equipped(mob/user, slot)
. = ..()
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
H.update_inv_shoes()
if(offset && slot_flags & slotdefine2slotbit(slot))
user.pixel_y += offset
worn_y_dimension -= (offset * 2)

View File

@@ -918,9 +918,10 @@ GLOBAL_LIST_EMPTY(roundstart_races)
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
if(!is_species(H, /datum/species/lizard/ashwalker))
H.update_inv_shoes()
else
return FALSE
return equip_delay_self_check(I, H, bypass_equip_delay_self)
if(SLOT_BELT)
if(H.belt)

View File

@@ -268,11 +268,17 @@ There are several things that need to be remembered:
inv.update_icon()
if(shoes)
var/obj/item/clothing/shoes/S = shoes
shoes.screen_loc = ui_shoes //move the item to the appropriate screen loc
if(client && hud_used && hud_used.hud_shown)
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)
@@ -281,7 +287,6 @@ There are several things that need to be remembered:
overlays_standing[SHOES_LAYER] = shoes_overlay
apply_overlay(SHOES_LAYER)
/mob/living/carbon/human/update_inv_s_store()
remove_overlay(SUIT_STORE_LAYER)

View File

@@ -298,5 +298,10 @@
else
U.adjusted = DIGITIGRADE_STYLE
H.update_inv_w_uniform()
if(H.shoes && !swap_back)
H.dropItemToGround(H.shoes)
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_shoes()