From 5c7d335e2b674d7d9bd501bfdadecd99b7daaefe Mon Sep 17 00:00:00 2001 From: Razgriz Date: Mon, 8 Feb 2021 17:36:28 -0700 Subject: [PATCH] Revert "Revert #1240" --- code/modules/client/preferences.dm | 12 +-- code/modules/mob/living/carbon/human/human.dm | 4 +- .../species/station/traits_vr/neutral.dm | 97 ++++++++++++++++++ .../mob/living/carbon/human/update_icons.dm | 14 +-- code/modules/mob/living/living.dm | 10 +- .../mob/new_player/preferences_setup_vr.dm | 1 + code/modules/vore/resizing/resize_vr.dm | 4 +- icons/effects/setup_backgrounds_vr.dmi | Bin 0 -> 1514 bytes 8 files changed, 121 insertions(+), 21 deletions(-) create mode 100644 icons/effects/setup_backgrounds_vr.dmi diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 741033824d..179245a44f 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -83,11 +83,11 @@ datum/preferences //Mob preview var/list/char_render_holders //Should only be a key-value list of north/south/east/west = obj/screen. var/static/list/preview_screen_locs = list( - "1" = "character_preview_map:1,5:-12", - "2" = "character_preview_map:1,3:15", - "4" = "character_preview_map:1:7,2:10", - "8" = "character_preview_map:1:-7,1:5", - "BG" = "character_preview_map:1,1 to 1,5" + "1" = "character_preview_map:2,7", + "2" = "character_preview_map:2,5", + "4" = "character_preview_map:2,3", + "8" = "character_preview_map:2,1", + "BG" = "character_preview_map:1,1 to 3,8" ) //Jobs, uses bitflags @@ -281,7 +281,7 @@ datum/preferences if(!BG) BG = new BG.plane = TURF_PLANE - BG.icon = 'icons/effects/128x48.dmi' + BG.icon = 'icons/effects/setup_backgrounds_vr.dmi' BG.pref = src LAZYSET(char_render_holders, "BG", BG) client.screen |= BG diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index c4480cf5ae..cff2209f4b 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1097,8 +1097,8 @@ if(species.default_language) add_language(species.default_language) - //if(species.icon_scale_x != 1 || species.icon_scale_y != 1) //VOREStation Removal - // update_transform() //VOREStation Removal + if(species.icon_scale_x != 1 || species.icon_scale_y != 1) + update_transform() if(example) //VOREStation Edit begin if(!(example == src)) diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm index 709e5f53e3..54f49b9b4c 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm @@ -296,3 +296,100 @@ YW change end */ var_changes = list("alcohol_mod" = 0.25) // 25% as effective if alcohol_mod is set to 1. If it's not 1 in species.dm, update this! // Alcohol Traits End Here. YW CHANGE STOP*/ + +// Body shape traits +/datum/trait/taller + name = "Taller" + desc = "Your body is taller than average." + cost = 0 + custom_only = FALSE + var_changes = list("icon_scale_y" = 1.09) + excludes = list(/datum/trait/tall, /datum/trait/short, /datum/trait/shorter) + +/datum/trait/taller/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..(S,H) + H.update_transform() + +/datum/trait/tall + name = "Tall" + desc = "Your body is a bit taller than average." + cost = 0 + custom_only = FALSE + var_changes = list("icon_scale_y" = 1.05) + excludes = list(/datum/trait/taller, /datum/trait/short, /datum/trait/shorter) + +/datum/trait/tall/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..(S,H) + H.update_transform() + +/datum/trait/short + name = "Short" + desc = "Your body is a bit shorter than average." + cost = 0 + custom_only = FALSE + var_changes = list("icon_scale_y" = 0.95) + excludes = list(/datum/trait/taller, /datum/trait/tall, /datum/trait/shorter) + +/datum/trait/short/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..(S,H) + H.update_transform() + +/datum/trait/shorter + name = "Shorter" + desc = "You are shorter than average." + cost = 0 + custom_only = FALSE + var_changes = list("icon_scale_y" = 0.915) + excludes = list(/datum/trait/taller, /datum/trait/tall, /datum/trait/short) + +/datum/trait/shorter/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..(S,H) + H.update_transform() + +/datum/trait/fat + name = "Overweight" + desc = "You are heavier than average." + cost = 0 + custom_only = FALSE + var_changes = list("icon_scale_x" = 1.054) + excludes = list(/datum/trait/obese, /datum/trait/thin, /datum/trait/thinner) + +/datum/trait/fat/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..(S,H) + H.update_transform() + +/datum/trait/obese + name = "Obese" + desc = "You are much heavier than average." + cost = 0 + custom_only = FALSE + var_changes = list("icon_scale_x" = 1.095) + excludes = list(/datum/trait/fat, /datum/trait/thin, /datum/trait/thinner) + +/datum/trait/obese/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..(S,H) + H.update_transform() + +/datum/trait/thin + name = "Thin" + desc = "You are skinnier than average." + cost = 0 + custom_only = FALSE + var_changes = list("icon_scale_x" = 0.945) + excludes = list(/datum/trait/fat, /datum/trait/obese, /datum/trait/thinner) + +/datum/trait/thin/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..(S,H) + H.update_transform() + +/datum/trait/thinner + name = "Very Thin" + desc = "You are much skinnier than average." + cost = 0 + custom_only = FALSE + var_changes = list("icon_scale_x" = 0.905) + excludes = list(/datum/trait/fat, /datum/trait/obese, /datum/trait/thin) + +/datum/trait/thinner/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..(S,H) + H.update_transform() diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 9b4b4b6fae..8dddcfe53c 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -123,7 +123,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon() crash_with("CANARY: Old human update_icons_huds was called.") /mob/living/carbon/human/update_transform() - /* VOREStation Edit START - TODO - Consider switching to icon_scale + /* VOREStation Edit START // First, get the correct size. var/desired_scale_x = icon_scale_x var/desired_scale_y = icon_scale_y @@ -137,8 +137,10 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon() if(!isnull(M.icon_scale_y_percent)) desired_scale_y *= M.icon_scale_y_percent */ - var/desired_scale_x = size_multiplier - var/desired_scale_y = size_multiplier + var/desired_scale_x = size_multiplier * icon_scale_x + var/desired_scale_y = size_multiplier * icon_scale_y + desired_scale_x *= species.icon_scale_x + desired_scale_y *= species.icon_scale_y //VOREStation Edit End // Regular stuff again. @@ -151,14 +153,14 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon() if(lying && !species.prone_icon) //Only rotate them if we're not drawing a specific icon for being prone. M.Turn(90) - M.Scale(desired_scale_x, desired_scale_y) + M.Scale(desired_scale_y, desired_scale_x)//VOREStation Edit if(species.icon_height == 64)//VOREStation Edit M.Translate(13,-22) else M.Translate(1,-6) 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) + M.Scale(desired_scale_x, desired_scale_y)//VOREStation Edit M.Translate(0, (vis_height/2)*(desired_scale_y-1)) //VOREStation edit layer = MOB_LAYER // Fix for a byond bug where turf entry order no longer matters @@ -488,7 +490,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon() if(head_organ.transparent) //VOREStation Edit. For better slime limbs. face_standing += rgb(,,,120) - + overlays_standing[HAIR_LAYER] = image(face_standing, layer = BODY_LAYER+HAIR_LAYER) apply_layer(HAIR_LAYER) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 358dadddb4..6cf349dff7 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -149,21 +149,21 @@ default behaviour is: if((tmob.mob_always_swap || (tmob.a_intent == I_HELP || tmob.restrained()) && (a_intent == I_HELP || src.restrained())) && tmob.canmove && canmove && !tmob.buckled && !buckled && can_swap && can_move_mob(tmob, 1, 0)) // mutual brohugs all around! var/turf/oldloc = loc //VOREstation Edit - Begin - + //check bumpnom chance, if it's a simplemob that's doing the bumping var/mob/living/simple_mob/srcsimp = src if(istype(srcsimp)) if(srcsimp.tryBumpNom(tmob)) now_pushing = 0 return - + //if it's a simplemob being bumped, and the above didn't make them start getting bumpnommed, they get a chance to bumpnom var/mob/living/simple_mob/tmobsimp = tmob if(istype(tmobsimp)) if(tmobsimp.tryBumpNom(src)) now_pushing = 0 return - + //VOREstation Edit - End forceMove(tmob.loc) //VOREstation Edit - Begin @@ -1282,8 +1282,8 @@ default behaviour is: /mob/living/update_transform() // First, get the correct size. - var/desired_scale_x = size_multiplier //VOREStation edit - var/desired_scale_y = size_multiplier //VOREStation edit + var/desired_scale_x = size_multiplier * icon_scale_x //VOREStation edit + var/desired_scale_y = size_multiplier * icon_scale_y //VOREStation edit // Now for the regular stuff. var/matrix/M = matrix() diff --git a/code/modules/mob/new_player/preferences_setup_vr.dm b/code/modules/mob/new_player/preferences_setup_vr.dm index 134fdb77da..1f01884b60 100644 --- a/code/modules/mob/new_player/preferences_setup_vr.dm +++ b/code/modules/mob/new_player/preferences_setup_vr.dm @@ -4,6 +4,7 @@ mannequin.dna = new /datum/dna(null) mannequin.delete_inventory(TRUE) dress_preview_mob(mannequin) + mannequin.update_transform() mannequin.toggle_tail_vr(setting = TRUE) mannequin.toggle_wing_vr(setting = TRUE) COMPILE_OVERLAYS(mannequin) diff --git a/code/modules/vore/resizing/resize_vr.dm b/code/modules/vore/resizing/resize_vr.dm index ea7ec4c5cd..ea7572fc3a 100644 --- a/code/modules/vore/resizing/resize_vr.dm +++ b/code/modules/vore/resizing/resize_vr.dm @@ -41,7 +41,7 @@ var/const/RESIZE_A_SMALLTINY = (RESIZE_SMALL + RESIZE_TINY) / 2 . = ..() ASSERT(!ishuman(src)) var/matrix/M = matrix() - M.Scale(size_multiplier) + M.Scale(size_multiplier * icon_scale_x, size_multiplier * icon_scale_y) M.Translate(0, (vis_height/2)*(size_multiplier-1)) transform = M @@ -70,7 +70,7 @@ var/const/RESIZE_A_SMALLTINY = (RESIZE_SMALL + RESIZE_TINY) / 2 var/change = new_size - size_multiplier var/duration = (abs(change)+0.25) SECONDS var/matrix/resize = matrix() // Defines the matrix to change the player's size - resize.Scale(new_size) //Change the size of the matrix + resize.Scale(new_size * icon_scale_x, new_size * icon_scale_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 animate(src, transform = resize, time = duration) //Animate the player resizing diff --git a/icons/effects/setup_backgrounds_vr.dmi b/icons/effects/setup_backgrounds_vr.dmi new file mode 100644 index 0000000000000000000000000000000000000000..66818f57a90749e3ca87108cf579cff29ae7a482 GIT binary patch literal 1514 zcmV@~D=QNd6CoiX$;ruKW@;TB z9S{%@5)u-rsi_qe6(b`fA|fIf7#JBD85U76ka;oF_k-0FMV znd;H%7f`|_nya}StX3O(4mr*ztpeZ}c#p)6A$VvMATdF~;$qD^1;1-#b14!EyV$#K+kH z00cToL_t(&f$f%SciKh}hG}Coy8`2MpcrXWsX^S@*wFY!KuZ7r&+5#qFp}zHiK9(V zKj^g$3>?qHTz7lD8vRtGpKDa-zXNoD4$uKQKnLgm9iRhrfDZ8g0emRys$%y&0FR_V z`-92U|Q*r<~ zU;Jy!0ABkDMA1wV)^S9<6@}#9W42+}O#q2g|4M5ZyagLBTDOZ+Wqn@u&8?D=Sk%!bi>j*@) zyhgocBlB+*7JCgpTtY{H4sT1sGQx9QdU+GxWiV8`QV&5EY}^pBbJ zmPVs%{=Yr~(00E8>fwftf?+>dF6Ty*ca8yDp9iwqcygo9_5eT~hQUNSh!`$*k!*el z`buUEk$T7YYwjTg2LR5#x*_KY7eY&q(ge&o03PY~04)=?=5=QqhkoNYrX(Q`dHY?Y zxdOpP$%2r)^N49bplF-`WVh)RpZJ`ACUE}s#7M4M1J=Ph4E+J^XwC?a7CpwCskt9T z{<<|_l_aZ8L@Q1@6m6a9n`69AmWyQBeitE^c_QP$0RV+ym@ppj+Hi3m&>7~15y(yj zTLA)%RyTb3I2bg04)`(3p{At<+Jr$uG11M%#U$Gkl0Bo;fp(mk571u8+NbD-u5i47 zd?RB3G6<6;K~=N6Y2EGG-md^hAxL`Y&jjJZUNIWnuKQ&r6?>!XI;E5NQ^cB*{PCZN zc85d1M!hd(ZL0QNN%yP!@*At|PPEORcV%MMzKHqNzz+vyQi&7b` zL;9m`6*9&A@Om$@%hk~&m$pwy&2DzpUG(>*chetzyT0%|SX9r0?fcsO12XFtWBLVV QcK`qY07*qoM6N<$g2{ZJQvd(} literal 0 HcmV?d00001