Character Preference custom size

Character Preference now shows your characters custom body size!
This commit is contained in:
QuoteFox
2020-08-06 10:35:09 +01:00
parent 50adc915f5
commit bab7ca7047
4 changed files with 40 additions and 22 deletions
+16 -1
View File
@@ -897,7 +897,22 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
screen |= O
O.appearance = MA
O.dir = D
O.screen_loc = "character_preview_map:0,[pos]"
O.screen_loc = "character_preview_map:[pos],0"
/client/proc/show_character_previews_large(mutable_appearance/MA)
var/pos = 0
for(var/D in GLOB.cardinals)
pos++
pos++
var/obj/screen/O = LAZYACCESS(char_render_holders, "[D]")
if(!O)
O = new
LAZYSET(char_render_holders, "[D]", O)
screen |= O
O.appearance = MA
O.dir = D
O.screen_loc = "character_preview_map:[pos],-1"
/client/proc/clear_character_previews()
for(var/index in char_render_holders)
+4 -4
View File
@@ -65,7 +65,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/pda_style = MONO
var/pda_color = "#808000"
var/pda_skin = PDA_SKIN_ALT
var/list/alt_titles_preferences = list()
var/uses_glasses_colour = 0
@@ -229,7 +229,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
//backgrounds
var/mutable_appearance/character_background
var/icon/bgstate = "steel"
var/icon/bgstate = "000"
var/list/bgstate_options = list("000", "midgrey", "hiro", "FFF", "white", "steel", "techmaint", "dark", "plating", "reinforced")
var/show_mismatched_markings = FALSE //determines whether or not the markings lists should show markings that don't match the currently selected species. Intentionally left unsaved.
@@ -301,7 +301,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(unspaced_slots > 4)
dat += "<br>"
unspaced_slots = 0
S.cd = "/character[i]"
S.cd = "/+"
S["real_name"] >> name
if(!name)
name = "Character[i]"
@@ -382,7 +382,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<b>Custom Species Name:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=custom_species;task=input'>[custom_species ? custom_species : "None"]</a><BR>"
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=all;task=random'>Random Body</A><BR>"
dat += "<b>Always Random Body:</b><a href='?_src_=prefs;preference=all'>[be_random_body ? "Yes" : "No"]</A><BR>"
dat += "<br><b>Cycle background:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=cycle_bg;task=input'>[bgstate]</a><BR>"
//dat += "<br><b>Cycle background:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=cycle_bg;task=input'>[bgstate]</a><BR>"
var/use_skintones = pref_species.use_skintones
if(use_skintones)
@@ -44,12 +44,7 @@
mannequin.add_overlay(mutable_appearance('modular_citadel/icons/ui/backgrounds.dmi', bgstate, layer = SPACE_LAYER))
copy_to(mannequin)
// mannequin.resize = (1+(body_size_alt*-1))
// mannequin.resize = (body_size * 0.01)
// body_size_alt = ((body_size * 0.01)-1)
mannequin.resize(body_size*0.01, 0)
// Determine what job is marked as 'High' priority, and dress them up as such.
@@ -78,5 +73,9 @@
previewJob.equip(mannequin, TRUE)
COMPILE_OVERLAYS(mannequin)
parent.show_character_previews(new /mutable_appearance(mannequin))
if(body_size>100)
parent.show_character_previews_large(new /mutable_appearance(mannequin))//just to stop clipping of larger characters
else
parent.show_character_previews(new /mutable_appearance(mannequin))
unset_busy_human_dummy(DUMMY_HUMAN_SLOT_PREFERENCES)
+14 -10
View File
@@ -111,7 +111,7 @@ window "mapwindow"
is-default = true
saved-params = "icon-size"
zoom-mode = distort
style=".center { text-align: center; } .maptext { font-family: 'Small Fonts'; font-size: 7px; -dm-text-outline: 1px black; color: white; line-height: 1.1; } .command_headset { font-weight: bold; font-size: 8px; } .small { font-size: 6px; } .big { font-size: 8px; } .reallybig { font-size: 8px; } .extremelybig { font-size: 8px; } .greentext { color: #00FF00; font-size: 7px; } .redtext { color: #FF0000; font-size: 7px; } .clown { color: #FF69Bf; font-size: 7px; font-weight: bold; } .his_grace { color: #15D512; } .hypnophrase { color: #0d0d0d; font-weight: bold; } .yell { font-weight: bold; } .italics { font-size: 6px; }"
style = ".center { text-align: center; } .maptext { font-family: 'Small Fonts'; font-size: 7px; -dm-text-outline: 1px black; color: white; line-height: 1.1; } .command_headset { font-weight: bold;\tfont-size: 8px; } .small { font-size: 6px; } .big { font-size: 8px; } .reallybig { font-size: 8px; } .extremelybig { font-size: 8px; } .greentext { color: #00FF00; font-size: 7px; } .redtext { color: #FF0000; font-size: 7px; } .clown { color: #FF69Bf; font-size: 7px; font-weight: bold; } .his_grace { color: #15D512; } .hypnophrase { color: #0d0d0d; font-weight: bold; } .yell { font-weight: bold; } .italics { font-size: 6px; }"
window "infowindow"
elem "infowindow"
@@ -197,7 +197,7 @@ window "infowindow"
anchor2 = 97,0
font-size = 8
text-color = #e0e0e0
background-color = #A92c2c
background-color = #a92c2c
saved-params = "is-checked"
text = "Report Issue"
command = "report-issue"
@@ -250,7 +250,6 @@ window "outputwindow"
is-visible = false
is-disabled = true
saved-params = ""
auto-format = false
elem "output"
type = OUTPUT
pos = 0,0
@@ -291,27 +290,32 @@ window "preferences_window"
elem "preferences_window"
type = MAIN
pos = 281,0
size = 1600x980
size = 1280x720
anchor1 = none
anchor2 = none
background-color = none
is-visible = false
border = line
saved-params = "pos;size;is-minimized;is-maximized"
statusbar = false
outer-size = 1296x759
inner-size = 1280x720
elem "preferences_browser"
type = BROWSER
pos = 399,0
size = 1200x980
anchor1 = 25,0
pos = 0,128
size = 1280x606
anchor1 = 0,18
anchor2 = 100,100
background-color = none
border = line
saved-params = ""
elem "character_preview_map"
type = MAP
pos = 0,0
size = 400x998
size = 1280x128
anchor1 = 0,0
anchor2 = 25,100
anchor2 = 100,18
border = line
right-click = true
saved-params = "zoom;letterbox;zoom-mode"
saved-params = ""