From bab7ca704782bbd7e6a52b84823dad5cd61a98e0 Mon Sep 17 00:00:00 2001
From: QuoteFox <49098813+quotefox@users.noreply.github.com>
Date: Thu, 6 Aug 2020 10:35:09 +0100
Subject: [PATCH] Character Preference custom size
Character Preference now shows your characters custom body size!
---
code/modules/client/client_procs.dm | 17 ++++++++++++-
code/modules/client/preferences.dm | 8 +++----
.../mob/dead/new_player/preferences_setup.dm | 13 +++++-----
modular_citadel/interface/skin.dmf | 24 +++++++++++--------
4 files changed, 40 insertions(+), 22 deletions(-)
diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm
index 94c9798d..e94231ca 100644
--- a/code/modules/client/client_procs.dm
+++ b/code/modules/client/client_procs.dm
@@ -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)
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index 467e7d07..670c2f38 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -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 += "
"
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 += "Custom Species Name:[custom_species ? custom_species : "None"]
"
dat += "Random Body
"
dat += "Always Random Body:[be_random_body ? "Yes" : "No"]
"
- dat += "
Cycle background:[bgstate]
"
+ //dat += "
Cycle background:[bgstate]
"
var/use_skintones = pref_species.use_skintones
if(use_skintones)
diff --git a/code/modules/mob/dead/new_player/preferences_setup.dm b/code/modules/mob/dead/new_player/preferences_setup.dm
index 96acb40d..771f74e8 100644
--- a/code/modules/mob/dead/new_player/preferences_setup.dm
+++ b/code/modules/mob/dead/new_player/preferences_setup.dm
@@ -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)
diff --git a/modular_citadel/interface/skin.dmf b/modular_citadel/interface/skin.dmf
index b822aa46..dc2da9a2 100644
--- a/modular_citadel/interface/skin.dmf
+++ b/modular_citadel/interface/skin.dmf
@@ -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 = ""