mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 20:47:43 +01:00
Refactor Character Setup to use MAP
- Instead of using expensive getFlatIcon() calls, character previews are now shown using screen objects in a second map window. - Edited skin to add a named window for preferences setup that contains a browser plus a new map window to show the previews. - Mannequins are still generated the same way, but now a MA is applied to four screen objects which are shown in the second map window. - The screen objects are deleted on close of the preferences window. So we do make sure to close it when spawning.
This commit is contained in:
@@ -37,7 +37,6 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
S["synth_green"] >> pref.g_synth
|
||||
S["synth_blue"] >> pref.b_synth
|
||||
S["synth_markings"] >> pref.synth_markings
|
||||
pref.preview_icon = null
|
||||
S["bgstate"] >> pref.bgstate
|
||||
S["body_descriptors"] >> pref.body_descriptors
|
||||
|
||||
@@ -188,9 +187,6 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
|
||||
/datum/category_item/player_setup_item/general/body/content(var/mob/user)
|
||||
. = list()
|
||||
if(!pref.preview_icon)
|
||||
pref.update_preview_icon()
|
||||
user << browse_rsc(pref.preview_icon, "previewicon.png")
|
||||
|
||||
var/datum/species/mob_species = GLOB.all_species[pref.species]
|
||||
. += "<table><tr style='vertical-align:top'><td><b>Body</b> "
|
||||
@@ -313,7 +309,6 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
. += "</table><br>"
|
||||
|
||||
. += "</td><td><b>Preview</b><br>"
|
||||
. += "<div class='statusDisplay'><center><img src=previewicon.png width=[pref.preview_icon.Width()] height=[pref.preview_icon.Height()]></center></div>"
|
||||
. += "<br><a href='?src=\ref[src];cycle_bg=1'>Cycle background</a>"
|
||||
. += "<br><a href='?src=\ref[src];toggle_preview_value=[EQUIP_PREVIEW_LOADOUT]'>[pref.equip_preview_mob & EQUIP_PREVIEW_LOADOUT ? "Hide loadout" : "Show loadout"]</a>"
|
||||
. += "<br><a href='?src=\ref[src];toggle_preview_value=[EQUIP_PREVIEW_JOB]'>[pref.equip_preview_mob & EQUIP_PREVIEW_JOB ? "Hide job gear" : "Show job gear"]</a>"
|
||||
|
||||
@@ -232,7 +232,7 @@
|
||||
|
||||
. = OnTopic(href, href_list, usr)
|
||||
if(. & TOPIC_UPDATE_PREVIEW)
|
||||
pref_mob.client.prefs.preview_icon = null
|
||||
pref_mob.client.prefs.update_preview_icon()
|
||||
if(. & TOPIC_REFRESH)
|
||||
pref_mob.client.prefs.ShowChoices(usr)
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
var/r_wing2 = 30 // Wing extra color
|
||||
var/g_wing2 = 30 // Wing extra color
|
||||
var/b_wing2 = 30 // Wing extra color
|
||||
var/dress_mob = TRUE
|
||||
|
||||
// Definition of the stuff for Ears
|
||||
/datum/category_item/player_setup_item/vore/ears
|
||||
@@ -143,14 +142,6 @@
|
||||
/datum/category_item/player_setup_item/vore/ears/content(var/mob/user)
|
||||
. += "<h2>VORE Station Settings</h2>"
|
||||
|
||||
if(!pref.preview_icon)
|
||||
pref.update_preview_icon()
|
||||
user << browse_rsc(pref.preview_icon, "previewicon.png")
|
||||
|
||||
. += "<b>Preview</b><br>"
|
||||
. += "<div class='statusDisplay'><center><img src=previewicon.png width=[pref.preview_icon.Width()] height=[pref.preview_icon.Height()]></center></div>"
|
||||
. += "<br><a href='?src=\ref[src];toggle_clothing=1'>[pref.dress_mob ? "Hide equipment" : "Show equipment"]</a><br>"
|
||||
|
||||
var/ear_display = "Normal"
|
||||
if(pref.ear_style && (pref.ear_style in ear_styles_list))
|
||||
var/datum/sprite_accessory/ears/instance = ear_styles_list[pref.ear_style]
|
||||
@@ -302,8 +293,4 @@
|
||||
pref.b_wing2 = hex2num(copytext(new_wingc2, 6, 8))
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
|
||||
else if(href_list["toggle_clothing"])
|
||||
pref.dress_mob = !pref.dress_mob
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
|
||||
return ..()
|
||||
|
||||
Reference in New Issue
Block a user