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.dmi new file mode 100644 index 000000000000..2832f42fda33 Binary files /dev/null and b/icons/mob/xenos/radial_xenos.dmi differ