Makes the var on /mob, making it easier to porrt.

This commit is contained in:
killer653
2017-10-31 19:08:45 -04:00
parent 2c8043d33c
commit 954d254f11
12 changed files with 63 additions and 72 deletions
+38 -43
View File
@@ -49,24 +49,20 @@
else
to_chat(src, "<span class='warning'>You gave up on pulling yourself up.</span>")
return 0
else if(ishuman(src)) //VOREStation Edit Start. Are they human (H above.), have a wing style, and do they have the trait?
var/mob/living/carbon/human/H = src //VOREStation Edit. Used for below
if(H.wings_flying == 1)
if(H.incapacitated(INCAPACITATION_ALL))
to_chat(src, "<span class='notice'>You can't fly in your current state.</span>")
H.stop_flying() //Should already be done, but just in case.
return 0
var/fly_time = max(7 SECONDS + (H.movement_delay() * 10), 1) //So it's not too useful for combat.
to_chat(src, "<span class='notice'>You begin to fly upwards...</span>")
destination.audible_message("<span class='notice'>You hear the flapping of wings.</span>")
H.audible_message("<span class='notice'>[H] begins to flap \his wings, preparing to move upwards!.</span>")
if(do_after(H, fly_time))
to_chat(src, "<span class='notice'>You fly upwards.</span>")
else
to_chat(src, "<span class='warning'>You stopped flying upwards.</span>")
return 0
var/mob/H = src //VOREStation Edit Start. Are they human (H above.), have a wing style, and do they have the trait?
if(H.flying == 1)
if(H.incapacitated(INCAPACITATION_ALL))
to_chat(src, "<span class='notice'>You can't fly in your current state.</span>")
H.stop_flying() //Should already be done, but just in case.
return 0
var/fly_time = max(7 SECONDS + (H.movement_delay() * 10), 1) //So it's not too useful for combat.
to_chat(src, "<span class='notice'>You begin to fly upwards...</span>")
destination.audible_message("<span class='notice'>You hear the flapping of wings.</span>")
H.audible_message("<span class='notice'>[H] begins to flap \his wings, preparing to move upwards!.</span>")
if(do_after(H, fly_time))
to_chat(src, "<span class='notice'>You fly upwards.</span>")
else
to_chat(src, "<span class='warning'>Gravity stops you from moving upward.</span>")
to_chat(src, "<span class='warning'>You stopped flying upwards.</span>")
return 0 //VOREStation Edit End.
else
to_chat(src, "<span class='warning'>Gravity stops you from moving upward.</span>")
@@ -104,7 +100,7 @@
if(incapacitated())
return 0
if(wings_flying) //VOREStation Edit. Allows movement up/down with wings.
if(flying) //VOREStation Edit. Allows movement up/down with wings.
return 1 //VOREStation Edit
if(Process_Spacemove())
@@ -162,31 +158,30 @@
if(throwing)
return
if(ishuman(src)) //VOREStation Edit Start. Code to see if they have wings.
var/mob/living/carbon/human/H = src
if(H.wings_flying == 1) //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.
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.
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.
to_chat(H, "<span class='danger'>You are starting to get fatigued... You probably have a good minute left in the air, if that. Even less if you continue to fly around! You should get to the ground soon!</span>") //Ticks are, on average, 3 seconds. So this would most likely be 90 seconds, but lets just say 60.
H.nutrition -= 10
return
else if(H.nutrition < 100 && H.nutrition > 89)
to_chat(H, "<span class='danger'>You're seriously fatigued! You need to get to the ground immediately and eat before you fall!</span>")
return
else if(H.nutrition < 2) //Should have listened to the warnings!
to_chat(H, "<span class='danger'>You lack the strength to keep yourself up in the air...</span>")
H.stop_flying()
else
return
if(H.grabbed_by.len) //If you're grabbed (presumably by someone flying) let's not have you fall. This also allows people to grab onto you while you jump over a railing to prevent you from falling!
return //VOREStation Edit End.
var/mob/H = src //VOREStation Edit Start. Flight on mobs.
if(H.flying == 1) //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.
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.
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.
to_chat(H, "<span class='danger'>You are starting to get fatigued... You probably have a good minute left in the air, if that. Even less if you continue to fly around! You should get to the ground soon!</span>") //Ticks are, on average, 3 seconds. So this would most likely be 90 seconds, but lets just say 60.
H.nutrition -= 10
return
else if(H.nutrition < 100 && H.nutrition > 89)
to_chat(H, "<span class='danger'>You're seriously fatigued! You need to get to the ground immediately and eat before you fall!</span>")
return
else if(H.nutrition < 2) //Should have listened to the warnings!
to_chat(H, "<span class='danger'>You lack the strength to keep yourself up in the air...</span>")
H.stop_flying()
else
return
if(H.grabbed_by.len) //If you're grabbed (presumably by someone flying) let's not have you fall. This also allows people to grab onto you while you jump over a railing to prevent you from falling!
return //VOREStation Edit End.
if(can_fall())
// We spawn here to let the current move operation complete before we start falling. fall() is normally called from