diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index 5261fa38db0..1c2b00f2de0 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -641,7 +641,7 @@ // /obj/item/clothing signals -///from base of obj/item/clothing/shoes/proc/step_action(): () +///from [/mob/living/carbon/human/Move]: () #define COMSIG_SHOES_STEP_ACTION "shoes_step_action" ///from base of /obj/item/clothing/suit/space/proc/toggle_spacesuit(): (obj/item/clothing/suit/space/suit) #define COMSIG_SUIT_SPACE_TOGGLE "suit_space_toggle" diff --git a/code/modules/clothing/shoes/bananashoes.dm b/code/modules/clothing/shoes/bananashoes.dm index e98cef336a7..9b8b8d64dd6 100644 --- a/code/modules/clothing/shoes/bananashoes.dm +++ b/code/modules/clothing/shoes/bananashoes.dm @@ -18,9 +18,11 @@ AddElement(/datum/element/update_icon_updates_onmob) AddComponent(/datum/component/material_container, list(/datum/material/bananium), 100 * MINERAL_MATERIAL_AMOUNT, MATCONTAINER_EXAMINE|MATCONTAINER_ANY_INTENT|MATCONTAINER_SILENT, allowed_items=/obj/item/stack) AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 75, falloff_exponent = 20) + RegisterSignal(src, COMSIG_SHOES_STEP_ACTION, .proc/on_step) + +/obj/item/clothing/shoes/clown_shoes/banana_shoes/proc/on_step() + SIGNAL_HANDLER -/obj/item/clothing/shoes/clown_shoes/banana_shoes/step_action() - . = ..() var/mob/wearer = loc var/datum/component/material_container/bananium = GetComponent(/datum/component/material_container) if(on && istype(wearer)) diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index 382863aaa7a..0940432baba 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -1,6 +1,3 @@ -/obj/item/clothing/shoes/proc/step_action() //this was made to rewrite clown shoes squeaking - SEND_SIGNAL(src, COMSIG_SHOES_STEP_ACTION) - /obj/item/clothing/shoes/sneakers/mime name = "mime shoes" icon_state = "mime" @@ -78,7 +75,13 @@ desc = "A pair of orange rubber boots, designed to prevent slipping on wet surfaces while also drying them." icon_state = "galoshes_dry" -/obj/item/clothing/shoes/galoshes/dry/step_action() +/obj/item/clothing/shoes/galoshes/dry/Initialize() + . = ..() + RegisterSignal(src, COMSIG_SHOES_STEP_ACTION, .proc/on_step) + +/obj/item/clothing/shoes/galoshes/dry/proc/on_step() + SIGNAL_HANDLER + var/turf/open/t_loc = get_turf(src) SEND_SIGNAL(t_loc, COMSIG_TURF_MAKE_DRY, TURF_WET_WATER, TRUE, INFINITY) diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index 359b0b56947..ef518022e3c 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -46,8 +46,7 @@ /mob/living/carbon/human/Move(NewLoc, direct) . = ..() if(shoes && body_position == STANDING_UP && loc == NewLoc && has_gravity(loc)) - var/obj/item/clothing/shoes/S = shoes - S.step_action() + SEND_SIGNAL(shoes, COMSIG_SHOES_STEP_ACTION) /mob/living/carbon/human/Process_Spacemove(movement_dir = 0) //Temporary laziness thing. Will change to handles by species reee. if(dna.species.space_move(src)) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm index 1ff98608b79..b0be59f1a85 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm @@ -315,6 +315,10 @@ Difficulty: Extremely Hard var/change_turf = /turf/open/floor/plating/ice/icemoon var/duration = 6 SECONDS +/obj/item/clothing/shoes/winterboots/ice_boots/ice_trail/Initialize() + . = ..() + RegisterSignal(src, COMSIG_SHOES_STEP_ACTION, .proc/on_step) + /obj/item/clothing/shoes/winterboots/ice_boots/ice_trail/equipped(mob/user, slot) . = ..() if(slot == ITEM_SLOT_FEET) @@ -333,8 +337,9 @@ Difficulty: Extremely Hard . = ..() . += "The shoes are [on ? "enabled" : "disabled"]." -/obj/item/clothing/shoes/winterboots/ice_boots/ice_trail/step_action() - . = ..() +/obj/item/clothing/shoes/winterboots/ice_boots/ice_trail/proc/on_step() + SIGNAL_HANDLER + var/turf/T = get_turf(loc) if(!on || istype(T, /turf/closed) || istype(T, change_turf)) return