From 02ab728a24369737a8accec0e8fd06c487c3cac3 Mon Sep 17 00:00:00 2001 From: Birdtalon Date: Sun, 3 Dec 2023 09:24:51 +0000 Subject: [PATCH] New Radial Menu for Xeno Evolve (#5022) # About the pull request Converts xeno evolve menu to a radial one. ![dreamseeker_2023-11-24_14-56-31](https://github.com/cmss13-devs/cmss13/assets/25027759/f8af0b0c-16ce-485f-bd31-a0780adda076) ![dreamseeker_2023-11-24_14-50-01](https://github.com/cmss13-devs/cmss13/assets/25027759/62e47d79-731a-4f16-86a8-a63e5ab24326) ![dreamseeker_2023-11-24_14-56-20](https://github.com/cmss13-devs/cmss13/assets/25027759/3be32724-5bf3-4438-87d7-9a4666902ffd) # Explain why it's good for the game It looks cool! # Testing Photographs and Procedure
Screenshots & Videos ![dreamseeker_2023-11-24_14-56-31](https://github.com/cmss13-devs/cmss13/assets/25027759/f8af0b0c-16ce-485f-bd31-a0780adda076) ![dreamseeker_2023-11-24_14-50-01](https://github.com/cmss13-devs/cmss13/assets/25027759/62e47d79-731a-4f16-86a8-a63e5ab24326) ![dreamseeker_2023-11-24_14-56-20](https://github.com/cmss13-devs/cmss13/assets/25027759/3be32724-5bf3-4438-87d7-9a4666902ffd)
# Changelog :cl: add: Radial Menu for xeno Evolve /:cl: --------- Co-authored-by: harryob --- .../mob/living/carbon/xenomorph/Evolution.dm | 9 ++++++++- .../mob/living/carbon/xenomorph/xeno_defines.dm | 16 ++++++++++++++++ icons/mob/xenos/radial_xenos.dmi | Bin 0 -> 4965 bytes 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 icons/mob/xenos/radial_xenos.dmi diff --git a/code/modules/mob/living/carbon/xenomorph/Evolution.dm b/code/modules/mob/living/carbon/xenomorph/Evolution.dm index 63aa7b09a633..af6be8265cc0 100644 --- a/code/modules/mob/living/carbon/xenomorph/Evolution.dm +++ b/code/modules/mob/living/carbon/xenomorph/Evolution.dm @@ -26,8 +26,15 @@ if(!length(castes_available)) to_chat(src, SPAN_WARNING("The Hive is not capable of supporting any castes you can evolve to yet.")) return + var/castepick + if((client.prefs && client.prefs.no_radials_preference) || !hive.evolution_menu_images) + castepick = tgui_input_list(usr, "You are growing into a beautiful alien! It is time to choose a caste.", "Evolve", castes_available, theme="hive_status") + else + var/list/fancy_caste_list = list() + for(var/caste in castes_available) + fancy_caste_list[caste] = hive.evolution_menu_images[caste] - var/castepick = tgui_input_list(usr, "You are growing into a beautiful alien! It is time to choose a caste.", "Evolve", castes_available, theme="hive_status") + castepick = show_radial_menu(src, src.client?.eye, fancy_caste_list) if(!castepick) //Changed my mind return diff --git a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm index 99f9c46b5b65..fc9585b56154 100644 --- a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm +++ b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm @@ -367,6 +367,13 @@ var/list/available_nicknumbers = list() + /*Stores the image()'s for the xeno evolution radial menu + To add an image for your caste - add an icon to icons/mob/xenos/radial_xenos.dmi + Icon size should be 32x32, to make them fit within the radial menu border size your icon 22x22 and leave 10px transparent border. + The name of the icon should be the same as the XENO_CASTE_ define for that caste eg. #define XENO_CASTE_DRONE "Drone" + */ + var/static/list/evolution_menu_images + /datum/hive_status/New() mutators.hive = src hive_ui = new(src) @@ -382,8 +389,17 @@ for(var/number in 1 to 999) available_nicknumbers += number + if(!evolution_menu_images) + evolution_menu_images = list() + generate_evo_menu_images() + RegisterSignal(SSdcs, COMSIG_GLOB_POST_SETUP, PROC_REF(post_setup)) +///Generate the image()'s requried for the evolution radial menu. +/datum/hive_status/proc/generate_evo_menu_images() + for(var/datum/caste_datum/caste as anything in subtypesof(/datum/caste_datum)) + evolution_menu_images[initial(caste.caste_type)] = image('icons/mob/xenos/radial_xenos.dmi', initial(caste.caste_type)) + /datum/hive_status/proc/post_setup() SIGNAL_HANDLER diff --git a/icons/mob/xenos/radial_xenos.dmi b/icons/mob/xenos/radial_xenos.dm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