mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Makes the var on /mob, making it easier to porrt.
This commit is contained in:
@@ -145,14 +145,9 @@ var/const/enterloopsanity = 100
|
||||
M.lastarea = get_area(M.loc)
|
||||
if(M.lastarea.has_gravity == 0)
|
||||
inertial_drift(M)
|
||||
if(ishuman(M)) //VORESTATION Edit Start. This overwrites the above is_space without touching it all that much.
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.wings_flying == 1)
|
||||
inertial_drift(H)
|
||||
M.make_floating(1)
|
||||
else if(!is_space())
|
||||
M.inertia_dir = 0
|
||||
M.make_floating(0) //VOREStation Edit End.
|
||||
if(M.flying == 1) //VORESTATION Edit Start. This overwrites the above is_space without touching it all that much.
|
||||
inertial_drift(M)
|
||||
M.make_floating(1) //VOREStation Edit End.
|
||||
else if(!is_space())
|
||||
M.inertia_dir = 0
|
||||
M.make_floating(0)
|
||||
|
||||
@@ -88,7 +88,7 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
return
|
||||
if(ishuman(src)) //VOREStation Edit Start. Floating code.
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(H.wings_flying == 1)
|
||||
if(H.flying == 1)
|
||||
make_floating(1)
|
||||
return //VOREStation Edit End
|
||||
var/turf/turf = get_turf(src)
|
||||
|
||||
@@ -1209,8 +1209,8 @@
|
||||
if(species.hard_vore_enabled == 1) //Hardvore verb.
|
||||
verbs |= /mob/living/carbon/human/proc/shred_limb
|
||||
if(species.can_fly == 1)
|
||||
verbs |= /mob/living/carbon/human/proc/wings_toggle //Flying wings!
|
||||
verbs |= /mob/living/carbon/human/proc/start_wings_hovering
|
||||
verbs |= /mob/living/proc/flying_toggle //Flying wings!
|
||||
verbs |= /mob/living/proc/start_wings_hovering
|
||||
//VOREStation Edit End
|
||||
|
||||
// Rebuild the HUD. If they aren't logged in then login() should reinstantiate it for them.
|
||||
@@ -1451,7 +1451,7 @@
|
||||
/mob/living/carbon/human/Check_Shoegrip()
|
||||
if(shoes && (shoes.item_flags & NOSLIP) && istype(shoes, /obj/item/clothing/shoes/magboots)) //magboots + dense_object = no floating
|
||||
return 1
|
||||
if(wings_flying == 1) //VOREStation Edit. Checks to see if they have wings and are flying.
|
||||
if(flying == 1) //VOREStation Edit. Checks to see if they have wings and are flying.
|
||||
return 1 //VOREStation Edit.
|
||||
return 0
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
if(((!check_drift) || (check_drift && thrust.stabilization_on)) && (!lying) && (thrust.allow_thrust(0.01, src)))
|
||||
inertia_dir = 0
|
||||
return 1
|
||||
if(wings_flying) //VOREStation Edit. If you're flying, you glide around!
|
||||
if(flying) //VOREStation Edit. If you're flying, you glide around!
|
||||
return 0 //VOREStation Edit.
|
||||
|
||||
//If no working jetpack then use the other checks
|
||||
|
||||
@@ -721,7 +721,7 @@
|
||||
C.visible_message("<font color='red'><b>[C] severely damages [D] of [T]!</b></font>") //Keep it vague. Let the /me's do the talking.
|
||||
log_and_message_admins("shreded [D] of [T].", C)
|
||||
|
||||
/mob/living/carbon/human/proc/wings_toggle()
|
||||
/mob/living/proc/flying_toggle()
|
||||
set name = "Toggle Flight"
|
||||
set desc = "While flying over open spaces, you will use up some nutrition. If you run out nutrition, you will fall. Additionally, you can't fly if you are too heavy."
|
||||
set category = "Abilities"
|
||||
@@ -733,20 +733,19 @@
|
||||
if(C.incapacitated(INCAPACITATION_ALL))
|
||||
to_chat(src, "You cannot fly in this state!")
|
||||
return
|
||||
if(C.nutrition < 25 && !C.wings_flying) //Don't have any food in you?" You can't fly.
|
||||
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.wings_flying)
|
||||
if(C.nutrition > 1000 && !C.flying)
|
||||
to_chat(C, "<span class='notice'>You have eaten too much to fly! You need to lose some nutrition.</span>")
|
||||
return
|
||||
|
||||
|
||||
C.wings_flying = !C.wings_flying
|
||||
C.flying = !C.flying
|
||||
update_floating()
|
||||
to_chat(C, "<span class='notice'>You have [C.wings_flying?"started":"stopped"] flying.</span>")
|
||||
to_chat(C, "<span class='notice'>You have [C.flying?"started":"stopped"] flying.</span>")
|
||||
|
||||
//Proc to stop inertial_drift. Exchange nutrition in order to stop gliding around.
|
||||
/mob/living/carbon/human/proc/start_wings_hovering()
|
||||
/mob/living/proc/start_wings_hovering()
|
||||
set name = "Hover"
|
||||
set desc = "Allows you to stop gliding and hover. This will take a fair amount of nutrition to perform."
|
||||
set category = "Abilities"
|
||||
@@ -758,7 +757,7 @@
|
||||
if(C.incapacitated(INCAPACITATION_ALL))
|
||||
to_chat(src, "You cannot hover in your current state!")
|
||||
return
|
||||
if(C.nutrition < 50 && !C.wings_flying) //Don't have any food in you?" You can't hover, since it takes up 25 nutrition. And it's not 25 since we don't want them to immediately fall.
|
||||
if(C.nutrition < 50 && !C.flying) //Don't have any food in you?" You can't hover, since it takes up 25 nutrition. And it's not 25 since we don't want them to immediately fall.
|
||||
to_chat(C, "<span class='notice'>You lack the nutrition to fly.</span>")
|
||||
return
|
||||
if(C.anchored == 1)
|
||||
|
||||
@@ -64,8 +64,8 @@
|
||||
update_icons()
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/proc/stop_flying(var/update_icons=1)
|
||||
wings_flying = 0
|
||||
/mob/proc/stop_flying(var/update_icons=1)
|
||||
flying = 0
|
||||
|
||||
if(update_icons)
|
||||
update_icons()
|
||||
@@ -146,7 +146,7 @@ default behaviour is:
|
||||
..()
|
||||
if (!istype(AM, /atom/movable) || AM.anchored)
|
||||
//VOREStation Edit - object-specific proc for running into things
|
||||
if(((confused || is_blind()) && stat == CONSCIOUS && prob(50) && m_intent=="run") || wings_flying)
|
||||
if(((confused || is_blind()) && stat == CONSCIOUS && prob(50) && m_intent=="run") || flying)
|
||||
AM.stumble_into(src)
|
||||
//VOREStation Edit End
|
||||
/* VOREStation Removal - See above
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
/mob
|
||||
var/vantag_hud = 0 // Do I have the HUD enabled?
|
||||
var/vantag_hud = 0 // Do I have the HUD enabled?
|
||||
var/flying = 0 //Allows flight
|
||||
@@ -517,6 +517,8 @@
|
||||
return dense_object
|
||||
|
||||
/mob/proc/Check_Shoegrip()
|
||||
if(flying == 1) //VOREStation Edit. Checks to see if they and are flying.
|
||||
return 1 //VOREStation Edit. Checks to see if they are flying. Mostly for this to be ported to Polaris.
|
||||
return 0
|
||||
|
||||
/mob/proc/Process_Spaceslipping(var/prob_slip = 5)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
var/noisy = 0 // Toggle audible hunger.
|
||||
var/absorbing_prey = 0 // Determines if the person is using the succubus drain or not. See station_special_abilities_vr.
|
||||
var/drain_finalized = 0 // Determines if the succubus drain will be KO'd/absorbed. Can be toggled on at any time.
|
||||
var/wings_flying = 0 // Determines if the person with wings is currently flying(floating) or not.
|
||||
|
||||
//
|
||||
// Hook for generic creation of stuff on new creatures
|
||||
|
||||
@@ -141,7 +141,7 @@ var/const/RESIZE_A_SMALLTINY = (RESIZE_SMALL + RESIZE_TINY) / 2
|
||||
now_pushing = 0
|
||||
if(src.get_effective_size() > tmob.get_effective_size())
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(H.wings_flying == 1)
|
||||
if(H.flying == 1)
|
||||
return 1 //Silently pass without a message.
|
||||
if(istype(H) && istype(H.tail_style, /datum/sprite_accessory/tail/taur/naga))
|
||||
src << "You carefully slither around [tmob]."
|
||||
@@ -170,11 +170,11 @@ var/const/RESIZE_A_SMALLTINY = (RESIZE_SMALL + RESIZE_TINY) / 2
|
||||
ASSERT(istype(tmob)) // Baby don't hurt me
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/P = src
|
||||
if(P.wings_flying == 1) //If they're flying, don't do any special interactions.
|
||||
if(P.flying == 1) //If they're flying, don't do any special interactions.
|
||||
return
|
||||
if(ishuman(tmob))
|
||||
var/mob/living/carbon/human/D = tmob
|
||||
if(D.wings_flying == 1) //if the prey is flying, don't smush them.
|
||||
if(D.flying == 1) //if the prey is flying, don't smush them.
|
||||
return
|
||||
|
||||
if(src.a_intent == I_DISARM && src.canmove && !src.buckled)
|
||||
|
||||
Reference in New Issue
Block a user