diff --git a/code/game/area/Space Station 13 areas_vr.dm b/code/game/area/Space Station 13 areas_vr.dm index f4078595c8..3d9c2ab785 100644 --- a/code/game/area/Space Station 13 areas_vr.dm +++ b/code/game/area/Space Station 13 areas_vr.dm @@ -1,5 +1,14 @@ //TFF 28/8/19 - cleanup of areas placement - removes all but rogueminer_vr stuff. +/area + var/limit_mob_size = TRUE //If mob size is limited in the area. +/area/Entered(mob/living/H, oldLoc) + //Clamps mob size when entering a new area that has size limit. + //Mobs with size_uncapped set to TRUE or 1 will be ignored. + . = ..() + if (src.limit_mob_size && !H.size_uncapped) + H.resize(H.size_multiplier) + /area/shuttle/belter name = "Belter Shuttle" icon_state = "shuttle2" diff --git a/code/game/dna/dna2_helpers.dm b/code/game/dna/dna2_helpers.dm index d250c441ad..9fc924dae8 100644 --- a/code/game/dna/dna2_helpers.dm +++ b/code/game/dna/dna2_helpers.dm @@ -222,7 +222,7 @@ // Playerscale var/size = dna.GetUIValueRange(DNA_UI_PLAYERSCALE, player_sizes_list.len) if((0 < size) && (size <= player_sizes_list.len)) - H.resize(player_sizes_list[player_sizes_list[size]], FALSE) + H.resize(player_sizes_list[player_sizes_list[size]], TRUE) // Tail/Taur Color H.r_tail = dna.GetUIValueRange(DNA_UI_TAIL_R, 255) diff --git a/code/modules/admin/admin_verb_lists_vr.dm b/code/modules/admin/admin_verb_lists_vr.dm index bc6e620b7a..597c229478 100644 --- a/code/modules/admin/admin_verb_lists_vr.dm +++ b/code/modules/admin/admin_verb_lists_vr.dm @@ -155,6 +155,7 @@ var/list/admin_verbs_fun = list( /client/proc/smite, /client/proc/smite_vr, //VOREStation Add, /client/proc/admin_lightning_strike, + /client/proc/resize //VOREStation Add, ) var/list/admin_verbs_spawn = list( diff --git a/code/modules/admin/verbs/resize.dm b/code/modules/admin/verbs/resize.dm new file mode 100644 index 0000000000..e07fc5f2be --- /dev/null +++ b/code/modules/admin/verbs/resize.dm @@ -0,0 +1,13 @@ +/client/proc/resize(var/mob/living/L in player_list) + set name = "Resize" + set desc = "Resizes any living mob without any restrictions on size." + set category = "Fun" + if(!check_rights(R_ADMIN, R_FUN)) + return + + var/size_multiplier = input(usr, "Input size multiplier.", "Resize", 1) + L.resize(size_multiplier, TRUE, TRUE) + L.size_uncapped = TRUE + + log_and_message_admins("has changed [key_name(L)]'s size multiplier to [size_multiplier].") + feedback_add_details("admin_verb","RESIZE") \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human_defines_vr.dm b/code/modules/mob/living/carbon/human/human_defines_vr.dm index cdd7276838..494f16fa42 100644 --- a/code/modules/mob/living/carbon/human/human_defines_vr.dm +++ b/code/modules/mob/living/carbon/human/human_defines_vr.dm @@ -7,7 +7,6 @@ var/impersonate_bodytype //For impersonating a bodytype var/ability_flags = 0 //Shadekin abilities/potentially other species-based? var/sensorpref = 5 //Suit sensor loadout pref - var/unnaturally_resized = FALSE //If one became larger than 200%, or smaller than 25%. This flag is needed for the case when admins want someone to be very big or very small outside of dorms. var/wings_hidden = FALSE /mob/living/carbon/human/proc/shadekin_get_energy() diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index cebfda00c0..25303971b1 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -62,8 +62,6 @@ //No need to update all of these procs if the guy is dead. fall() //VORESTATION EDIT. Prevents people from floating - if(unnaturally_resized) //VORESTATION EDIT. - handle_unnatural_size() if(stat != DEAD && !stasis) //Updates the number of stored chemicals for powers handle_changeling() diff --git a/code/modules/mob/living/carbon/human/life_vr.dm b/code/modules/mob/living/carbon/human/life_vr.dm index 2440a1ab74..c5248fc862 100644 --- a/code/modules/mob/living/carbon/human/life_vr.dm +++ b/code/modules/mob/living/carbon/human/life_vr.dm @@ -78,10 +78,3 @@ // Moving around increases germ_level faster if(germ_level < GERM_LEVEL_MOVE_CAP && prob(8)) germ_level++ - -/mob/living/carbon/human/proc/handle_unnatural_size() - if(!in_dorms()) - if(src.size_multiplier > 2) - src.resize(2) - else if (src.size_multiplier < 0.25) - src.resize(0.25) \ No newline at end of file diff --git a/code/modules/mob/mob_defines_vr.dm b/code/modules/mob/mob_defines_vr.dm index ff5f1ae582..da7c9e918b 100644 --- a/code/modules/mob/mob_defines_vr.dm +++ b/code/modules/mob/mob_defines_vr.dm @@ -1,4 +1,5 @@ /mob + var/size_uncapped = FALSE //Determines if a mob's size obedies the resize cap, used for adminbus resize. var/vantag_hud = 0 // Do I have the HUD enabled? var/mob/temporary_form // For holding onto a temporary form diff --git a/code/modules/vore/resizing/resize_vr.dm b/code/modules/vore/resizing/resize_vr.dm index 703706483f..dfd620134b 100644 --- a/code/modules/vore/resizing/resize_vr.dm +++ b/code/modules/vore/resizing/resize_vr.dm @@ -64,28 +64,23 @@ var/const/RESIZE_A_SMALLTINY = (RESIZE_SMALL + RESIZE_TINY) / 2 * Resizes the mob immediately to the desired mod, animating it growing/shrinking. * It can be used by anything that calls it. */ -/atom/movable/proc/in_dorms() - var/area/A = get_area(src) - return istype(A, /area/crew_quarters/sleep) /atom/movable/proc/size_range_check(size_select) //both objects and mobs needs to have that - if((!in_dorms() && (size_select > 200 || size_select < 25)) || (size_select > 600 || size_select <1)) + var/area/A = get_area(src) //Get the atom's area to check for size limit. + if((A.limit_mob_size && (size_select > 200 || size_select < 25)) || (size_select > 600 || size_select <1)) return FALSE return TRUE -/mob/living/proc/resize(var/new_size, var/animate = TRUE, var/mark_unnatural_size = TRUE) +/mob/living/proc/resize(var/new_size, var/animate = TRUE, var/uncapped = FALSE) + if(!uncapped) + new_size = clamp(new_size, RESIZE_TINY, RESIZE_HUGE) + src.size_uncapped = FALSE + if(size_multiplier == new_size) return 1 size_multiplier = new_size //Change size_multiplier so that other items can interact with them - if(ishuman(src)) - var/mob/living/carbon/human/H = src - if(new_size > 2 || new_size < 0.25) - if(mark_unnatural_size) //Will target size be reverted to ordinary bounds when out of dorms or not? - H.unnaturally_resized = TRUE - else - H.unnaturally_resized = FALSE if(animate) var/change = new_size - size_multiplier var/duration = (abs(change)+0.25) SECONDS diff --git a/code/modules/vore/resizing/sizegun_vr.dm b/code/modules/vore/resizing/sizegun_vr.dm index e30c218fbb..c595bea9f0 100644 --- a/code/modules/vore/resizing/sizegun_vr.dm +++ b/code/modules/vore/resizing/sizegun_vr.dm @@ -89,12 +89,8 @@ /obj/item/projectile/beam/sizelaser/on_hit(var/atom/target) var/mob/living/M = target if(istype(M)) - if(!M.in_dorms() || !istype(M, /mob/living/carbon/human)) - if(!M.resize(clamp(set_size,0.25,2))) - to_chat(M, "The beam fires into your body, changing your size!") - else - if(!M.resize(clamp(set_size,0.01,6))) - to_chat(M, "The beam fires into your body, changing your size!") + if(!M.resize(set_size)) + to_chat(M, "The beam fires into your body, changing your size!") M.updateicon() return return 1