mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
[MIRROR] batch robot sprties (#11323)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
72705d90ca
commit
cfb5f160ec
@@ -32,7 +32,7 @@ SUBSYSTEM_DEF(robot_sprites)
|
||||
qdel(RS)
|
||||
continue
|
||||
|
||||
all_cyborg_sprites |= src
|
||||
all_cyborg_sprites |= RS
|
||||
|
||||
if(islist(RS.module_type))
|
||||
for(var/M in RS.module_type)
|
||||
|
||||
@@ -46,14 +46,15 @@
|
||||
. = ..()
|
||||
|
||||
/datum/eventkit/modify_robot/ui_assets(mob/user)
|
||||
return list(
|
||||
get_asset_datum(/datum/asset/spritesheet_batched/robot_icons)
|
||||
)
|
||||
var/list/our_assets = list()
|
||||
for(var/entry in GLOB.robot_sprite_sheets)
|
||||
our_assets += GLOB.robot_sprite_sheets[entry]
|
||||
return our_assets
|
||||
|
||||
/datum/eventkit/modify_robot/tgui_data(mob/user)
|
||||
. = list()
|
||||
// Target section for general data
|
||||
var/datum/asset/spritesheet_batched/robot_icons/spritesheet = get_asset_datum(/datum/asset/spritesheet_batched/robot_icons)
|
||||
var/datum/asset/spritesheet_batched/robot_icons/spritesheet = GLOB.robot_sprite_sheets[target.modtype]
|
||||
|
||||
if(target)
|
||||
.["target"] = list()
|
||||
|
||||
@@ -1,10 +1,120 @@
|
||||
GLOBAL_LIST_EMPTY(robot_sprite_sheets)
|
||||
|
||||
/datum/asset/spritesheet_batched/robot_icons
|
||||
name = "robot_icons"
|
||||
fully_generated = TRUE
|
||||
var/module_type
|
||||
|
||||
/datum/asset/spritesheet_batched/robot_icons/standard
|
||||
name = "robot_icons_standard"
|
||||
fully_generated = FALSE
|
||||
module_type = "Standard"
|
||||
|
||||
/datum/asset/spritesheet_batched/robot_icons/service
|
||||
name = "robot_icons_service"
|
||||
fully_generated = FALSE
|
||||
module_type = "Service"
|
||||
|
||||
/datum/asset/spritesheet_batched/robot_icons/clerical
|
||||
name = "robot_icons_clerical"
|
||||
fully_generated = FALSE
|
||||
module_type = "Clerical"
|
||||
|
||||
/datum/asset/spritesheet_batched/robot_icons/clown
|
||||
name = "robot_icons_clown"
|
||||
fully_generated = FALSE
|
||||
module_type = "Clown"
|
||||
|
||||
/datum/asset/spritesheet_batched/robot_icons/command
|
||||
name = "robot_icons_command"
|
||||
fully_generated = FALSE
|
||||
module_type = "Command"
|
||||
|
||||
/datum/asset/spritesheet_batched/robot_icons/research
|
||||
name = "robot_icons_research"
|
||||
fully_generated = FALSE
|
||||
module_type = "Research"
|
||||
|
||||
/datum/asset/spritesheet_batched/robot_icons/miner
|
||||
name = "robot_icons_miner"
|
||||
fully_generated = FALSE
|
||||
module_type = "Miner"
|
||||
|
||||
/datum/asset/spritesheet_batched/robot_icons/crisis
|
||||
name = "robot_icons_crisis"
|
||||
fully_generated = FALSE
|
||||
module_type = "Crisis"
|
||||
|
||||
/datum/asset/spritesheet_batched/robot_icons/surgeon
|
||||
name = "robot_icons_surgeon"
|
||||
module_type = "Surgeon"
|
||||
|
||||
/datum/asset/spritesheet_batched/robot_icons/security
|
||||
name = "robot_icons_security"
|
||||
fully_generated = FALSE
|
||||
module_type = "Security"
|
||||
|
||||
/datum/asset/spritesheet_batched/robot_icons/combat
|
||||
name = "robot_icons_combat"
|
||||
fully_generated = FALSE
|
||||
module_type = "Combat"
|
||||
|
||||
/datum/asset/spritesheet_batched/robot_icons/exploration
|
||||
name = "robot_icons_exploration"
|
||||
fully_generated = FALSE
|
||||
module_type = "Exploration"
|
||||
|
||||
/datum/asset/spritesheet_batched/robot_icons/engineering
|
||||
name = "robot_icons_engineering"
|
||||
fully_generated = FALSE
|
||||
module_type = "Engineering"
|
||||
|
||||
/datum/asset/spritesheet_batched/robot_icons/janitor
|
||||
name = "robot_icons_janitor"
|
||||
fully_generated = FALSE
|
||||
module_type = "Janitor"
|
||||
|
||||
/datum/asset/spritesheet_batched/robot_icons/gravekeeper
|
||||
name = "robot_icons_gravekeeper"
|
||||
fully_generated = FALSE
|
||||
module_type = "Gravekeeper"
|
||||
|
||||
/datum/asset/spritesheet_batched/robot_icons/lost
|
||||
name = "robot_icons_lost"
|
||||
fully_generated = FALSE
|
||||
module_type = "Lost"
|
||||
|
||||
/datum/asset/spritesheet_batched/robot_icons/protector
|
||||
name = "robot_icons_protector"
|
||||
fully_generated = FALSE
|
||||
module_type = "Protector"
|
||||
|
||||
/datum/asset/spritesheet_batched/robot_icons/mechanist
|
||||
name = "robot_icons_mechanist"
|
||||
fully_generated = FALSE
|
||||
module_type = "Mechanist"
|
||||
|
||||
/datum/asset/spritesheet_batched/robot_icons/combat_medic
|
||||
name = "robot_icons_combat_medic"
|
||||
fully_generated = FALSE
|
||||
module_type = "Combat Medic"
|
||||
|
||||
/datum/asset/spritesheet_batched/robot_icons/ninja
|
||||
name = "robot_icons_ninja"
|
||||
fully_generated = FALSE
|
||||
module_type = "Ninja"
|
||||
|
||||
/datum/asset/spritesheet_batched/robot_icons/create_spritesheets()
|
||||
for(var/datum/robot_sprite/S as anything in typesof(/datum/robot_sprite))
|
||||
if(!module_type)
|
||||
return
|
||||
for(var/datum/robot_sprite/S as anything in SSrobot_sprites.all_cyborg_sprites)
|
||||
if(!S.name || !S.sprite_icon_state) // snowflake out those customs... they suck
|
||||
continue
|
||||
if(islist(S.module_type))
|
||||
if(!(module_type in S.module_type))
|
||||
continue
|
||||
else if(S.module_type != module_type)
|
||||
continue
|
||||
|
||||
var/datum/universal_icon/I_N = uni_icon(S.sprite_icon, S.sprite_icon_state, NORTH)
|
||||
var/datum/universal_icon/I_S = uni_icon(S.sprite_icon, S.sprite_icon_state, SOUTH)
|
||||
@@ -50,3 +160,5 @@
|
||||
insert_icon(imgid + "S", I_S)
|
||||
insert_icon(imgid + "W", I_W)
|
||||
insert_icon(imgid + "E", I_E)
|
||||
|
||||
GLOB.robot_sprite_sheets[module_type] = src
|
||||
|
||||
@@ -22,9 +22,10 @@
|
||||
R.selecting_module = TRUE
|
||||
|
||||
/datum/tgui_module/robot_ui_module/ui_assets(mob/user)
|
||||
return list(
|
||||
get_asset_datum(/datum/asset/spritesheet_batched/robot_icons)
|
||||
)
|
||||
var/list/our_assets = list()
|
||||
for(var/entry in GLOB.robot_sprite_sheets)
|
||||
our_assets += GLOB.robot_sprite_sheets[entry]
|
||||
return our_assets
|
||||
|
||||
/datum/tgui_module/robot_ui_module/tgui_static_data()
|
||||
var/list/data = ..()
|
||||
@@ -67,7 +68,6 @@
|
||||
var/list/data = ..()
|
||||
|
||||
var/mob/living/silicon/robot/R = host
|
||||
var/datum/asset/spritesheet_batched/robot_icons/spritesheet = get_asset_datum(/datum/asset/spritesheet_batched/robot_icons)
|
||||
|
||||
data["currentName"] = new_name ? new_name : R.name
|
||||
data["isDefaultName"] = !new_name
|
||||
@@ -98,6 +98,7 @@
|
||||
data["sprite_datum_class"] = null
|
||||
data["sprite_datum_size"] = null
|
||||
if(sprite_datum)
|
||||
var/datum/asset/spritesheet_batched/robot_icons/spritesheet = GLOB.robot_sprite_sheets[selected_module]
|
||||
data["sprite_datum_class"] = sanitize_css_class_name("[sprite_datum.type]")
|
||||
data["sprite_datum_size"] = spritesheet.icon_size_id(data["sprite_datum_class"] + "S") // just get the south icon's size, the rest will be the same
|
||||
|
||||
|
||||
@@ -287,5 +287,6 @@
|
||||
rest_sprite_options = list("Default", "Sit", "Bellyup")
|
||||
|
||||
/datum/robot_sprite/dogborg/security/smolraptor/alt
|
||||
name = "Small Raptor Alt"
|
||||
|
||||
sprite_icon_state = "smolraptor_alt"
|
||||
|
||||
@@ -264,19 +264,19 @@
|
||||
|
||||
// Ninja models
|
||||
|
||||
/datum/robot_sprite/dogborg/syndicate/ninja
|
||||
/datum/robot_sprite/dogborg/ninja
|
||||
module_type = "Ninja"
|
||||
sprite_icon = 'icons/mob/robot/ninja.dmi'
|
||||
sprite_hud_icon_state = "malf"
|
||||
|
||||
/datum/robot_sprite/dogborg/tall/syndicate/ninja
|
||||
/datum/robot_sprite/dogborg/tall/ninja
|
||||
module_type = "Ninja"
|
||||
sprite_icon = 'icons/mob/robot/tallrobot/tallrobots.dmi'
|
||||
sprite_hud_icon_state = "malf"
|
||||
icon_x = 32
|
||||
pixel_x = 0
|
||||
|
||||
/datum/robot_sprite/dogborg/tall/syndicate/ninja/dullahan
|
||||
/datum/robot_sprite/dogborg/tall/ninja/dullahan
|
||||
name = "dullahan"
|
||||
sprite_icon = 'icons/mob/robot/dullahan/v3/ninja.dmi'
|
||||
sprite_icon_state = "dullahanninja"
|
||||
@@ -287,39 +287,35 @@
|
||||
pixel_x = -16
|
||||
icon_x = 64
|
||||
|
||||
/datum/robot_sprite/dogborg/tall/syndicate/ninja/mekaninja
|
||||
/datum/robot_sprite/dogborg/tall/ninja/mekaninja
|
||||
name = "Meka"
|
||||
sprite_icon = 'icons/mob/robot/tallrobot/tallrobots.dmi'
|
||||
sprite_icon_state = "mekaninja"
|
||||
has_eye_light_sprites = TRUE
|
||||
has_vore_belly_sprites = TRUE
|
||||
rest_sprite_options = list("Default", "Sit")
|
||||
|
||||
/datum/robot_sprite/dogborg/tall/syndicate/ninja/fmekaninja
|
||||
/datum/robot_sprite/dogborg/tall/ninja/fmekaninja
|
||||
name = "Niko"
|
||||
sprite_icon = 'icons/mob/robot/tallrobot/tallrobots.dmi'
|
||||
sprite_icon_state = "fmekaninja"
|
||||
has_eye_light_sprites = TRUE
|
||||
has_vore_belly_sprites = TRUE
|
||||
rest_sprite_options = list("Default", "Sit")
|
||||
|
||||
/datum/robot_sprite/dogborg/tall/syndicate/ninja/mmekaninja
|
||||
/datum/robot_sprite/dogborg/tall/ninja/k4tninja
|
||||
name = "K4T"
|
||||
sprite_icon_state = "k4tninja"
|
||||
has_eye_light_sprites = TRUE
|
||||
has_vore_belly_sprites = TRUE
|
||||
rest_sprite_options = list("Default", "Sit")
|
||||
|
||||
/datum/robot_sprite/dogborg/tall/ninja/mmekaninja
|
||||
name = "Nika"
|
||||
sprite_icon = 'icons/mob/robot/tallrobot/tallrobots.dmi'
|
||||
sprite_icon_state = "mmekaninja"
|
||||
has_eye_light_sprites = TRUE
|
||||
has_vore_belly_sprites = TRUE
|
||||
rest_sprite_options = list("Default", "Sit")
|
||||
|
||||
/datum/robot_sprite/dogborg/tall/syndicate/ninja/mmekaninja
|
||||
name = "Nika"
|
||||
sprite_icon = 'icons/mob/robot/tallrobot/tallrobots.dmi'
|
||||
sprite_icon_state = "mmekaninja"
|
||||
has_eye_light_sprites = TRUE
|
||||
has_vore_belly_sprites = TRUE
|
||||
rest_sprite_options = list("Default", "Sit")
|
||||
|
||||
/datum/robot_sprite/dogborg/tall/syndicate/ninja/dullataurninja
|
||||
/datum/robot_sprite/dogborg/tall/ninja/dullataurninja
|
||||
name = "Dullataur"
|
||||
sprite_icon = 'icons/mob/robot/dullahan/dullataurs/dullataur.dmi'
|
||||
sprite_icon_state = "dullataurninja"
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 765 KiB After Width: | Height: | Size: 656 KiB |
Reference in New Issue
Block a user