mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-21 12:02:31 +01:00
* SDQL2 update * fix that verb * cl * fix that * toworld * this is pointless * update info * siiiiick.. * vv edit update * fix that * fix editing vars * fix VV * Port the /TG/ globals controller. * part 1 * part 2 * oops * part 3 * Hollow Purple * sadas * bsbsdb * muda na agaki ta * ids 1-15 * 16-31 * 41-75 * bring me back to how things used to be before i lost it all * the strength of mayhem * final touches * cl * protect some vars * update sdql2 to use glob * stuff? * forgot that is not defined there * whoops * observ * but it never gets better * a --------- Co-authored-by: Matt Atlas <liermattia@gmail.com>
27 lines
1.0 KiB
Plaintext
27 lines
1.0 KiB
Plaintext
|
|
//list(ckey = real_name,)
|
|
//Since the ckey is used as the icon_state, the current system will only permit a single custom robot sprite per ckey.
|
|
//While it might be possible for a ckey to use that custom sprite for several real_names, it seems rather pointless to support it.
|
|
var/list/robot_custom_icons
|
|
/hook/startup/proc/load_robot_custom_sprites()
|
|
if(GLOB.config.load_customsynths_from == "sql")
|
|
loadsynths_from_sql()
|
|
else if(GLOB.config.load_customsynths_from == "json")
|
|
loadsynths_from_json()
|
|
return 1
|
|
|
|
/mob/living/silicon/robot/proc/set_custom_sprite()
|
|
if(!(name in robot_custom_icons))
|
|
return
|
|
var/datum/custom_synth/sprite = robot_custom_icons[name]
|
|
if(istype(sprite) && sprite.synthckey == ckey)
|
|
custom_sprite = 1
|
|
icon = CUSTOM_ITEM_SYNTH
|
|
var/list/valid_states = icon_states(icon)
|
|
if(icon_state == "robot")
|
|
if("[sprite.synthicon]-Standard" in valid_states)
|
|
icon_state = "[sprite.synthicon]-Standard"
|
|
else
|
|
to_chat(src, SPAN_WARNING("Could not locate [sprite.synthicon]-Standard sprite."))
|
|
icon = 'icons/mob/robots.dmi'
|