Allows flight with wings.

This commit is contained in:
killer653
2017-10-28 19:51:14 -04:00
parent 6c85cd154c
commit e9585bfc6d
12 changed files with 84 additions and 5 deletions

View File

@@ -145,6 +145,14 @@ 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.
else if(!is_space())
M.inertia_dir = 0
M.make_floating(0)

View File

@@ -86,7 +86,11 @@ note dizziness decrements automatically in the mob's Life() proc.
if(anchored||buckled)
make_floating(0)
return
if(ishuman(src)) //VOREStation Edit Start. Floating code.
var/mob/living/carbon/human/H = src
if(H.wings_flying == 1)
make_floating(1)
return //VOREStation Edit End
var/turf/turf = get_turf(src)
if(!istype(turf,/turf/space))
var/area/A = turf.loc

View File

@@ -40,6 +40,7 @@
//Handle species-specific deaths.
species.handle_death(src)
animate_tail_stop()
stop_flying() //VOREStation Edit.
//Handle snowflake ling stuff.
if(mind && mind.changeling)

View File

@@ -1207,7 +1207,10 @@
verbs |= /mob/living/carbon/human/proc/succubus_drain_finialize
verbs |= /mob/living/carbon/human/proc/succubus_drain_lethal
if(species.hard_vore_enabled == 1) //Hardvore verb.
verbs |= /mob/living/carbon/human/proc/shred_limb //VOREStation Edit End
verbs |= /mob/living/carbon/human/proc/shred_limb
if(species.can_fly == 1)
verbs |= /mob/living/carbon/human/proc/wings_toggle //Flying wings!
//VOREStation Edit End
// Rebuild the HUD. If they aren't logged in then login() should reinstantiate it for them.
if(client && client.screen)
@@ -1447,6 +1450,8 @@
/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.
return 1 //VOREStation Edit.
return 0
//Puts the item into our active hand if possible. returns 1 on success.

View File

@@ -5,6 +5,7 @@
var/can_drain_prey = 0 //Determines if the person can use the succubus drain or not.
var/hard_vore_enabled = 0 //Determines if the person has the hardvore verb or not.
var/metabolism = 0.0015
var/can_fly = 0 //Determines if the species can fly if they have wings.
/datum/species/custom
name = "Custom Species"

View File

@@ -720,3 +720,21 @@
T.apply_damage(25, BRUTE, D)
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()
set name = "Toggle Flight"
set desc = "Toggle to allow for draining to be prolonged. Turn this on to make it so prey will be knocked out/die while being drained. Can be toggled at any time."
set category = "Abilities"
var/mob/living/carbon/human/C = src
if(!C.wing_style) //The species var isn't taken into account here, as it's only purpose is to give this proc to a person.
to_chat(src, "You cannot fly without wings!!")
return
if(stat || paralysis || stunned || weakened || lying || restrained() || buckled)
to_chat(src, "You cannot fly in this state!")
return
C.wings_flying = !C.wings_flying
update_floating()
to_chat(C, "<span class='notice'>You have [C.wings_flying?"started":"stopped"] flying.</span>")

View File

@@ -14,6 +14,7 @@
slowdown = -0.2 //scuttly, but not as scuttly as a tajara or a teshari.
brute_mod = 0.8 //About as tanky to brute as a Unathi. They'll probably snap and go feral when hurt though.
burn_mod = 1.15 //As vulnerable to burn as a Tajara.
can_fly = 1 //They have wings by default.
num_alternate_languages = 2
secondary_langs = list("Sol Common")

View File

@@ -119,6 +119,7 @@
secondary_langs = list(LANGUAGE_BIRDSONG)
name_language = LANGUAGE_BIRDSONG
color_mult = 1
can_fly = 1
min_age = 18
max_age = 80
@@ -357,6 +358,7 @@ datum/species/harpy
secondary_langs = list(LANGUAGE_BIRDSONG)
name_language = null
color_mult = 1
can_fly = 1
min_age = 18
max_age = 80

View File

@@ -119,3 +119,9 @@
desc = "Decreases stun duration from flashes and other light-based stuns and disabilities by 50%"
cost = 1
var_changes = list("flash_mod" = 0.5)
/datum/trait/winged_flight
name = "Winged Flight"
desc = "Allows you to fly by using your wings."
cost = 1 //Minor in game value.
var_changes = list("can_fly" = 1)

View File

@@ -63,3 +63,9 @@
if(update_icons)
update_icons()
return
/mob/living/carbon/human/proc/stop_flying(var/update_icons=1)
wings_flying = 0
if(update_icons)
update_icons()

View File

@@ -23,12 +23,12 @@
if(!istype(start))
to_chat(src, "<span class='notice'>You are unable to move from here.</span>")
return 0
var/turf/destination = (direction == UP) ? GetAbove(src) : GetBelow(src)
if(!destination)
to_chat(src, "<span class='notice'>There is nothing of interest in this direction.</span>")
return 0
if(!start.CanZPass(src, direction))
to_chat(src, "<span class='warning'>\The [start] is in the way.</span>")
return 0
@@ -49,6 +49,23 @@
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.stat || H.paralysis || H.stunned || H.weakened || H.lying || H.restrained() || H.buckled)
to_chat(src, "<span class='notice'>You can't fly in your current state.</span>")
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>")
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
else
to_chat(src, "<span class='warning'>Gravity stops you from moving upward.</span>")
return 0 //VOREStation Edit End.
else
to_chat(src, "<span class='warning'>Gravity stops you from moving upward.</span>")
return 0
@@ -140,6 +157,15 @@
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.stat || H.paralysis || H.stunned || H.weakened || H.lying || H.restrained() || H.buckled)
//Just here to see if the person is KO'd, stunned, etc. If so, it'll move onto can_call.
else
return
if(H.grabbed_by.len) //If you're grabbed (presumably by someone flying) let's not have you fall.
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
@@ -147,7 +173,7 @@
// or normal movement so other move behavior can continue.
var/mob/M = src
var/is_client_moving = (ismob(M) && M.client && M.client.moving)
spawn(0)
spawn(0)
if(is_client_moving) M.client.moving = 1
handle_fall(below)
if(is_client_moving) M.client.moving = 0

View File

@@ -19,6 +19,7 @@
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