diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm index 960e50d7720..570cf1ec304 100644 --- a/code/modules/mob/living/emote.dm +++ b/code/modules/mob/living/emote.dm @@ -126,14 +126,14 @@ key_third_person = "flaps" message = "flaps their wings." hands_use_check = TRUE - var/wing_time = 20 + var/wing_time = 0.35 SECONDS /datum/emote/living/flap/run_emote(mob/user, params, type_override, intentional) . = ..() if(. && ishuman(user)) - var/mob/living/carbon/human/H = user + var/mob/living/carbon/human/human_user = user var/open = FALSE - var/obj/item/organ/external/wings/functional/wings = H.get_organ_slot(ORGAN_SLOT_EXTERNAL_WINGS) + var/obj/item/organ/external/wings/functional/wings = human_user.get_organ_slot(ORGAN_SLOT_EXTERNAL_WINGS) // open/close functional wings if(istype(wings)) @@ -144,9 +144,8 @@ wings.open_wings() addtimer(CALLBACK(wings, open ? TYPE_PROC_REF(/obj/item/organ/external/wings/functional, open_wings) : TYPE_PROC_REF(/obj/item/organ/external/wings/functional, close_wings)), wing_time) - // play moth flutter noise if moth wing - if(istype(wings, /obj/item/organ/external/wings/moth)) - playsound(H, 'sound/voice/moth/moth_flutter.ogg', 50, TRUE) + // play a flapping noise if the wing has this implemented + wings.make_flap_sound(human_user) /datum/emote/living/flap/aflap key = "aflap" diff --git a/code/modules/surgery/organs/external/wings/functional_wings.dm b/code/modules/surgery/organs/external/wings/functional_wings.dm index 5f2851b4676..a9eab672c1b 100644 --- a/code/modules/surgery/organs/external/wings/functional_wings.dm +++ b/code/modules/surgery/organs/external/wings/functional_wings.dm @@ -112,19 +112,20 @@ human.remove_traits(list(TRAIT_NO_FLOATING_ANIM, TRAIT_MOVE_FLYING), SPECIES_FLIGHT_TRAIT) passtable_off(human, SPECIES_FLIGHT_TRAIT) close_wings() - human.update_body_parts() ///SPREAD OUR WINGS AND FLLLLLYYYYYY /obj/item/organ/external/wings/functional/proc/open_wings() var/datum/bodypart_overlay/mutant/wings/functional/overlay = bodypart_overlay overlay.open_wings() wings_open = TRUE + owner.update_body_parts() ///close our wings /obj/item/organ/external/wings/functional/proc/close_wings() var/datum/bodypart_overlay/mutant/wings/functional/overlay = bodypart_overlay wings_open = FALSE overlay.close_wings() + owner.update_body_parts() if(isturf(owner?.loc)) var/turf/location = loc @@ -186,6 +187,9 @@ desc = "Powered by pure edgy-teenager-notebook-scribblings. Just kidding. But seriously, how do these keep you flying?!" sprite_accessory_override = /datum/sprite_accessory/wings/skeleton +/obj/item/organ/external/wings/functional/moth/make_flap_sound(mob/living/carbon/wing_owner) + playsound(wing_owner, 'sound/voice/moth/moth_flutter.ogg', 50, TRUE) + ///mothra wings, which relate to moths. /obj/item/organ/external/wings/functional/moth/mothra name = "mothra wings" diff --git a/code/modules/surgery/organs/external/wings/moth_wings.dm b/code/modules/surgery/organs/external/wings/moth_wings.dm index 11aebf4e8f1..87b944622aa 100644 --- a/code/modules/surgery/organs/external/wings/moth_wings.dm +++ b/code/modules/surgery/organs/external/wings/moth_wings.dm @@ -25,6 +25,9 @@ UnregisterSignal(organ_owner, list(COMSIG_HUMAN_BURNING, COMSIG_LIVING_POST_FULLY_HEAL, COMSIG_MOVABLE_PRE_MOVE)) REMOVE_TRAIT(organ_owner, TRAIT_FREE_FLOAT_MOVEMENT, REF(src)) +/obj/item/organ/external/wings/moth/make_flap_sound(mob/living/carbon/wing_owner) + playsound(wing_owner, 'sound/voice/moth/moth_flutter.ogg', 50, TRUE) + /obj/item/organ/external/wings/moth/can_soften_fall() return !burnt diff --git a/code/modules/surgery/organs/external/wings/wings.dm b/code/modules/surgery/organs/external/wings/wings.dm index 189c03e0277..775ffebf54c 100644 --- a/code/modules/surgery/organs/external/wings/wings.dm +++ b/code/modules/surgery/organs/external/wings/wings.dm @@ -13,6 +13,10 @@ /obj/item/organ/external/wings/proc/can_soften_fall() return TRUE +///Implement as needed to play a sound effect on *flap emote +/obj/item/organ/external/wings/proc/make_flap_sound(mob/living/carbon/wing_owner) + return + ///Bodypart overlay of default wings. Does not have any wing functionality /datum/bodypart_overlay/mutant/wings layers = ALL_EXTERNAL_OVERLAYS