Merge pull request #305 from lbnesquik/FlyingTweaks

Buff flying
This commit is contained in:
Vollybally
2019-01-25 10:10:54 -05:00
committed by GitHub
13 changed files with 38 additions and 10 deletions
@@ -74,6 +74,8 @@ var/global/list/image/splatter_cache=list()
return
if(amount < 1)
return
if(perp.flying) //Flap flap. Chomp edit. Thanks KasparoVy
return
var/obj/item/organ/external/l_foot = perp.get_organ("l_foot")
var/obj/item/organ/external/r_foot = perp.get_organ("r_foot")
@@ -69,6 +69,9 @@
if(M.buckled) //wheelchairs, office chairs, rollerbeds
return
if(M.flying) //Flap flap. Chomp edit. Thanks KasparoVy This is before the sound so you can fly stealthly. Plus why would there be a noise if you didn't touch.
return
playsound(src.loc, 'sound/effects/glass_step.ogg', 50, 1) // not sure how to handle metal shards with sounds
if(ishuman(M))
var/mob/living/carbon/human/H = M
+5
View File
@@ -7,6 +7,8 @@
M.stop_flying()
/obj/structure/table/stumble_into(mob/living/M)
if(M.flying && !(M.confused || M.is_blind())) //If you're not flying, or you're flying confused/blind, take the tumble.
return
var/obj/occupied = turf_is_crowded()
if(occupied)
return ..()
@@ -45,6 +47,7 @@
M.Weaken(5)
M.stop_flying()
//Morgue thing.
/obj/structure/m_tray/stumble_into(mob/living/M)
playsound(get_turf(src), 'sound/weapons/tablehit1.ogg', 25, 1, -1)
visible_message("<span class='warning'>[M] flopped onto \the [src]!</span>")
@@ -69,6 +72,8 @@
M.stop_flying()
/obj/structure/railing/stumble_into(mob/living/M)
if(M.flying && !(M.confused || M.is_blind())) //If you're not flying, or you're flying confused/blind, take the tumble.
return
var/obj/occupied = turf_is_crowded()
if(occupied)
return ..()
+1 -1
View File
@@ -97,7 +97,7 @@
return ..()
/mob/living/proc/check_submerged()
if(buckled)
if(buckled || flying) //Chomp edit. Thanks kasparoVy
return 0
var/turf/simulated/floor/water/T = loc
if(istype(T))
+2
View File
@@ -361,6 +361,8 @@
/mob/living/carbon/slip(var/slipped_on,stun_duration=8)
if(buckled)
return 0
if(flying) //chomp edit. Thanks Kasparo
return 0
stop_pulling()
src << "<span class='warning'>You slipped on [slipped_on]!</span>"
playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
@@ -25,7 +25,13 @@
if ("nme")
nme()
return TRUE
if ("airflip")
if(!flying)
to_chat(src, "<span class='warning'>You can't *flip when you are on the ground!</span>")
else
src.SpinAnimation(-7,1)
message = "flips backwards in the air!"
m_type = 1
if ("flip")
var/danger = 1 //Base 1% chance to break something.
var/list/involved_parts = list(BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT)
@@ -210,7 +210,7 @@
if(!has_organ(BP_L_FOOT) && !has_organ(BP_R_FOOT))
return // no feet = no footsteps
if(buckled || lying || throwing)
if(buckled || lying || throwing || flying)
return // people flying, lying down or sitting do not step
if(!has_gravity(src) && prob(75))
@@ -769,13 +769,17 @@
if(C.nutrition < 25 && !C.flying) //Don't have any food in you?" You can't fly.
to_chat(C, "<span class='notice'>You lack the nutrition to fly.</span>")
return
if(C.nutrition > 1000 && !C.flying)
if(C.nutrition > 2200 && !C.flying) //Chomp edit. 1000 -> 2200
to_chat(C, "<span class='notice'>You have eaten too much to fly! You need to lose some nutrition.</span>")
return
if(C.weight > 325 && !C.flying) //Referencing the 'very fat' range from examine_weight() in examine_vr.dm.
to_chat(C, "<span class='notice'>You are too heavy to fly! You need to shed some weight.</span>")
return
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()
@@ -802,8 +806,8 @@
if(!C.anchored && !C.pulledby) //Not currently anchored, and not pulled by anyone.
C.anchored = 1 //This is the only way to stop the inertial_drift.
C.nutrition -= 25
update_floating()
C.nutrition -= 15 //Chomp edit. 25 -> 15
start_floating() //You do the floating animation when you toggle flight but don't move. Force it here for hovering as well. Chomp edit.
to_chat(C, "<span class='notice'>You hover in place.</span>")
spawn(6) //.6 seconds.
C.anchored = 0
@@ -97,7 +97,7 @@
/datum/trait/winged_flight
name = "Winged Flight"
desc = "Allows you to fly by using your wings."
cost = 2 //Some in game value.
cost = 3
/datum/trait/winged_flight/apply(var/datum/species/S,var/mob/living/carbon/human/H)
..(S,H)
+4 -2
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
@@ -188,11 +189,12 @@
var/mob/H = src //VOREStation Edit Start. Flight on mobs.
if(H.flying) //Some other checks are done in the wings_toggle proc
if(H.nutrition > 2)
H.nutrition -= 2 //You use up 2 nutrition per TILE and tick of flying above open spaces. If people wanna flap their wings in the hallways, shouldn't penalize them for it.
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.
+4
View File
@@ -10,6 +10,10 @@
return 1
if(istype(mover) && mover.checkpass(PASSTABLE))
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
var/obj/structure/table/table = locate(/obj/structure/table) in get_turf(mover)
Binary file not shown.
Binary file not shown.