[MIRROR] New flight potion wing sprites for moths (#3065)

* New flight potion wing sprites for moths (#56412)

Wing sprites are courtesy of Papaporo Paprito over on Fulpstation!
This PR adds a second sprite for flight potion wings for moths.
A new system is implemented to make this possible, using radial menus.

* New flight potion wing sprites for moths

* Update species.dm

Co-authored-by: Jack7D1 <59462654+Jack7D1@users.noreply.github.com>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
Co-authored-by: Azarak <azarak10@gmail.com>
This commit is contained in:
SkyratBot
2021-02-20 15:41:56 +01:00
committed by GitHub
parent 5417a9a4a6
commit e8dcf3bae2
6 changed files with 43 additions and 3 deletions
@@ -1741,6 +1741,23 @@
center = TRUE
dimension_y = 32
/datum/sprite_accessory/wings/mothra
name = "Mothra"
icon_state = "mothra"
color_src = 0
dimension_x = 96
center = TRUE
dimension_y = 32
locked = TRUE
/datum/sprite_accessory/wings_open/mothra
name = "Mothra"
icon_state = "mothra"
color_src = 0
dimension_x = 96
center = TRUE
dimension_y = 32
/datum/sprite_accessory/frills
icon = 'icons/mob/mutant_bodyparts.dmi'
@@ -120,8 +120,10 @@ GLOBAL_LIST_EMPTY(roundstart_races)
var/flying_species = FALSE
///The actual flying ability given to flying species
var/datum/action/innate/flight/fly
///The icon used for the wings
///Current wings icon
var/wings_icon = "Angel"
//Dictates which wing icons are allowed for a given species. If count is >1 a radial menu is used to choose between all icons in list
var/list/wings_icons = list("Angel")
///Used to determine what description to give when using a potion of flight, if false it will describe them as growing new wings
var/has_innate_wings = FALSE
@@ -200,6 +202,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(!limbs_id) //if we havent set a limbs id to use, just use our own id
limbs_id = id
wings_icons = string_list(wings_icons)
..()
/**
@@ -2157,6 +2160,26 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(flying_species) //species that already have flying traits should not work with this proc
return
flying_species = TRUE
if(wings_icons.len > 1)
if(!H.client)
wings_icon = pick(wings_icons)
else
var/list/wings = list()
for(var/W in wings_icons)
//var/datum/sprite_accessory/S = GLOB.wings_list[W] //Gets the datum for every wing this species has, then prompts user with a radial menu //ORIGINAL
var/datum/sprite_accessory/S = GLOB.sprite_accessories["wings"][W] //SKYRAT EDIT CHANGE
var/image/img = image(icon = 'icons/mob/clothing/wings.dmi', icon_state = "m_wingsopen_[S.icon_state]_BEHIND") //Process the HUD elements
img.transform *= 0.5
img.pixel_x = -32
if(wings[S.name])
stack_trace("Different wing types with repeated names. Please fix as this may cause issues.")
else
wings[S.name] = img
wings_icon = show_radial_menu(H, H, wings, tooltips = TRUE)
if(!wings_icon)
wings_icon = pick(wings_icons)
else
wings_icon = wings_icons[1]
if(isnull(fly))
fly = new
fly.Grant(H)
@@ -24,7 +24,7 @@
liked_food = GROSS | MEAT
inert_mutation = FIREBREATH
deathsound = 'sound/voice/lizard/deathsound.ogg'
wings_icon = "Dragon"
wings_icons = list("Dragon")
species_language_holder = /datum/language_holder/lizard
// Lizards are coldblooded and can stand a greater temperature range than humans
bodytemp_heat_damage_limit = (BODYTEMP_HEAT_DAMAGE_LIMIT + 20) // This puts lizards 10 above lavaland max heat for ash lizards.
@@ -16,7 +16,7 @@
mutanteyes = /obj/item/organ/eyes/moth
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_MAGIC | MIRROR_PRIDE | ERT_SPAWN | RACE_SWAP | SLIME_EXTRACT
species_language_holder = /datum/language_holder/moth
wings_icon = "Megamoth"
wings_icons = list("Megamoth", "Mothra")
has_innate_wings = TRUE
payday_modifier = 0.75