mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +00:00
Merge pull request #5131 from Verkister/unmaul-ya-face
Finally some symmetry for sharp scaling
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
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.
|
||||
var/offset_override = FALSE //CHOMPEdit
|
||||
var/voice_freq = 42500 //CHOMPEdit - Why was the default 0
|
||||
var/voice_sound = "goon speak 1" //CHOMPEdit - Changed the default voice to one less jarring
|
||||
|
||||
@@ -28,6 +29,7 @@
|
||||
S["weight_gain"] >> pref.weight_gain
|
||||
S["weight_loss"] >> pref.weight_loss
|
||||
S["fuzzy"] >> pref.fuzzy
|
||||
S["offset_override"] >> pref.offset_override //CHOMPEdit
|
||||
S["voice_freq"] >> pref.voice_freq
|
||||
S["voice_sound"] >> pref.voice_sound
|
||||
|
||||
@@ -37,6 +39,7 @@
|
||||
S["weight_gain"] << pref.weight_gain
|
||||
S["weight_loss"] << pref.weight_loss
|
||||
S["fuzzy"] << pref.fuzzy
|
||||
S["offset_override"] << pref.offset_override //CHOMPEdit
|
||||
S["voice_freq"] << pref.voice_freq
|
||||
S["voice_sound"] << pref.voice_sound
|
||||
|
||||
@@ -46,6 +49,7 @@
|
||||
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 = sanitize_integer(pref.fuzzy, 0, 1, initial(pref.fuzzy))
|
||||
pref.offset_override = sanitize_integer(pref.offset_override, 0, 1, initial(pref.offset_override)) //CHOMPEdit
|
||||
if(pref.voice_freq != 0)
|
||||
pref.voice_freq = sanitize_integer(pref.voice_freq, MIN_VOICE_FREQ, MAX_VOICE_FREQ, initial(pref.fuzzy))
|
||||
if(pref.size_multiplier == null || pref.size_multiplier < RESIZE_TINY || pref.size_multiplier > RESIZE_HUGE)
|
||||
@@ -56,6 +60,7 @@
|
||||
character.weight_gain = pref.weight_gain
|
||||
character.weight_loss = pref.weight_loss
|
||||
character.fuzzy = pref.fuzzy
|
||||
character.offset_override = pref.offset_override //CHOMPEdit
|
||||
character.voice_freq = pref.voice_freq
|
||||
character.resize(pref.size_multiplier, animate = FALSE, ignore_prefs = TRUE)
|
||||
if(!pref.voice_sound)
|
||||
@@ -95,6 +100,7 @@
|
||||
. += "<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>"
|
||||
. += "<b>Scaling Center:</b> <a [pref.offset_override ? "" : ""] href='?src=\ref[src];toggle_offset_override=1'><b>[pref.offset_override ? "Odd" : "Even"]</b></a><br>" //CHOMPEdit
|
||||
. += "<b>Voice Frequency:</b> <a href='?src=\ref[src];voice_freq=1'>[pref.voice_freq]</a><br>"
|
||||
. += "<b>Voice Sounds:</b> <a href='?src=\ref[src];voice_sounds_list=1'>[pref.voice_sound]</a><br>"
|
||||
// . += "<a href='?src=\ref[src];voice_test=1'><b>Test Voice:</b></a><br>" Maybe later
|
||||
@@ -118,6 +124,10 @@
|
||||
pref.fuzzy = pref.fuzzy ? 0 : 1;
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
|
||||
else if(href_list["toggle_offset_override"]) //CHOMPEdit
|
||||
pref.offset_override = pref.offset_override ? 0 : 1;
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
|
||||
else if(href_list["weight"])
|
||||
var/new_weight = tgui_input_number(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\
|
||||
|
||||
@@ -1149,6 +1149,7 @@
|
||||
default_pixel_y = initial(pixel_y) + species.pixel_offset_y
|
||||
pixel_x = default_pixel_x
|
||||
pixel_y = default_pixel_y
|
||||
center_offset = species.center_offset //CHOMPEdit
|
||||
|
||||
if(LAZYLEN(descriptors))
|
||||
descriptors = null
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
var/micro_size_mod = 0 // How different is our size for interactions that involve us being small?
|
||||
var/macro_size_mod = 0 // How different is our size for interactions that involve us being big?
|
||||
var/digestion_nutrition_modifier = 1
|
||||
var/center_offset = 0.5 //CHOMPEdit
|
||||
|
||||
|
||||
/datum/species/proc/give_numbing_bite() //Holy SHIT this is hacky, but it works. Updating a mob's attacks mid game is insane.
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
//CHOMPStation Add. Y'know I should probably just put this upstream.
|
||||
male_scream_sound = 'sound/effects/mob_effects/teshariscream.ogg'
|
||||
female_scream_sound = 'sound/effects/mob_effects/teshariscream.ogg'
|
||||
center_offset = 0 //CHOMPEdit
|
||||
//CHOMPStation Add End
|
||||
|
||||
blood_color = "#D514F7"
|
||||
|
||||
@@ -137,10 +137,14 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
|
||||
var/desired_scale_y = size_multiplier * icon_scale_y
|
||||
desired_scale_x *= species.icon_scale_x
|
||||
desired_scale_y *= species.icon_scale_y
|
||||
center_offset = species.center_offset //CHOMPEdit
|
||||
if(offset_override) //CHOMPEdit
|
||||
center_offset = 0 //CHOMPEdit
|
||||
vis_height = species.icon_height
|
||||
appearance_flags |= PIXEL_SCALE
|
||||
if(fuzzy)
|
||||
appearance_flags &= ~PIXEL_SCALE
|
||||
center_offset = 0 //CHOMPEdit
|
||||
//VOREStation Edit End
|
||||
|
||||
// Regular stuff again.
|
||||
@@ -176,7 +180,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
|
||||
layer = MOB_LAYER -0.01 // Fix for a byond bug where turf entry order no longer matters
|
||||
else
|
||||
M.Scale(desired_scale_x, desired_scale_y)//VOREStation Edit
|
||||
M.Translate(0, (vis_height/2)*(desired_scale_y-1)) //VOREStation edit
|
||||
M.Translate(center_offset * desired_scale_x, (vis_height/2)*(desired_scale_y-1)) //CHOMPEdit
|
||||
if(tail_style?.can_loaf) // VOREStation Edit: Taur Loafing
|
||||
update_tail_showing() // VOREStation Edit: Taur Loafing
|
||||
layer = MOB_LAYER // Fix for a byond bug where turf entry order no longer matters
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
verbs |= /mob/living/proc/lick
|
||||
verbs |= /mob/living/proc/smell
|
||||
verbs |= /mob/living/proc/switch_scaling
|
||||
verbs |= /mob/living/proc/center_offset //CHOMPEdit
|
||||
|
||||
if(!no_vore)
|
||||
verbs |= /mob/living/proc/vorebelly_printout
|
||||
|
||||
@@ -1055,6 +1055,14 @@
|
||||
set desc = "Switch sharp/fuzzy scaling for current mob."
|
||||
appearance_flags ^= PIXEL_SCALE
|
||||
fuzzy = !fuzzy
|
||||
update_transform() //CHOMPEdit
|
||||
|
||||
/mob/living/proc/center_offset() //CHOMPAdd
|
||||
set name = "Switch center offset mode"
|
||||
set category = "Preferences"
|
||||
set desc = "Switch sprite center offset to fix even/odd symmetry."
|
||||
offset_override = !offset_override
|
||||
update_transform()
|
||||
|
||||
/mob/living/examine(mob/user, infix, suffix)
|
||||
. = ..()
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
var/step_mechanics_pref = TRUE // Allow participation in macro-micro step mechanics
|
||||
var/pickup_pref = TRUE // Allow participation in macro-micro pickup mechanics
|
||||
var/pickup_active = TRUE // Toggle whether your help intent picks up micros or pets them
|
||||
var/center_offset = 0.5 // Center offset for uneven scaling symmetry. //CHOMPEdit
|
||||
var/offset_override = FALSE // Pref toggle for center offset. //CHOMPEdit
|
||||
|
||||
// Define holder_type on types we want to be scoop-able
|
||||
/mob/living/carbon/human
|
||||
@@ -28,9 +30,11 @@
|
||||
/mob/living/update_icons()
|
||||
. = ..()
|
||||
ASSERT(!ishuman(src))
|
||||
if(fuzzy || offset_override) //CHOMPEdit
|
||||
center_offset = 0 //CHOMPEdit
|
||||
var/matrix/M = matrix()
|
||||
M.Scale(size_multiplier * icon_scale_x, size_multiplier * icon_scale_y)
|
||||
M.Translate(0, (vis_height/2)*(size_multiplier-1))
|
||||
M.Translate(center_offset * size_multiplier * icon_scale_x, (vis_height/2)*(size_multiplier-1)) //CHOMPEdit
|
||||
transform = M
|
||||
|
||||
/**
|
||||
@@ -103,8 +107,12 @@
|
||||
var/datum/species/S = H.species
|
||||
special_x = S.icon_scale_x
|
||||
special_y = S.icon_scale_y
|
||||
if(fuzzy || offset_override) //CHOMPEdit Start
|
||||
center_offset = 0
|
||||
else
|
||||
center_offset = S.center_offset
|
||||
resize.Scale(new_size * icon_scale_x * special_x, new_size * icon_scale_y * special_y) //Change the size of the matrix
|
||||
resize.Translate(0, (vis_height/2) * (new_size - 1)) //Move the player up in the tile so their feet align with the bottom
|
||||
resize.Translate(center_offset * size_multiplier * icon_scale_x * special_x, (vis_height/2) * (new_size - 1)) //Move the player up in the tile so their feet align with the bottom //CHOMPEdit End
|
||||
animate(src, transform = resize, time = duration) //Animate the player resizing
|
||||
|
||||
if(aura_animation)
|
||||
|
||||
Reference in New Issue
Block a user