mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-07-19 11:02:31 +01:00
Adds toggleable character pref for sharp/fuzzy scaling.
-Yeah you should now be able to choose how you look. -Especially benefitical for any character scaled to those atrociously fucked up deformation ranges. -Can't really test it properly though due to the compile nature of the good ol' PIXEL_SCALE line in dm and my compy somehow forcing fuzzy on for some reason anyway. (my laptop's got the sharp mode tho) -Kinda based on #1947 Go there for preview examples.
This commit is contained in:
@@ -9,8 +9,9 @@
|
||||
var/size_multiplier = RESIZE_NORMAL
|
||||
// Body weight stuff.
|
||||
var/weight_vr = 137 // bodyweight of character (pounds, because I'm not doing the math again -Spades)
|
||||
var/weight_gain = 100 // bodyweight of character (pounds, because I'm not doing the math again -Spades)
|
||||
var/weight_loss = 50 // bodyweight of character (pounds, because I'm not doing the math again -Spades)
|
||||
var/weight_gain = 100 // Weight gain rate.
|
||||
var/weight_loss = 50 // Weight loss rate.
|
||||
var/fuzzy = 0 // Preference toggle for sharp/fuzzy icon. Default sharp.
|
||||
|
||||
// Definition of the stuff for Sizing
|
||||
/datum/category_item/player_setup_item/vore/size
|
||||
@@ -22,28 +23,33 @@
|
||||
S["weight_vr"] >> pref.weight_vr
|
||||
S["weight_gain"] >> pref.weight_gain
|
||||
S["weight_loss"] >> pref.weight_loss
|
||||
S["fuzzy"] >> pref.fuzzy
|
||||
|
||||
/datum/category_item/player_setup_item/vore/size/save_character(var/savefile/S)
|
||||
S["size_multiplier"] << pref.size_multiplier
|
||||
S["weight_vr"] << pref.weight_vr
|
||||
S["weight_gain"] << pref.weight_gain
|
||||
S["weight_loss"] << pref.weight_loss
|
||||
S["fuzzy"] << pref.fuzzy
|
||||
|
||||
/datum/category_item/player_setup_item/vore/size/sanitize_character()
|
||||
pref.size_multiplier = pref.size_multiplier
|
||||
pref.weight_vr = sanitize_integer(pref.weight_vr, WEIGHT_MIN, WEIGHT_MAX, initial(pref.weight_vr))
|
||||
pref.weight_gain = sanitize_integer(pref.weight_gain, WEIGHT_CHANGE_MIN, WEIGHT_CHANGE_MAX, initial(pref.weight_gain))
|
||||
pref.weight_loss = sanitize_integer(pref.weight_loss, WEIGHT_CHANGE_MIN, WEIGHT_CHANGE_MAX, initial(pref.weight_loss))
|
||||
pref.weight_vr = sanitize_integer(pref.weight_vr, WEIGHT_MIN, WEIGHT_MAX, initial(pref.weight_vr))
|
||||
pref.weight_gain = sanitize_integer(pref.weight_gain, WEIGHT_CHANGE_MIN, WEIGHT_CHANGE_MAX, initial(pref.weight_gain))
|
||||
pref.weight_loss = sanitize_integer(pref.weight_loss, WEIGHT_CHANGE_MIN, WEIGHT_CHANGE_MAX, initial(pref.weight_loss))
|
||||
pref.fuzzy = pref.fuzzy
|
||||
|
||||
/datum/category_item/player_setup_item/vore/size/copy_to_mob(var/mob/living/carbon/human/character)
|
||||
character.resize(pref.size_multiplier, FALSE)
|
||||
character.weight = pref.weight_vr
|
||||
character.weight_gain = pref.weight_gain
|
||||
character.weight_loss = pref.weight_loss
|
||||
character.fuzzy = pref.fuzzy
|
||||
|
||||
/datum/category_item/player_setup_item/vore/size/content(var/mob/user)
|
||||
. += "<br>"
|
||||
. += "<b>Scale:</b> <a href='?src=\ref[src];size_multiplier=1'>[round(pref.size_multiplier*100)]%</a><br>"
|
||||
. += "<b>Scaled Appearance:</b> <a [pref.fuzzy ? "" : ""] href='?src=\ref[src];toggle_fuzzy=1'><b>[pref.fuzzy ? "Fuzzy" : "Sharp"]</b></a><br>"
|
||||
. += "<br>"
|
||||
. += "<b>Relative Weight:</b> <a href='?src=\ref[src];weight=1'>[pref.weight_vr]</a><br>"
|
||||
. += "<b>Weight Gain Rate:</b> <a href='?src=\ref[src];weight_gain=1'>[pref.weight_gain]</a><br>"
|
||||
@@ -60,6 +66,10 @@
|
||||
pref.size_multiplier = (new_size/100)
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
|
||||
else if(href_list["toggle_fuzzy"])
|
||||
pref.fuzzy = pref.fuzzy ? 0 : 1;
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["weight"])
|
||||
var/new_weight = input(user, "Choose your character's relative body weight.\n\
|
||||
This measurement should be set relative to a normal 5'10'' person's body and not the actual size of your character.\n\
|
||||
|
||||
Reference in New Issue
Block a user