diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index b15d0f2ba0..da63fcff64 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -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) diff --git a/code/modules/mob/animations.dm b/code/modules/mob/animations.dm index 4f05f7e0a8..121c58bb01 100644 --- a/code/modules/mob/animations.dm +++ b/code/modules/mob/animations.dm @@ -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) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 84fddc6460..af95eff14b 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -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 diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index 48c5a11c28..4103e96d7f 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -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 diff --git a/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm b/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm index 91d65ba68e..d123fb48bf 100644 --- a/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm @@ -721,7 +721,7 @@ C.visible_message("[C] severely damages [D] of [T]!") //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, "You lack the nutrition to fly.") return - if(C.nutrition > 1000 && !C.wings_flying) + if(C.nutrition > 1000 && !C.flying) to_chat(C, "You have eaten too much to fly! You need to lose some nutrition.") return - - C.wings_flying = !C.wings_flying + C.flying = !C.flying update_floating() - to_chat(C, "You have [C.wings_flying?"started":"stopped"] flying.") + to_chat(C, "You have [C.flying?"started":"stopped"] flying.") //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, "You lack the nutrition to fly.") return if(C.anchored == 1) diff --git a/code/modules/mob/living/carbon/human/update_icons_vr.dm b/code/modules/mob/living/carbon/human/update_icons_vr.dm index 056e600b80..64e2d2ceb5 100644 --- a/code/modules/mob/living/carbon/human/update_icons_vr.dm +++ b/code/modules/mob/living/carbon/human/update_icons_vr.dm @@ -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() \ No newline at end of file diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 8fff20982f..184395e79b 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -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 diff --git a/code/modules/mob/mob_defines_vr.dm b/code/modules/mob/mob_defines_vr.dm index 89dcd717df..df9e1f8edd 100644 --- a/code/modules/mob/mob_defines_vr.dm +++ b/code/modules/mob/mob_defines_vr.dm @@ -1,2 +1,3 @@ /mob - var/vantag_hud = 0 // Do I have the HUD enabled? \ No newline at end of file + var/vantag_hud = 0 // Do I have the HUD enabled? + var/flying = 0 //Allows flight \ No newline at end of file diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index e73d316433..10814cdf80 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -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) diff --git a/code/modules/multiz/movement.dm b/code/modules/multiz/movement.dm index 945175111f..7fc18c4ac7 100644 --- a/code/modules/multiz/movement.dm +++ b/code/modules/multiz/movement.dm @@ -49,24 +49,20 @@ else to_chat(src, "You gave up on pulling yourself up.") 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, "You can't fly in your current state.") - 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, "You begin to fly upwards...") - destination.audible_message("You hear the flapping of wings.") - H.audible_message("[H] begins to flap \his wings, preparing to move upwards!.") - if(do_after(H, fly_time)) - to_chat(src, "You fly upwards.") - else - to_chat(src, "You stopped flying upwards.") - 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, "You can't fly in your current state.") + 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, "You begin to fly upwards...") + destination.audible_message("You hear the flapping of wings.") + H.audible_message("[H] begins to flap \his wings, preparing to move upwards!.") + if(do_after(H, fly_time)) + to_chat(src, "You fly upwards.") else - to_chat(src, "Gravity stops you from moving upward.") + to_chat(src, "You stopped flying upwards.") return 0 //VOREStation Edit End. else to_chat(src, "Gravity stops you from moving upward.") @@ -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, "You're too heavy! Your wings give out and you plummit to the ground!") - 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, "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!") //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, "You're seriously fatigued! You need to get to the ground immediately and eat before you fall!") - return - else if(H.nutrition < 2) //Should have listened to the warnings! - to_chat(H, "You lack the strength to keep yourself up in the air...") - 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, "You're too heavy! Your wings give out and you plummit to the ground!") + 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, "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!") //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, "You're seriously fatigued! You need to get to the ground immediately and eat before you fall!") + return + else if(H.nutrition < 2) //Should have listened to the warnings! + to_chat(H, "You lack the strength to keep yourself up in the air...") + 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 diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index 5c8b3585d8..1a1ba7ff3f 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -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 diff --git a/code/modules/vore/resizing/resize_vr.dm b/code/modules/vore/resizing/resize_vr.dm index 7c5776690d..3081c592c5 100644 --- a/code/modules/vore/resizing/resize_vr.dm +++ b/code/modules/vore/resizing/resize_vr.dm @@ -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)