[READY] LIZARD WINGS for the flight potion, flight potion no longer makes you new species (#46037)

* HEY RACISM GOT A SPRITE ACCESSORY FOR YA

* angel + dragonborn > givespeciesflight

* more review stuff

* last of the review stuff

* compile

* readds my fix

* Boolean numero uno

* Boolean numero dos
This commit is contained in:
tralezab
2019-08-24 00:11:25 -07:00
committed by Rob Bailey
parent e7b5ab0862
commit aaca9360b8
12 changed files with 170 additions and 169 deletions
@@ -338,6 +338,8 @@ GENE SCANNER
mutant = TRUE
else if (S.mutantstomach != initial(S.mutantstomach))
mutant = TRUE
else if (S.flying_species != initial(S.flying_species))
mutant = TRUE
to_chat(user, "<span class='info'>Species: [S.name][mutant ? "-derived mutant" : ""]</span>")
to_chat(user, "<span class='info'>Body temperature: [round(M.bodytemperature-T0C,0.1)] &deg;C ([round(M.bodytemperature*1.8-459.67,0.1)] &deg;F)</span>")
@@ -212,7 +212,6 @@
name = "satchel"
desc = "A trendy looking satchel."
icon_state = "satchel-norm"
species_exception = list(/datum/species/angel) //satchels can be equipped since they are on the side, not back
/obj/item/storage/backpack/satchel/leather
name = "leather satchel"
@@ -231,7 +231,6 @@ Contains:
icon_state = "ert_medical"
item_state = "ert_medical"
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/ert/med
species_exception = list(/datum/species/angel)
//ERT Janitor
/obj/item/clothing/head/helmet/space/hardsuit/ert/jani
@@ -609,16 +609,21 @@
/datum/reagent/flightpotion/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1)
if(iscarbon(M) && M.stat != DEAD)
if(!ishumanbasic(M) || reac_volume < 5) // implying xenohumans are holy
var/mob/living/carbon/C = M
var/holycheck = ishumanbasic(C)
if(!(holycheck || islizard(C)) || reac_volume < 5) // implying xenohumans are holy //as with all things,
if(method == INGEST && show_message)
to_chat(M, "<span class='notice'><i>You feel nothing but a terrible aftertaste.</i></span>")
to_chat(C, "<span class='notice'><i>You feel nothing but a terrible aftertaste.</i></span>")
return ..()
to_chat(M, "<span class='userdanger'>A terrible pain travels down your back as wings burst out!</span>")
M.set_species(/datum/species/angel)
playsound(M.loc, 'sound/items/poster_ripped.ogg', 50, 1, -1)
M.adjustBruteLoss(20)
M.emote("scream")
to_chat(C, "<span class='userdanger'>A terrible pain travels down your back as wings burst out!</span>")
C.dna.species.GiveSpeciesFlight(C)
if(holycheck)
to_chat(C, "<span class='notice'>You feel blessed!</span>")
ADD_TRAIT(C, TRAIT_HOLY, SPECIES_TRAIT)
playsound(C.loc, 'sound/items/poster_ripped.ogg', 50, TRUE, -1)
C.adjustBruteLoss(20)
C.emote("scream")
..()
@@ -1688,14 +1688,6 @@
/datum/sprite_accessory/wings_open
icon = 'icons/mob/wings.dmi'
/datum/sprite_accessory/wings_open/angel
name = "Angel"
icon_state = "angel"
color_src = 0
dimension_x = 46
center = TRUE
dimension_y = 34
/datum/sprite_accessory/wings
icon = 'icons/mob/wings.dmi'
@@ -1708,6 +1700,29 @@
dimension_y = 34
locked = TRUE
/datum/sprite_accessory/wings_open/angel
name = "Angel"
icon_state = "angel"
color_src = 0
dimension_x = 46
center = TRUE
dimension_y = 34
/datum/sprite_accessory/wings/dragon
name = "Dragon"
icon_state = "dragon"
dimension_x = 96
center = TRUE
dimension_y = 32
locked = TRUE
/datum/sprite_accessory/wings_open/dragon
name = "Dragon"
icon_state = "dragon"
dimension_x = 96
center = TRUE
dimension_y = 32
/datum/sprite_accessory/frills
icon = 'icons/mob/mutant_bodyparts.dmi'
@@ -1799,7 +1814,7 @@
icon_state = "round"
/datum/sprite_accessory/moth_wings
icon = 'icons/mob/wings.dmi'
icon = 'icons/mob/moth_wings.dmi'
color_src = null
/datum/sprite_accessory/moth_wings/plain
@@ -1054,9 +1054,6 @@
/mob/living/carbon/human/species/android
race = /datum/species/android
/mob/living/carbon/human/species/angel
race = /datum/species/angel
/mob/living/carbon/human/species/corporate
race = /datum/species/corporate
+131 -3
View File
@@ -49,6 +49,10 @@ GLOBAL_LIST_EMPTY(roundstart_races)
var/grab_sound //Special sound for grabbing
var/datum/outfit/outfit_important_for_life /// A path to an outfit that is important for species life e.g. plasmaman outfit
var/flying_species = FALSE //is a flying species, just a check for some things
var/datum/action/innate/flight/fly //the actual flying ability given to flying species
var/wings_icon = "Angel" //the icon used for the wings
// species-only traits. Can be found in DNA.dm
var/list/species_traits = list()
// generic traits tied to having the species
@@ -306,6 +310,10 @@ GLOBAL_LIST_EMPTY(roundstart_races)
for(var/i in inherent_factions)
C.faction += i //Using +=/-= for this in case you also gain the faction from a different source.
if(flying_species && isnull(fly))
fly = new
fly.Grant(C)
C.add_movespeed_modifier(MOVESPEED_ID_SPECIES, TRUE, 100, override=TRUE, multiplicative_slowdown=speedmod, movetypes=(~FLYING))
SEND_SIGNAL(C, COMSIG_SPECIES_GAIN, src, old_species)
@@ -331,6 +339,18 @@ GLOBAL_LIST_EMPTY(roundstart_races)
for(var/i in inherent_factions)
C.faction -= i
if(flying_species)
fly.Remove(C)
QDEL_NULL(fly)
if(C.movement_type & FLYING)
C.setMovetype(C.movement_type & ~FLYING)
ToggleFlight(C,0)
if(C.dna && C.dna.species && (C.dna.features["wings"] == wings_icon))
if("wings" in C.dna.species.mutant_bodyparts)
C.dna.species.mutant_bodyparts -= "wings"
C.dna.features["wings"] = "None"
C.update_body()
C.remove_movespeed_modifier(MOVESPEED_ID_SPECIES)
SEND_SIGNAL(C, COMSIG_SPECIES_LOSS, src)
@@ -757,6 +777,8 @@ GLOBAL_LIST_EMPTY(roundstart_races)
var/takes_crit_damage = (!HAS_TRAIT(H, TRAIT_NOCRITDAMAGE))
if((H.health < H.crit_threshold) && takes_crit_damage)
H.adjustBruteLoss(1)
if(flying_species)
HandleFlight(H)
/datum/species/proc/spec_death(gibbed, mob/living/carbon/human/H)
return
@@ -1769,10 +1791,13 @@ GLOBAL_LIST_EMPTY(roundstart_races)
////////////
//Stun//
// Stun //
////////////
/datum/species/proc/spec_stun(mob/living/carbon/human/H,amount)
if(flying_species && H.movement_type & FLYING)
ToggleFlight(H,0)
flyslip(H)
. = stunmod * H.physiology.stun_mod * amount
//////////////
@@ -1780,10 +1805,14 @@ GLOBAL_LIST_EMPTY(roundstart_races)
//////////////
/datum/species/proc/space_move(mob/living/carbon/human/H)
return 0
if(H.movement_type & FLYING)
return TRUE
return FALSE
/datum/species/proc/negates_gravity(mob/living/carbon/human/H)
return 0
if(H.movement_type & FLYING)
return TRUE
return FALSE
////////////////
//Tail Wagging//
@@ -1798,3 +1827,102 @@ GLOBAL_LIST_EMPTY(roundstart_races)
/datum/species/proc/start_wagging_tail(mob/living/carbon/human/H)
/datum/species/proc/stop_wagging_tail(mob/living/carbon/human/H)
///////////////
//FLIGHT SHIT//
///////////////
/datum/species/proc/GiveSpeciesFlight(mob/living/carbon/human/H)
if(flying_species) //species that already have flying traits should not work with this proc
return
flying_species = TRUE
if(isnull(fly))
fly = new
fly.Grant(H)
if(H.dna.features["wings"] != wings_icon)
mutant_bodyparts |= "wings"
H.dna.features["wings"] = wings_icon
H.update_body()
/datum/species/proc/HandleFlight(mob/living/carbon/human/H)
if(H.movement_type & FLYING)
if(!CanFly(H))
ToggleFlight(H,0)
return FALSE
return TRUE
else
return FALSE
/datum/species/proc/CanFly(mob/living/carbon/human/H)
if(H.stat || !(H.mobility_flags & MOBILITY_STAND))
return FALSE
if(H.wear_suit && ((H.wear_suit.flags_inv & HIDEJUMPSUIT) && (!H.wear_suit.species_exception || !is_type_in_list(src, H.wear_suit.species_exception)))) //Jumpsuits have tail holes, so it makes sense they have wing holes too
to_chat(H, "Your suit blocks your wings from extending!")
return FALSE
var/turf/T = get_turf(H)
if(!T)
return FALSE
var/datum/gas_mixture/environment = T.return_air()
if(environment && !(environment.return_pressure() > 30))
to_chat(H, "<span class='warning'>The atmosphere is too thin for you to fly!</span>")
return FALSE
else
return TRUE
/datum/species/proc/flyslip(mob/living/carbon/human/H)
var/obj/buckled_obj
if(H.buckled)
buckled_obj = H.buckled
to_chat(H, "<span class='notice'>Your wings spazz out and launch you!</span>")
playsound(H.loc, 'sound/misc/slip.ogg', 50, TRUE, -3)
for(var/obj/item/I in H.held_items)
H.accident(I)
var/olddir = H.dir
H.stop_pulling()
if(buckled_obj)
buckled_obj.unbuckle_mob(H)
step(buckled_obj, olddir)
else
new /datum/forced_movement(H, get_ranged_target_turf(H, olddir, 4), 1, FALSE, CALLBACK(H, /mob/living/carbon/.proc/spin, 1, 1))
return TRUE
//UNSAFE PROC, should only be called through the Activate or other sources that check for CanFly
/datum/species/proc/ToggleFlight(mob/living/carbon/human/H)
if(!(H.movement_type & FLYING))
stunmod *= 2
speedmod -= 0.35
H.setMovetype(H.movement_type | FLYING)
override_float = TRUE
H.pass_flags |= PASSTABLE
H.OpenWings()
H.update_mobility()
else
stunmod *= 0.5
speedmod += 0.35
H.setMovetype(H.movement_type & ~FLYING)
override_float = FALSE
H.pass_flags &= ~PASSTABLE
H.CloseWings()
/datum/action/innate/flight
name = "Toggle Flight"
check_flags = AB_CHECK_CONSCIOUS|AB_CHECK_STUN
icon_icon = 'icons/mob/actions/actions_items.dmi'
button_icon_state = "flight"
/datum/action/innate/flight/Activate()
var/mob/living/carbon/human/H = owner
var/datum/species/S = H.dna.species
if(S.CanFly(H))
S.ToggleFlight(H)
if(!(H.movement_type & FLYING))
to_chat(H, "<span class='notice'>You settle gently back onto the ground...</span>")
else
to_chat(H, "<span class='notice'>You beat your wings and begin to hover gently above the ground...</span>")
H.set_resting(FALSE, TRUE)
@@ -1,144 +0,0 @@
/datum/species/angel
name = "Angel"
id = "angel"
default_color = "FFFFFF"
species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS)
mutant_bodyparts = list("wings")
default_features = list("mcolor" = "FFF", "tail_human" = "None", "ears" = "None", "wings" = "Angel")
use_skintones = 1
no_equip = list(SLOT_BACK)
limbs_id = "human"
skinned_type = /obj/item/stack/sheet/animalhide/human
changesource_flags = MIRROR_BADMIN | WABBAJACK | ERT_SPAWN
var/datum/action/innate/flight/fly
/datum/species/angel/on_species_gain(mob/living/carbon/human/H, datum/species/old_species)
..()
if(H.dna && H.dna.species && (H.dna.features["wings"] != "Angel"))
if(!("wings" in H.dna.species.mutant_bodyparts))
H.dna.species.mutant_bodyparts |= "wings"
H.dna.features["wings"] = "Angel"
H.update_body()
if(ishuman(H) && !fly)
fly = new
fly.Grant(H)
ADD_TRAIT(H, TRAIT_HOLY, SPECIES_TRAIT)
/datum/species/angel/on_species_loss(mob/living/carbon/human/H)
if(fly)
fly.Remove(H)
if(H.movement_type & FLYING)
H.setMovetype(H.movement_type & ~FLYING)
ToggleFlight(H,0)
if(H.dna && H.dna.species && (H.dna.features["wings"] == "Angel"))
if("wings" in H.dna.species.mutant_bodyparts)
H.dna.species.mutant_bodyparts -= "wings"
H.dna.features["wings"] = "None"
H.update_body()
REMOVE_TRAIT(H, TRAIT_HOLY, SPECIES_TRAIT)
..()
/datum/species/angel/spec_life(mob/living/carbon/human/H)
HandleFlight(H)
/datum/species/angel/proc/HandleFlight(mob/living/carbon/human/H)
if(H.movement_type & FLYING)
if(!CanFly(H))
ToggleFlight(H,0)
return 0
return 1
else
return 0
/datum/species/angel/proc/CanFly(mob/living/carbon/human/H)
if(H.stat || !(H.mobility_flags & MOBILITY_STAND))
return 0
if(H.wear_suit && ((H.wear_suit.flags_inv & HIDEJUMPSUIT) && (!H.wear_suit.species_exception || !is_type_in_list(src, H.wear_suit.species_exception)))) //Jumpsuits have tail holes, so it makes sense they have wing holes too
to_chat(H, "Your suit blocks your wings from extending!")
return 0
var/turf/T = get_turf(H)
if(!T)
return 0
var/datum/gas_mixture/environment = T.return_air()
if(environment && !(environment.return_pressure() > 30))
to_chat(H, "<span class='warning'>The atmosphere is too thin for you to fly!</span>")
return 0
else
return 1
/datum/action/innate/flight
name = "Toggle Flight"
check_flags = AB_CHECK_CONSCIOUS|AB_CHECK_STUN
icon_icon = 'icons/mob/actions/actions_items.dmi'
button_icon_state = "flight"
/datum/action/innate/flight/Activate()
var/mob/living/carbon/human/H = owner
var/datum/species/angel/A = H.dna.species
if(A.CanFly(H))
if(H.movement_type & FLYING)
to_chat(H, "<span class='notice'>You settle gently back onto the ground...</span>")
A.ToggleFlight(H,FALSE)
H.update_mobility()
else
to_chat(H, "<span class='notice'>You beat your wings and begin to hover gently above the ground...</span>")
A.ToggleFlight(H,TRUE)
H.set_resting(FALSE, TRUE)
/datum/species/angel/proc/flyslip(mob/living/carbon/human/H)
var/obj/buckled_obj
if(H.buckled)
buckled_obj = H.buckled
to_chat(H, "<span class='notice'>Your wings spazz out and launch you!</span>")
playsound(H.loc, 'sound/misc/slip.ogg', 50, 1, -3)
for(var/obj/item/I in H.held_items)
H.accident(I)
var/olddir = H.dir
H.stop_pulling()
if(buckled_obj)
buckled_obj.unbuckle_mob(H)
step(buckled_obj, olddir)
else
for(var/i=1, i<5, i++)
spawn (i)
step(H, olddir)
H.spin(1,1)
return 1
/datum/species/angel/spec_stun(mob/living/carbon/human/H,amount)
if(H.movement_type & FLYING)
ToggleFlight(H,0)
flyslip(H)
. = ..()
/datum/species/angel/negates_gravity(mob/living/carbon/human/H)
if(H.movement_type & FLYING)
return 1
/datum/species/angel/space_move(mob/living/carbon/human/H)
if(H.movement_type & FLYING)
return 1
/datum/species/angel/proc/ToggleFlight(mob/living/carbon/human/H,flight)
if(flight && CanFly(H))
stunmod = 2
speedmod = -0.35
H.setMovetype(H.movement_type | FLYING)
override_float = TRUE
H.pass_flags |= PASSTABLE
H.OpenWings()
else
stunmod = 1
speedmod = 0
H.setMovetype(H.movement_type & ~FLYING)
override_float = FALSE
H.pass_flags &= ~PASSTABLE
H.CloseWings()
@@ -23,6 +23,7 @@
liked_food = GROSS | MEAT
inert_mutation = FIREBREATH
deathsound = 'sound/voice/lizard/deathsound.ogg'
wings_icon = "Dragon"
/datum/species/lizard/after_equip_job(datum/job/J, mob/living/carbon/human/H)
H.grant_language(/datum/language/draconic)
Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 20 KiB

-1
View File
@@ -2114,7 +2114,6 @@
#include "code\modules\mob\living\carbon\human\update_icons.dm"
#include "code\modules\mob\living\carbon\human\species_types\abductors.dm"
#include "code\modules\mob\living\carbon\human\species_types\android.dm"
#include "code\modules\mob\living\carbon\human\species_types\angel.dm"
#include "code\modules\mob\living\carbon\human\species_types\corporate.dm"
#include "code\modules\mob\living\carbon\human\species_types\dullahan.dm"
#include "code\modules\mob\living\carbon\human\species_types\ethereal.dm"