mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
[MIRROR] Scaling Center Up-port (#7232)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: Selis <selis@xynolabs.com>
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
var/weight_gain = 100 // Weight gain rate.
|
var/weight_gain = 100 // Weight gain rate.
|
||||||
var/weight_loss = 50 // Weight loss rate.
|
var/weight_loss = 50 // Weight loss rate.
|
||||||
var/fuzzy = 0 // Preference toggle for sharp/fuzzy icon. Default sharp.
|
var/fuzzy = 0 // Preference toggle for sharp/fuzzy icon. Default sharp.
|
||||||
var/offset_override = FALSE //CHOMPEdit
|
var/offset_override = FALSE
|
||||||
var/voice_freq = 42500 //CHOMPEdit - Why was the default 0
|
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
|
var/voice_sound = "goon speak 1" //CHOMPEdit - Changed the default voice to one less jarring
|
||||||
var/custom_speech_bubble = "default"
|
var/custom_speech_bubble = "default"
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
S["weight_gain"] >> pref.weight_gain
|
S["weight_gain"] >> pref.weight_gain
|
||||||
S["weight_loss"] >> pref.weight_loss
|
S["weight_loss"] >> pref.weight_loss
|
||||||
S["fuzzy"] >> pref.fuzzy
|
S["fuzzy"] >> pref.fuzzy
|
||||||
S["offset_override"] >> pref.offset_override //CHOMPEdit
|
S["offset_override"] >> pref.offset_override
|
||||||
S["voice_freq"] >> pref.voice_freq
|
S["voice_freq"] >> pref.voice_freq
|
||||||
S["voice_sound"] >> pref.voice_sound
|
S["voice_sound"] >> pref.voice_sound
|
||||||
S["custom_speech_bubble"] >> pref.custom_speech_bubble
|
S["custom_speech_bubble"] >> pref.custom_speech_bubble
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
S["weight_gain"] << pref.weight_gain
|
S["weight_gain"] << pref.weight_gain
|
||||||
S["weight_loss"] << pref.weight_loss
|
S["weight_loss"] << pref.weight_loss
|
||||||
S["fuzzy"] << pref.fuzzy
|
S["fuzzy"] << pref.fuzzy
|
||||||
S["offset_override"] << pref.offset_override //CHOMPEdit
|
S["offset_override"] << pref.offset_override
|
||||||
S["voice_freq"] << pref.voice_freq
|
S["voice_freq"] << pref.voice_freq
|
||||||
S["voice_sound"] << pref.voice_sound
|
S["voice_sound"] << pref.voice_sound
|
||||||
S["custom_speech_bubble"] << pref.custom_speech_bubble
|
S["custom_speech_bubble"] << pref.custom_speech_bubble
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
pref.weight_gain = sanitize_integer(pref.weight_gain, WEIGHT_CHANGE_MIN, WEIGHT_CHANGE_MAX, initial(pref.weight_gain))
|
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_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.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
|
pref.offset_override = sanitize_integer(pref.offset_override, 0, 1, initial(pref.offset_override))
|
||||||
if(pref.voice_freq != 0)
|
if(pref.voice_freq != 0)
|
||||||
pref.voice_freq = sanitize_integer(pref.voice_freq, MIN_VOICE_FREQ, MAX_VOICE_FREQ, initial(pref.voice_freq)) //CHOMPEdit
|
pref.voice_freq = sanitize_integer(pref.voice_freq, MIN_VOICE_FREQ, MAX_VOICE_FREQ, initial(pref.voice_freq)) //CHOMPEdit
|
||||||
if(pref.size_multiplier == null || pref.size_multiplier < RESIZE_TINY || pref.size_multiplier > RESIZE_HUGE)
|
if(pref.size_multiplier == null || pref.size_multiplier < RESIZE_TINY || pref.size_multiplier > RESIZE_HUGE)
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
character.weight_gain = pref.weight_gain
|
character.weight_gain = pref.weight_gain
|
||||||
character.weight_loss = pref.weight_loss
|
character.weight_loss = pref.weight_loss
|
||||||
character.fuzzy = pref.fuzzy
|
character.fuzzy = pref.fuzzy
|
||||||
character.offset_override = pref.offset_override //CHOMPEdit
|
character.offset_override = pref.offset_override
|
||||||
character.voice_freq = pref.voice_freq
|
character.voice_freq = pref.voice_freq
|
||||||
character.resize(pref.size_multiplier, animate = FALSE, ignore_prefs = TRUE)
|
character.resize(pref.size_multiplier, animate = FALSE, ignore_prefs = TRUE)
|
||||||
|
|
||||||
@@ -119,7 +119,7 @@
|
|||||||
. += "<br>"
|
. += "<br>"
|
||||||
. += "<b>Scale:</b> <a href='?src=\ref[src];size_multiplier=1'>[round(pref.size_multiplier*100)]%</a><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>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>Scaling Center:</b> <a [pref.offset_override ? "" : ""] href='?src=\ref[src];toggle_offset_override=1'><b>[pref.offset_override ? "Odd" : "Even"]</b></a><br>"
|
||||||
. += "<br>" // CHOMPEdit: Fancy:tm:
|
. += "<br>" // CHOMPEdit: Fancy:tm:
|
||||||
. += "<b>Mob Speech/Noise Customization</b>" // CHOMPEdit: Fancy:tm:
|
. += "<b>Mob Speech/Noise Customization</b>" // CHOMPEdit: Fancy:tm:
|
||||||
. += "<br>" // CHOMPEdit
|
. += "<br>" // CHOMPEdit
|
||||||
@@ -159,7 +159,7 @@
|
|||||||
pref.fuzzy = pref.fuzzy ? 0 : 1;
|
pref.fuzzy = pref.fuzzy ? 0 : 1;
|
||||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||||
|
|
||||||
else if(href_list["toggle_offset_override"]) //CHOMPEdit
|
else if(href_list["toggle_offset_override"])
|
||||||
pref.offset_override = pref.offset_override ? 0 : 1;
|
pref.offset_override = pref.offset_override ? 0 : 1;
|
||||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||||
|
|
||||||
|
|||||||
@@ -1254,7 +1254,7 @@
|
|||||||
default_pixel_y = initial(pixel_y) + species.pixel_offset_y
|
default_pixel_y = initial(pixel_y) + species.pixel_offset_y
|
||||||
pixel_x = default_pixel_x
|
pixel_x = default_pixel_x
|
||||||
pixel_y = default_pixel_y
|
pixel_y = default_pixel_y
|
||||||
center_offset = species.center_offset //CHOMPEdit
|
center_offset = species.center_offset
|
||||||
|
|
||||||
if(LAZYLEN(descriptors))
|
if(LAZYLEN(descriptors))
|
||||||
descriptors = null
|
descriptors = null
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
var/micro_size_mod = 0 // How different is our size for interactions that involve us being small?
|
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/macro_size_mod = 0 // How different is our size for interactions that involve us being big?
|
||||||
var/digestion_nutrition_modifier = 1
|
var/digestion_nutrition_modifier = 1
|
||||||
var/center_offset = 0.5 //CHOMPEdit
|
var/center_offset = 0.5
|
||||||
var/can_climb = FALSE
|
var/can_climb = FALSE
|
||||||
var/climbing_delay = 1.5 // We climb with a quarter delay
|
var/climbing_delay = 1.5 // We climb with a quarter delay
|
||||||
|
|
||||||
|
|||||||
@@ -29,8 +29,8 @@
|
|||||||
//CHOMPStation Add. Y'know I should probably just put this upstream.
|
//CHOMPStation Add. Y'know I should probably just put this upstream.
|
||||||
// male_scream_sound = 'sound/effects/mob_effects/teshariscream.ogg'
|
// male_scream_sound = 'sound/effects/mob_effects/teshariscream.ogg'
|
||||||
// female_scream_sound = 'sound/effects/mob_effects/teshariscream.ogg'
|
// female_scream_sound = 'sound/effects/mob_effects/teshariscream.ogg'
|
||||||
center_offset = 0 //CHOMPEdit
|
|
||||||
//CHOMPStation Add End
|
//CHOMPStation Add End
|
||||||
|
center_offset = 0
|
||||||
|
|
||||||
blood_color = "#D514F7"
|
blood_color = "#D514F7"
|
||||||
flesh_color = "#5F7BB0"
|
flesh_color = "#5F7BB0"
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
|
|||||||
//Do any species specific layering updates, such as when hiding.
|
//Do any species specific layering updates, such as when hiding.
|
||||||
update_icon_special()
|
update_icon_special()
|
||||||
|
|
||||||
/mob/living/carbon/human/update_transform(var/instant = FALSE) //CHOMPEdit
|
/mob/living/carbon/human/update_transform(var/instant = FALSE)
|
||||||
/* VOREStation Edit START
|
/* VOREStation Edit START
|
||||||
// First, get the correct size.
|
// First, get the correct size.
|
||||||
var/desired_scale_x = icon_scale_x
|
var/desired_scale_x = icon_scale_x
|
||||||
@@ -144,9 +144,9 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
|
|||||||
var/desired_scale_y = size_multiplier * icon_scale_y
|
var/desired_scale_y = size_multiplier * icon_scale_y
|
||||||
desired_scale_x *= species.icon_scale_x
|
desired_scale_x *= species.icon_scale_x
|
||||||
desired_scale_y *= species.icon_scale_y
|
desired_scale_y *= species.icon_scale_y
|
||||||
var/cent_offset = species.center_offset //CHOMPEdit
|
var/cent_offset = species.center_offset
|
||||||
if(fuzzy || offset_override || dir == EAST || dir == WEST) //CHOMPEdit
|
if(fuzzy || offset_override || dir == EAST || dir == WEST)
|
||||||
cent_offset = 0 //CHOMPEdit
|
cent_offset = 0
|
||||||
vis_height = species.icon_height
|
vis_height = species.icon_height
|
||||||
appearance_flags |= PIXEL_SCALE
|
appearance_flags |= PIXEL_SCALE
|
||||||
if(fuzzy)
|
if(fuzzy)
|
||||||
@@ -182,15 +182,15 @@ 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
|
layer = MOB_LAYER -0.01 // Fix for a byond bug where turf entry order no longer matters
|
||||||
else
|
else
|
||||||
M.Scale(desired_scale_x, desired_scale_y)//VOREStation Edit
|
M.Scale(desired_scale_x, desired_scale_y)//VOREStation Edit
|
||||||
M.Translate(cent_offset * desired_scale_x, (vis_height/2)*(desired_scale_y-1)) //CHOMPEdit
|
M.Translate(cent_offset * desired_scale_x, (vis_height/2)*(desired_scale_y-1))
|
||||||
if(tail_style?.can_loaf) // VOREStation Edit: Taur Loafing
|
if(tail_style?.can_loaf) // VOREStation Edit: Taur Loafing
|
||||||
update_tail_showing() // 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
|
layer = MOB_LAYER // Fix for a byond bug where turf entry order no longer matters
|
||||||
|
|
||||||
if(instant) //CHOMPEdit Start
|
if(instant)
|
||||||
transform = M
|
transform = M
|
||||||
else
|
else
|
||||||
animate(src, transform = M, time = anim_time) //CHOMPEdit End
|
animate(src, transform = M, time = anim_time)
|
||||||
update_icon_special() //May contain transform-altering things
|
update_icon_special() //May contain transform-altering things
|
||||||
|
|
||||||
//DAMAGE OVERLAYS
|
//DAMAGE OVERLAYS
|
||||||
|
|||||||
@@ -1035,17 +1035,18 @@
|
|||||||
if(!isnull(M.icon_scale_y_percent))
|
if(!isnull(M.icon_scale_y_percent))
|
||||||
. *= M.icon_scale_y_percent
|
. *= M.icon_scale_y_percent
|
||||||
|
|
||||||
/mob/living/update_transform(var/instant = FALSE) //CHOMPEdit
|
/mob/living/update_transform(var/instant = FALSE)
|
||||||
// First, get the correct size.
|
// First, get the correct size.
|
||||||
var/desired_scale_x = size_multiplier * icon_scale_x //VOREStation edit
|
var/desired_scale_x = size_multiplier * icon_scale_x //VOREStation edit
|
||||||
var/desired_scale_y = size_multiplier * icon_scale_y //VOREStation edit
|
var/desired_scale_y = size_multiplier * icon_scale_y //VOREStation edit
|
||||||
var/cent_offset = center_offset //CHOMPEdit
|
var/cent_offset = center_offset
|
||||||
|
|
||||||
// Now for the regular stuff.
|
// Now for the regular stuff.
|
||||||
if(fuzzy || offset_override || dir == EAST || dir == WEST) //CHOMPEdit
|
if(fuzzy || offset_override || dir == EAST || dir == WEST)
|
||||||
cent_offset = 0 //CHOMPEdit
|
cent_offset = 0
|
||||||
var/matrix/M = matrix()
|
var/matrix/M = matrix()
|
||||||
M.Scale(desired_scale_x, desired_scale_y)
|
M.Scale(desired_scale_x, desired_scale_y)
|
||||||
M.Translate(cent_offset * desired_scale_x, (vis_height/2)*(desired_scale_y-1)) //CHOMPEdit
|
M.Translate(cent_offset * desired_scale_x, (vis_height/2)*(desired_scale_y-1))
|
||||||
src.transform = M //VOREStation edit
|
src.transform = M //VOREStation edit
|
||||||
handle_status_indicators()
|
handle_status_indicators()
|
||||||
|
|
||||||
@@ -1330,3 +1331,8 @@
|
|||||||
icon = 'icons/mob/screen/midnight.dmi'
|
icon = 'icons/mob/screen/midnight.dmi'
|
||||||
icon_state = "character"
|
icon_state = "character"
|
||||||
screen_loc = ui_smallquad
|
screen_loc = ui_smallquad
|
||||||
|
|
||||||
|
/mob/living/set_dir(var/new_dir)
|
||||||
|
. = ..()
|
||||||
|
if(size_multiplier != 1 || icon_scale_x != 1 && center_offset > 0)
|
||||||
|
update_transform(TRUE)
|
||||||
|
|||||||
@@ -19,8 +19,8 @@
|
|||||||
verbs |= /mob/living/proc/lick
|
verbs |= /mob/living/proc/lick
|
||||||
verbs |= /mob/living/proc/smell
|
verbs |= /mob/living/proc/smell
|
||||||
verbs |= /mob/living/proc/switch_scaling
|
verbs |= /mob/living/proc/switch_scaling
|
||||||
|
verbs |= /mob/living/proc/center_offset
|
||||||
verbs |= /mob/living/proc/mute_entry //CHOMPEdit
|
verbs |= /mob/living/proc/mute_entry //CHOMPEdit
|
||||||
verbs |= /mob/living/proc/center_offset //CHOMPEdit
|
|
||||||
verbs |= /mob/living/proc/liquidbelly_visuals //CHOMPEdit
|
verbs |= /mob/living/proc/liquidbelly_visuals //CHOMPEdit
|
||||||
verbs |= /mob/living/proc/fix_vore_effects //CHOMPedit
|
verbs |= /mob/living/proc/fix_vore_effects //CHOMPedit
|
||||||
|
|
||||||
|
|||||||
@@ -1064,9 +1064,9 @@
|
|||||||
set desc = "Switch sharp/fuzzy scaling for current mob."
|
set desc = "Switch sharp/fuzzy scaling for current mob."
|
||||||
appearance_flags ^= PIXEL_SCALE
|
appearance_flags ^= PIXEL_SCALE
|
||||||
fuzzy = !fuzzy
|
fuzzy = !fuzzy
|
||||||
update_transform() //CHOMPEdit
|
update_transform()
|
||||||
|
|
||||||
/mob/living/proc/center_offset() //CHOMPAdd
|
/mob/living/proc/center_offset()
|
||||||
set name = "Switch center offset mode"
|
set name = "Switch center offset mode"
|
||||||
set category = "Preferences"
|
set category = "Preferences"
|
||||||
set desc = "Switch sprite center offset to fix even/odd symmetry."
|
set desc = "Switch sprite center offset to fix even/odd symmetry."
|
||||||
|
|||||||
@@ -3,12 +3,12 @@
|
|||||||
/mob
|
/mob
|
||||||
var/step_mechanics_pref = TRUE // Allow participation in macro-micro step mechanics
|
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_pref = TRUE // Allow participation in macro-micro pickup mechanics
|
||||||
|
var/center_offset = 0.5 // Center offset for uneven scaling symmetry.
|
||||||
|
var/offset_override = FALSE // Pref toggle for center offset.
|
||||||
|
|
||||||
/mob/living
|
/mob/living
|
||||||
var/holder_default
|
var/holder_default
|
||||||
var/pickup_active = TRUE // Toggle whether your help intent picks up micros or pets them
|
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
|
// Define holder_type on types we want to be scoop-able
|
||||||
/mob/living/carbon/human
|
/mob/living/carbon/human
|
||||||
@@ -32,12 +32,12 @@
|
|||||||
/mob/living/update_icons()
|
/mob/living/update_icons()
|
||||||
. = ..()
|
. = ..()
|
||||||
ASSERT(!ishuman(src))
|
ASSERT(!ishuman(src))
|
||||||
var/cent_offset = center_offset //ChompEDIT
|
var/cent_offset = center_offset
|
||||||
if(fuzzy || offset_override || dir == EAST || dir == WEST) //CHOMPEdit
|
if(fuzzy || offset_override || dir == EAST || dir == WEST)
|
||||||
cent_offset = 0 //CHOMPEdit
|
cent_offset = 0
|
||||||
var/matrix/M = matrix()
|
var/matrix/M = matrix()
|
||||||
M.Scale(size_multiplier * icon_scale_x, size_multiplier * icon_scale_y)
|
M.Scale(size_multiplier * icon_scale_x, size_multiplier * icon_scale_y)
|
||||||
M.Translate(cent_offset * size_multiplier * icon_scale_x, (vis_height/2)*(size_multiplier-1)) //CHOMPEdit
|
M.Translate(cent_offset * size_multiplier * icon_scale_x, (vis_height/2)*(size_multiplier-1))
|
||||||
transform = M
|
transform = M
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user