diff --git a/code/__defines/mobs.dm b/code/__defines/mobs.dm index 887946c826e..4ef15138b12 100644 --- a/code/__defines/mobs.dm +++ b/code/__defines/mobs.dm @@ -449,6 +449,7 @@ #define ROBOT_PANEL_CELL "cell" #define ROBOT_PANEL_NO_CELL "no cell" +#define ROBOT_ICON "iconpath" #define ROBOT_CHASSIS "chassistype" #define ROBOT_PANEL "paneltype" #define ROBOT_EYES "eyetype" diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 5bc17fcc4bb..c3289c6c076 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -287,8 +287,14 @@ if(custom_sprite) var/datum/custom_synth/sprite = robot_custom_icons[name] var/list/valid_states = icon_states(CUSTOM_ITEM_SYNTH) - if("[sprite.synthicon]-[mod_type]" in valid_states) - module_sprites["Custom"] = "[sprite.synthicon]-[mod_type]" + var/custom_iconpath = "[sprite.synthicon]-[mod_type]" + if(custom_iconpath in valid_states) + module_sprites["Custom"] = list( + ROBOT_CHASSIS = custom_iconpath, + ROBOT_EYES = custom_iconpath, + ROBOT_PANEL = custom_iconpath, + ROBOT_ICON = CUSTOM_ITEM_SYNTH + ) icon = CUSTOM_ITEM_SYNTH icontype = "Custom" else @@ -378,7 +384,7 @@ custom_name = newname updatename() - if(custom_sprite) + if(custom_sprite && module) set_module_sprites(module.sprites) // custom synth icons SSrecords.reset_manifest() @@ -1084,8 +1090,11 @@ else var/list/options = list() for(var/i in module_sprites) // Gottverdamnt. - var/image/radial_button = image(icon = src.icon, icon_state = module_sprites[i][ROBOT_CHASSIS]) - radial_button.overlays.Add(image(icon = src.icon, icon_state = "[module_sprites[i][ROBOT_EYES]]-eyes_help")) + var/icon/btn_icon = module_sprites[i][ROBOT_ICON] + if(!btn_icon) + btn_icon = initial(icon) + var/image/radial_button = image(btn_icon, icon_state = module_sprites[i][ROBOT_CHASSIS]) + radial_button.overlays.Add(image(btn_icon, icon_state = "[module_sprites[i][ROBOT_EYES]]-eyes_help")) options[i] = radial_button icontype = show_radial_menu(src, src, options, radius = 42, tooltips = TRUE) @@ -1093,6 +1102,8 @@ return icon_state = module_sprites[icontype][ROBOT_CHASSIS] + if(!module_sprites[icontype][ROBOT_ICON]) + icon = initial(icon) icon_selected = TRUE setup_icon_cache() diff --git a/code/modules/mob/living/silicon/robot/robot_helpers.dm b/code/modules/mob/living/silicon/robot/robot_helpers.dm index 3ee58e7cdc0..13629f8a364 100644 --- a/code/modules/mob/living/silicon/robot/robot_helpers.dm +++ b/code/modules/mob/living/silicon/robot/robot_helpers.dm @@ -28,7 +28,7 @@ var/eye_layer = src.layer if(lights_on && layer == MOB_LAYER) // in case you're hiding. so eyes don't go through tables. eye_layer = EFFECTS_ABOVE_LIGHTING_LAYER //make them glow in the dark if the lamp is on - var/eyeprefix = custom_sprite ? module_sprites[icontype] : module_sprites[icontype][ROBOT_EYES] + var/eyeprefix = module_sprites[icontype][ROBOT_EYES] if(speed == -2) // For combat drones with the mobility module. cached_eye_overlays = list( I_HELP = image(icon, "[eyeprefix]-roll-eyes_help", layer = eye_layer), diff --git a/html/changelogs/johnwildkins-robits.yml b/html/changelogs/johnwildkins-robits.yml new file mode 100644 index 00000000000..fb385729ba5 --- /dev/null +++ b/html/changelogs/johnwildkins-robits.yml @@ -0,0 +1,6 @@ +author: JohnWildkins + +delete-after: True + +changes: + - bugfix: "Custom borg sprites can now be selected again." diff --git a/icons/mob/custom_synthetic.dmi b/icons/mob/custom_synthetic.dmi index 230f5bacfac..fab131c8d65 100644 Binary files a/icons/mob/custom_synthetic.dmi and b/icons/mob/custom_synthetic.dmi differ