Fixes issues

This commit is contained in:
killer653
2017-11-03 18:23:20 -04:00
parent f81499a052
commit 42c8d39def
6 changed files with 21 additions and 14 deletions

View File

@@ -51,7 +51,7 @@
return 0
else if(ismob(src)) //VOREStation Edit Start. Are they a mob, and are they currently flying??
var/mob/H = src
if(H.flying == 1)
if(H.flying)
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.
@@ -59,7 +59,7 @@
var/fly_time = max(7 SECONDS + (H.movement_delay() * 10), 1) //So it's not too useful for combat. Could make this variable somehow, but that's down the road.
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>")
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>")
else
@@ -164,7 +164,7 @@
return
if(ismob(src))
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.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.
if(H.incapacitated(INCAPACITATION_ALL))
@@ -185,8 +185,15 @@
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.
else if(ishuman(H)) //Needed to prevent 2 people from grabbing eachother in the air.
var/mob/living/carbon/human/F = H
if(F.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!
var/obj/item/weapon/grab/G = F.get_active_hand()
var/obj/item/weapon/grab/J = F.get_inactive_hand()
if(istype(G) || istype(J))
//fall
else
return
if(can_fall())
// We spawn here to let the current move operation complete before we start falling. fall() is normally called from