Add wings sounds.

This commit is contained in:
lbnesquik
2019-01-21 20:30:02 +01:00
parent 3e4f380670
commit 2e10d79730
5 changed files with 6 additions and 1 deletions
@@ -778,6 +778,8 @@
C.flying = !C.flying
update_floating()
to_chat(C, "<span class='notice'>You have [C.flying?"started":"stopped"] flying.</span>")
visible_message("<span class='notice'>[C] [C.flying?"started":"stopped"] flying!</span>")
playsound(usr.loc, 'sound/effects/wing2.ogg', 60, 1)
//Proc to stop inertial_drift. Exchange nutrition in order to stop gliding around.
/mob/living/proc/start_wings_hovering()
+3 -1
View File
@@ -62,6 +62,7 @@
H.audible_message("<span class='notice'>[H] begins to flap \his wings, preparing to move upwards!</span>")
if(do_after(H, fly_time) && H.flying)
to_chat(src, "<span class='notice'>You fly upwards.</span>")
playsound(src, 'sound/effects/wing2.ogg', 30, 1)
else
to_chat(src, "<span class='warning'>You stopped flying upwards.</span>")
return 0
@@ -189,10 +190,11 @@
if(H.flying) //Some other checks are done in the wings_toggle proc
if(H.nutrition > 2)
H.nutrition -= 1 //You use up 1 nutrition per TILE and tick of flying above open spaces.
playsound(H.loc, 'sound/effects/wing1.ogg', 25, 1)
if(H.incapacitated(INCAPACITATION_ALL))
H.stop_flying()
//Just here to see if the person is KO'd, stunned, etc. If so, it'll move onto can_fall.
else if (H.nutrition > 1000) //Eat too much while flying? Get fat and fall.
else if (H.nutrition > 2000) //Eat too much while flying? Get fat and fall.
to_chat(H, "<span class='danger'>You're too heavy! Your wings give out and you plummit to the ground!</span>")
H.stop_flying() //womp womp.
else if(H.nutrition < 300 && H.nutrition > 289) //290 would be risky, as metabolism could mess it up. Let's do 289.
+1
View File
@@ -12,6 +12,7 @@
return 1
var/mob/M = mover //Chomp edit
if(istype(M) && M.flying)
playsound(M, 'sound/effects/wing1.ogg', 20, 1)
return 1
if(locate(/obj/structure/table/bench) in get_turf(mover))
return 0
Binary file not shown.
Binary file not shown.