Skip to content

Commit

Permalink
Icon rework for flying robots.
Browse files Browse the repository at this point in the history
  • Loading branch information
MistakeNot4892 committed Jul 20, 2023
1 parent 023cc05 commit 27ba4a4
Show file tree
Hide file tree
Showing 18 changed files with 127 additions and 38 deletions.
2 changes: 1 addition & 1 deletion code/game/objects/effects/decals/Cleanable/robots.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/obj/effect/decal/cleanable/blood/gibs/robot
name = "robot debris"
desc = "It's a useless heap of junk... <i>or is it?</i>"
icon = 'icons/mob/robots.dmi'
icon = 'icons/mob/robot_gibs.dmi'
icon_state = "gib1"
basecolor = SYNTH_BLOOD_COLOUR
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7")
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/effects/decals/remains.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

/obj/effect/decal/remains/robot
desc = "They look like the remains of something mechanical. They have a strange aura about them."
icon = 'icons/mob/robots.dmi'
icon = 'icons/mob/robot_gibs.dmi'
icon_state = "remainsrobot"

/obj/effect/decal/remains/mouse
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/silicon/robot/robot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/mob/living/silicon/robot
name = "Cyborg"
real_name = "Cyborg"
icon = 'icons/mob/robots.dmi'
icon = 'icons/mob/robots/robots_grounded.dmi'
icon_state = "robot"
maxHealth = 200
health = 200
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/silicon/robot/robot_modules/event.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// The module that borgs on the surface have. Generally has a lot of useful tools in exchange for questionable loyalty to the crew.
/obj/item/robot_module/robot/lost
name = "lost robot module"
module_category = ROBOT_MODULE_TYPE_FLYING
unavailable_by_default = TRUE
hide_on_manifest = TRUE
sprites = list(
Expand Down Expand Up @@ -38,8 +39,7 @@
unavailable_by_default = TRUE
hide_on_manifest = TRUE
sprites = list(
"Drone" = "drone-gravekeeper",
"Sleek" = "sleek-gravekeeper"
"Gravekeeper" = "sleek-gravekeeper"
)
modules = list(
/obj/item/melee/baton/shocker/robot,
Expand Down
52 changes: 28 additions & 24 deletions code/modules/mob/living/silicon/robot/robot_modules/station.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"Android" = "droid",
"Insekt" = "insekt-Default",
"Usagi-II" = "tall2standard",
"Pyralis" = "Glitterfly-Standard",
"Decapod" = "decapod-Standard",
"Pneuma" = "pneuma-Standard",
"Tower" = "drider-Standard"
Expand All @@ -30,6 +29,8 @@
module_category = ROBOT_MODULE_TYPE_FLYING
can_be_pushed = TRUE
sprites = list(
"Drone" = "drone-standard",
"Pyralis" = "Glitterfly-Standard",
"Cabeiri" = "eyebot-standard"
)

Expand All @@ -55,10 +56,8 @@
"Basic" = "Medbot",
"Advanced Droid" = "droid-medical",
"Needles" = "medicalrobot",
"Handy" = "handy-med",
"Insekt" = "insekt-Med",
"Usagi-II" = "tall2medical",
"Pyralis" = "Glitterfly-Surgeon",
"Decapod" = "decapod-Surgeon",
"Pneuma" = "pneuma-Surgeon",
"Tower" = "drider-Surgeon"
Expand Down Expand Up @@ -93,8 +92,10 @@
module_category = ROBOT_MODULE_TYPE_FLYING
can_be_pushed = TRUE
sprites = list(
"Drone" = "drone-medical",
"Eyebot" = "eyebot-medical"
"Handy" = "handy-med",
"Drone" = "drone-medical",
"Eyebot" = "eyebot-medical",
"Pyralis" = "Glitterfly-Surgeon"
)

/obj/item/robot_module/robot/medical/surgeon/finalize_emag()
Expand Down Expand Up @@ -145,7 +146,6 @@
"Needles" = "medicalrobot",
"Insekt" = "insekt-Med",
"Usagi-II" = "tall2medical",
"Pyralis" = "Glitterfly-Crisis",
"Decapod" = "decapod-Crisis",
"Pneuma" = "pneuma-Crisis",
"Tower" = "drider-Crisis"
Expand Down Expand Up @@ -174,8 +174,9 @@
module_category = ROBOT_MODULE_TYPE_FLYING
can_be_pushed = TRUE
sprites = list(
"Drone" = "drone-medical",
"Eyebot" = "eyebot-medical"
"Drone" = "drone-medical",
"Eyebot" = "eyebot-medical",
"Pyralis" = "Glitterfly-Crisis"
)

/obj/item/robot_module/robot/medical/crisis/finalize_emag()
Expand Down Expand Up @@ -233,9 +234,7 @@
"Landmate" = "landmate",
"Landmate - Treaded" = "engiborg+tread",
"Treadwell" = "treadwell",
"Handy" = "handy-engineer",
"Usagi-II" = "tall2engineer",
"Pyralis" = "Glitterfly-Engineering",
"Decapod" = "decapod-Engineering",
"Pneuma" = "pneuma-Engineering",
"Tower" = "drider-Engineering"
Expand Down Expand Up @@ -322,8 +321,10 @@
module_category = ROBOT_MODULE_TYPE_FLYING
can_be_pushed = TRUE
sprites = list(
"Drone" = "drone-engineer",
"Eyebot" = "eyebot-engineering"
"Handy" = "handy-engineer",
"Drone" = "drone-engineer",
"Eyebot" = "eyebot-engineering",
"Pyralis" = "Glitterfly-Engineering",
)

/obj/item/robot_module/robot/security
Expand Down Expand Up @@ -358,7 +359,6 @@
"Black Knight" = "securityrobot",
"Insekt" = "insekt-Sec",
"Usagi-II" = "tall2security",
"Pyralis" = "Glitterfly-Security",
"Decapod" = "decapod-Security",
"Pneuma" = "pneuma-Security",
"Tower" = "drider-Security"
Expand All @@ -368,8 +368,9 @@
module_category = ROBOT_MODULE_TYPE_FLYING
can_be_pushed = TRUE
sprites = list(
"Drone" = "drone-sec",
"Eyebot" = "eyebot-security"
"Pyralis" = "Glitterfly-Security",
"Drone" = "drone-sec",
"Eyebot" = "eyebot-security"
)

/obj/item/robot_module/robot/security/respawn_consumable(var/mob/living/silicon/robot/R, var/amount)
Expand Down Expand Up @@ -402,7 +403,6 @@
"Mopbot" = "janitorrobot",
"Mop Gear Rex" = "mopgearrex",
"Usagi-II" = "tall2janitor",
"Pyralis" = "Glitterfly-Janitor",
"Decapod" = "decapod-Janitor",
"Pneuma" = "pneuma-Janitor",
"Tower" = "drider-Janitor"
Expand All @@ -419,7 +419,9 @@
module_category = ROBOT_MODULE_TYPE_FLYING
can_be_pushed = TRUE
sprites = list(
"Cabeiri" = "eyebot-janitor",
"Drone" = "drone-janitor",
"Pyralis" = "Glitterfly-Janitor",
"Cabeiri" = "eyebot-janitor"
)

/obj/item/robot_module/robot/janitor/finalize_emag()
Expand Down Expand Up @@ -475,7 +477,6 @@
"Bro" = "Brobot",
"Rich" = "maximillion",
"Usagi-II" = "tall2service",
"Pyralis" = "Glitterfly-Service",
"Decapod" = "decapod-Service",
"Pneuma" = "pneuma-Service",
"Tower" = "drider-Service"
Expand Down Expand Up @@ -503,6 +504,7 @@
module_category = ROBOT_MODULE_TYPE_FLYING
can_be_pushed = TRUE
sprites = list(
"Pyralis" = "Glitterfly-Service",
"Eyebot" = "eyebot-standard",
"Service Drone" = "drone-service",
"Hydroponics Drone" = "drone-hydro"
Expand Down Expand Up @@ -541,7 +543,6 @@
"Rich" = "maximillion",
"Default" = "Service2",
"Usagi-II" = "tall2service",
"Pyralis" = "Glitterfly-Clerical",
"Decapod" = "decapod-Clerical",
"Pneuma" = "pneuma-Clerical",
"Tower" = "drider-Clerical"
Expand All @@ -562,7 +563,8 @@
sprites = list(
"Eyebot" = "eyebot-standard",
"Service Drone" = "drone-service",
"Hydroponics Drone" = "drone-hydro"
"Hydroponics Drone" = "drone-hydro",
"Pyralis" = "Glitterfly-Clerical"
)

/obj/item/robot_module/general/butler/respawn_consumable(var/mob/living/silicon/robot/R, var/amount)
Expand All @@ -588,7 +590,6 @@
"Advanced Droid" = "droid-miner",
"Treadhead" = "Miner",
"Usagi-II" = "tall2miner",
"Pyralis" = "Glitterfly-Miner",
"Decapod" = "decapod-Miner",
"Pneuma" = "pneuma-Miner",
"Tower" = "drider-Miner"
Expand All @@ -609,7 +610,9 @@
module_category = ROBOT_MODULE_TYPE_FLYING
can_be_pushed = TRUE
sprites = list(
"Cabeiri" = "eyebot-miner"
"Drone" = "drone-miner",
"Cabeiri" = "eyebot-miner",
"Pyralis" = "Glitterfly-Miner"
)

/obj/item/robot_module/robot/research
Expand All @@ -622,10 +625,8 @@
"WTDove" = "whitespider",
"WTOperator" = "sleekscience",
"Droid" = "droid-science",
"Handy" = "handy-science",
"Insekt" = "insekt-Sci",
"Usagi-II" = "tall2peace",
"Pyralis" = "Glitterfly-Research",
"Decapod" = "decapod-Research",
"Pneuma" = "pneuma-Research",
"Tower" = "drider-Research"
Expand Down Expand Up @@ -668,6 +669,9 @@
module_category = ROBOT_MODULE_TYPE_FLYING
can_be_pushed = TRUE
sprites = list(
"Handy" = "handy-science",
"Drone" = "drone-science",
"Pyralis" = "Glitterfly-Research",
"Cabeiri" = "eyebot-science"
)

Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/silicon/robot/subtypes/flying.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/mob/living/silicon/robot/flying
desc = "A utility robot with an anti-gravity hover unit and a lightweight frame."
icon = 'icons/mob/robots_flying.dmi'
icon = 'icons/mob/robots/robots_flying.dmi'
icon_state = "drone-standard"
module_category = ROBOT_MODULE_TYPE_FLYING
dismantle_type = /obj/item/robot_parts/frame/flyer
Expand Down
5 changes: 0 additions & 5 deletions code/modules/mob/living/silicon/robot/subtypes/gravekeeper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,12 @@

/mob/living/silicon/robot/gravekeeper/init()
aiCamera = new/obj/item/camera/siliconcam/robot_camera(src)

mmi = new /obj/item/mmi/digital/robot(src)
module = new /obj/item/robot_module/robot/gravekeeper(src)
cut_overlays()
init_id()

updatename("Gravekeeper")

if(!cell)
cell = new /obj/item/cell/high(src) // 15k cell, as recharging stations are a lot more rare on the Surface.

laws = new /datum/ai_laws/gravekeeper()

playsound(src, 'sound/mecha/nominalsyndi.ogg', 75, 0)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/mob/living/silicon/robot/platform
name = "support platform"
desc = "A large quadrupedal AI platform, colloquially known as a 'think-tank' due to the flexible onboard intelligence."
icon = 'icons/mob/robots_thinktank.dmi'
icon = 'icons/mob/robots/robots_platform.dmi'
icon_state = "tachi"
color = "#68a2f2"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
var/base_color = COLOR_WHITE
var/eye_color = COLOR_BEIGE
var/armor_color = "#68a2f2"
var/user_icon = 'icons/mob/robots_thinktank.dmi'
var/user_icon = 'icons/mob/robots/robots_platform.dmi'
var/user_icon_state = "tachi"

var/list/decals
Expand Down
2 changes: 1 addition & 1 deletion code/modules/xenoarcheaology/finds/find_spawning.dm
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@
//robot remains
apply_prefix = FALSE
item_type = "[pick("mechanical","robotic","cyborg")] [pick("remains","chassis","debris")]"
icon = 'icons/mob/robots.dmi'
icon = 'icons/mob/robot_gibs.dmi'
icon_state = "remainsrobot"
additional_desc = pick("Almost mistakeable for the remains of a modern cyborg.",\
"They are barely recognisable as anything other than a pile of waste metals.",\
Expand Down
89 changes: 89 additions & 0 deletions code/unit_tests/icon_tests.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/datum/unit_test/robot_module_icons_shall_be_valid
name = "ICONS: Robot module icons shall be valid"
var/list/check_module_categories = list(
ROBOT_MODULE_TYPE_GROUNDED,
ROBOT_MODULE_TYPE_FLYING
)
var/list/panel_overlays = list(
"ov-openpanel +w",
"ov-openpanel +c",
"ov-openpanel -c"
)
var/list/gear_to_check = list(
/obj/item/borg/combat/shield = "-shield",
/obj/item/borg/combat/mobility = "-roll"
)

/datum/unit_test/robot_module_icons_shall_be_valid/start_test()

var/list/failures = list()
// fetch our icon states to check against
var/list/icon_state_cache = list(
ROBOT_MODULE_TYPE_GROUNDED = icon_states('icons/mob/robots/robots_grounded.dmi'),
ROBOT_MODULE_TYPE_FLYING = icon_states('icons/mob/robots/robots_flying.dmi')
)

// We need a robot to properly initialize the module, which is somewhat unfortunate.
var/list/found_states = list() // Keep track of this for checking for unused states later.
for(var/module_type in subtypesof(/obj/item/robot_module))

// Skip abstract modules and think-tanks as they do icon gen differently.
var/obj/item/robot_module/module = module_type
if(!initial(module.display_name) || !(initial(module.module_category) in check_module_categories))
continue

module = new module // this will automatically qdelete, but we just want the sprites.

// Check that the expected states are actually in the icon file.
LAZYINITLIST(found_states[module.module_category])
var/check_states = icon_state_cache[module.module_category]
for(var/sprite in module.sprites)

// Basic sprite.
var/check_state = module.sprites[sprite]
if(check_state in check_states)
found_states[module.module_category] |= check_state
else
failures += "missing base state '[check_state]' for [module.display_name] ([module.module_category])"

// Eyes overlay.
var/eye_check_state = "eyes-[check_state]"
if(eye_check_state in check_states)
found_states[module.module_category] |= eye_check_state
else
failures += "missing eyes state '[eye_check_state]' for [module.display_name] ([module.module_category])"

// Equipment overlays.
for(var/geartype in gear_to_check)
var/suffix = gear_to_check[geartype]
for(var/gear in module.modules)
if(!istype(gear, geartype))
continue
var/gear_check_state = "[check_state][suffix]"
if(gear_check_state in check_states)
found_states[module.module_category] |= gear_check_state
else
failures += "missing gear state '[gear_check_state]' for [module.display_name] ([module.module_category])"
break

// Check for missing panel states.
for(var/module_category in icon_state_cache)
var/list/check_states = icon_state_cache[module_category]
for(var/panel_state in panel_overlays)
if(panel_state in check_states)
found_states[module_category] |= panel_state
else
failures += "missing panel state '[panel_state]' for [module_category]"

// Check that there aren't any unexpected states.
for(var/module_category in icon_state_cache)
for(var/check_state in icon_state_cache[module_category])
if(check_state in found_states[module_category])
continue
failures += "unexpected state '[check_state]' for [module_category]"

if(length(failures))
fail("Some robot module sprites are invalid:\n" + failures.Join("\n"))
else
pass("All robot module sprites are valid.")
return 1
Binary file added icons/mob/robot_gibs.dmi
Binary file not shown.
Binary file removed icons/mob/robots.dmi
Binary file not shown.
Binary file added icons/mob/robots/robots_flying.dmi
Binary file not shown.
Binary file added icons/mob/robots/robots_grounded.dmi
Binary file not shown.
File renamed without changes.
Binary file removed icons/mob/robots_flying.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions polaris.dme
Original file line number Diff line number Diff line change
Expand Up @@ -3317,6 +3317,7 @@
#include "code\modules\xgm\xgm_gas_data.dm"
#include "code\modules\xgm\xgm_gas_mixture.dm"
#include "code\unit_tests\decl_tests.dm"
#include "code\unit_tests\icon_tests.dm"
#include "code\unit_tests\language_tests.dm"
#include "code\unit_tests\loadout_tests.dm"
#include "code\unit_tests\map_tests.dm"
Expand Down

0 comments on commit 27ba4a4

Please sign in to comment.