diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index a1c2b930ae..a2e5e48a36 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -377,9 +377,11 @@ body_parts_covered = FEET slot_flags = SLOT_FEET - var/can_hold_knife + var/can_hold_knife = 0 var/obj/item/holding + var/show_above_pants = 1 + permeability_coefficient = 0.50 slowdown = SHOES_SLOWDOWN force = 2 @@ -415,10 +417,10 @@ /obj/item/clothing/shoes/attackby(var/obj/item/I, var/mob/user) - if(can_hold_knife && istype(I, /obj/item/weapon/material/shard) || \ + if((can_hold_knife == 1) && (istype(I, /obj/item/weapon/material/shard) || \ istype(I, /obj/item/weapon/material/butterfly) || \ istype(I, /obj/item/weapon/material/kitchen/utensil) || \ - istype(I, /obj/item/weapon/material/hatchet/tacknife)) + istype(I, /obj/item/weapon/material/hatchet/tacknife))) if(holding) user << "\The [src] is already holding \a [holding]." return @@ -431,10 +433,23 @@ else return ..() +/obj/item/clothing/shoes/verb/toggle_layer() + set name = "Switch Shoe Layer" + set category = "Object" + + if(show_above_pants == -1) + usr << "\The [src] cannot be worn above your suit!" + return + show_above_pants = !show_above_pants + update_icon() + /obj/item/clothing/shoes/update_icon() overlays.Cut() if(holding) overlays += image(icon, "[icon_state]_knife") + if(ismob(usr)) + var/mob/M = usr + M.update_inv_shoes() return ..() /obj/item/clothing/shoes/proc/handle_movement(var/turf/walking, var/running) diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 5010b66cbc..6a54cc93e7 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -110,29 +110,30 @@ Please contact me on #coderbus IRC. ~Carn x #define DAMAGE_LAYER 2 #define SURGERY_LEVEL 3 //bs12 specific. #define UNDERWEAR_LAYER 4 -#define UNIFORM_LAYER 5 -#define ID_LAYER 6 -#define SHOES_LAYER 7 -#define GLOVES_LAYER 8 -#define BELT_LAYER 9 -#define SUIT_LAYER 10 -#define TAIL_LAYER 11 //bs12 specific. this hack is probably gonna come back to haunt me -#define GLASSES_LAYER 12 -#define BELT_LAYER_ALT 13 -#define SUIT_STORE_LAYER 14 -#define BACK_LAYER 15 -#define HAIR_LAYER 16 //TODO: make part of head layer? -#define EARS_LAYER 17 -#define FACEMASK_LAYER 18 -#define HEAD_LAYER 19 -#define COLLAR_LAYER 20 -#define HANDCUFF_LAYER 21 -#define LEGCUFF_LAYER 22 -#define L_HAND_LAYER 23 -#define R_HAND_LAYER 24 -#define FIRE_LAYER 25 //If you're on fire -#define TARGETED_LAYER 26 //BS12: Layer for the target overlay from weapon targeting system -#define TOTAL_LAYERS 26 +#define SHOES_LAYER_ALT 5 +#define UNIFORM_LAYER 6 +#define ID_LAYER 7 +#define SHOES_LAYER 8 +#define GLOVES_LAYER 9 +#define BELT_LAYER 10 +#define SUIT_LAYER 11 +#define TAIL_LAYER 12 //bs12 specific. +#define GLASSES_LAYER 13 +#define BELT_LAYER_ALT 14 +#define SUIT_STORE_LAYER 15 +#define BACK_LAYER 16 +#define HAIR_LAYER 17 //TODO: make part of head layer? +#define EARS_LAYER 18 +#define FACEMASK_LAYER 19 +#define HEAD_LAYER 20 +#define COLLAR_LAYER 21 +#define HANDCUFF_LAYER 22 +#define LEGCUFF_LAYER 23 +#define L_HAND_LAYER 24 +#define R_HAND_LAYER 25 +#define FIRE_LAYER 26 //If you're on fire +#define TARGETED_LAYER 27 //BS12: Layer for the target overlay from weapon targeting system +#define TOTAL_LAYERS 27 ////////////////////////////////// /mob/living/carbon/human @@ -514,7 +515,7 @@ var/global/list/damage_icon_parts = list() overlays_standing[UNIFORM_LAYER] = null //hiding/revealing shoes if necessary - update_inv_shoes(0) + update_inv_shoes(1) if(update_icons) update_icons() @@ -642,12 +643,21 @@ var/global/list/damage_icon_parts = list() else standing = image("icon" = 'icons/mob/feet.dmi', "icon_state" = "[shoes.icon_state]") + var/shoe_layer = SHOES_LAYER + if(istype(shoes, /obj/item/clothing/shoes)) + var/obj/item/clothing/shoes/ushoes = shoes + if(ushoes.show_above_pants) + overlays_standing[SHOES_LAYER] = null + shoe_layer = SHOES_LAYER_ALT + else + overlays_standing[SHOES_LAYER_ALT] = null + if(shoes.blood_DNA) var/image/bloodsies = image("icon" = species.get_blood_mask(src), "icon_state" = "shoeblood") bloodsies.color = shoes.blood_color standing.overlays += bloodsies standing.color = shoes.color - overlays_standing[SHOES_LAYER] = standing + overlays_standing[shoe_layer] = standing else if(feet_blood_DNA) var/image/bloodsies = image("icon" = species.get_blood_mask(src), "icon_state" = "shoeblood") @@ -655,6 +665,7 @@ var/global/list/damage_icon_parts = list() overlays_standing[SHOES_LAYER] = bloodsies else overlays_standing[SHOES_LAYER] = null + overlays_standing[SHOES_LAYER_ALT] = null if(update_icons) update_icons() /mob/living/carbon/human/update_inv_s_store(var/update_icons=1) diff --git a/html/changelogs/Anewbe - Shoes.yml b/html/changelogs/Anewbe - Shoes.yml new file mode 100644 index 0000000000..d007d5c548 --- /dev/null +++ b/html/changelogs/Anewbe - Shoes.yml @@ -0,0 +1,37 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +################################# + +# Your name. +author: Anewbe + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Adds a "Toggle Shoe Layer" verb to shoes, that let them be worn over the uniform (ie tucking your pants into your shoes)." + - bugfix: "Shoes now properly check if they can hold knives or not." \ No newline at end of file