diff --git a/code/modules/clothing/under/miscellaneous_vr.dm b/code/modules/clothing/under/miscellaneous_vr.dm
index 20073b91da..61a21c25d6 100644
--- a/code/modules/clothing/under/miscellaneous_vr.dm
+++ b/code/modules/clothing/under/miscellaneous_vr.dm
@@ -73,7 +73,7 @@
to_chat(H,"You must be WEARING the uniform to change your size.")
return
- var/new_size = input("Put the desired size (25-200%)", "Set Size", 200) as num|null
+ var/new_size = input("Put the desired size (25-200%), or (1-600%) in dormitory areas.", "Set Size", 200) as num|null
//Check AGAIN because we accepted user input which is blocking.
if (src != H.w_uniform)
@@ -89,7 +89,7 @@
H.update_icons() //Just want the matrix transform
return
- if (!ISINRANGE(new_size,25,200))
+ if (!H.size_range_check(new_size))
to_chat(H,"The safety features of the uniform prevent you from choosing this size.")
return
diff --git a/code/modules/mob/living/carbon/human/emote_vr.dm b/code/modules/mob/living/carbon/human/emote_vr.dm
index 352729c5da..ac78cbe1f2 100644
--- a/code/modules/mob/living/carbon/human/emote_vr.dm
+++ b/code/modules/mob/living/carbon/human/emote_vr.dm
@@ -181,6 +181,14 @@
return FALSE
+/mob/living/carbon/human/verb/toggle_resizing_immunity()
+ set name = "Toggle Resizing Immunity"
+ set desc = "Toggles your ability to resist resizing attempts"
+ set category = "IC"
+
+ resizable = !resizable
+ to_chat(src, "You are now [resizable ? "susceptible" : "immune"] to being resized.")
+
/mob/living/carbon/human/proc/handle_flip_vr()
var/original_density = density
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 3a52565d08..55fab1b1c4 100644
--- a/code/modules/mob/living/carbon/human/human_defines_vr.dm
+++ b/code/modules/mob/living/carbon/human/human_defines_vr.dm
@@ -9,6 +9,7 @@
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 fe1c4b5c7e..ccbae3dd01 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -62,6 +62,8 @@
//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 3bf3e45da2..2440a1ab74 100644
--- a/code/modules/mob/living/carbon/human/life_vr.dm
+++ b/code/modules/mob/living/carbon/human/life_vr.dm
@@ -77,4 +77,11 @@
// Moving around increases germ_level faster
if(germ_level < GERM_LEVEL_MOVE_CAP && prob(8))
- germ_level++
\ No newline at end of file
+ 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/living/carbon/human/species/station/protean_vr/protean_powers.dm b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm
index ba4b3ee92a..8a84a15331 100644
--- a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm
+++ b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm
@@ -282,9 +282,9 @@
to_chat(user,"You don't have a working refactory module!")
return
- var/nagmessage = "Adjust your mass to be a size between 25 to 200%. Up-sizing consumes metal, downsizing returns metal."
+ var/nagmessage = "Adjust your mass to be a size between 25 to 200% (or between 1 to 600% in dorms area). Up-sizing consumes metal, downsizing returns metal."
var/new_size = input(user, nagmessage, "Pick a Size", user.size_multiplier*100) as num|null
- if(!new_size || !ISINRANGE(new_size,25,200))
+ if(!new_size || !size_range_check(new_size))
return
var/size_factor = new_size/100
diff --git a/code/modules/mob/living/living_defines_vr.dm b/code/modules/mob/living/living_defines_vr.dm
index e959d0c5a1..f06406bc86 100644
--- a/code/modules/mob/living/living_defines_vr.dm
+++ b/code/modules/mob/living/living_defines_vr.dm
@@ -5,6 +5,7 @@
var/ooc_notes = null
appearance_flags = TILE_BOUND|PIXEL_SCALE|KEEP_TOGETHER
var/hunger_rate = DEFAULT_HUNGER_FACTOR
+ var/resizable = TRUE
//custom say verbs
var/custom_say = null
diff --git a/code/modules/nifsoft/software/15_misc.dm b/code/modules/nifsoft/software/15_misc.dm
index bd0975269d..957924314d 100644
--- a/code/modules/nifsoft/software/15_misc.dm
+++ b/code/modules/nifsoft/software/15_misc.dm
@@ -127,17 +127,15 @@
/datum/nifsoft/sizechange/activate()
if((. = ..()))
- var/new_size = input("Put the desired size (25-200%)", "Set Size", 200) as num|null
+ var/new_size = input("Put the desired size (25-200%), or (1-600%) in dormitory areas.", "Set Size", 200) as num|null
- if (!ISINRANGE(new_size,25,200))
+ if (!nif.human.size_range_check(new_size))
to_chat(nif.human,"The safety features of the NIF Program prevent you from choosing this size.")
return
else
- nif.human.resize(new_size/100)
- to_chat(nif.human,"You set the size to [new_size]%")
-
- nif.human.visible_message("Swirling grey mist envelops [nif.human] as they change size!","Swirling streams of nanites wrap around you as you change size!")
-
+ if(nif.human.resize(new_size/100))
+ to_chat(nif.human,"You set the size to [new_size]%")
+ nif.human.visible_message("Swirling grey mist envelops [nif.human] as they change size!","Swirling streams of nanites wrap around you as you change size!")
spawn(0)
deactivate()
diff --git a/code/modules/vore/resizing/resize_vr.dm b/code/modules/vore/resizing/resize_vr.dm
index 9ecec2bca5..133989646d 100644
--- a/code/modules/vore/resizing/resize_vr.dm
+++ b/code/modules/vore/resizing/resize_vr.dm
@@ -61,11 +61,28 @@ 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.
*/
-/mob/living/proc/resize(var/new_size, var/animate = TRUE)
+/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))
+ return FALSE
+ return TRUE
+
+/mob/living/proc/resize(var/new_size, var/animate = TRUE, var/mark_unnatural_size = TRUE)
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
@@ -92,6 +109,8 @@ var/const/RESIZE_A_SMALLTINY = (RESIZE_SMALL + RESIZE_TINY) / 2
update_transform() //Lame way
/mob/living/carbon/human/resize(var/new_size, var/animate = TRUE)
+ if(!resizable)
+ return 1
if(species)
vis_height = species.icon_height
. = ..()
@@ -116,7 +135,11 @@ var/const/RESIZE_A_SMALLTINY = (RESIZE_SMALL + RESIZE_TINY) / 2
set name = "Adjust Mass"
set category = "Abilities" //Seeing as prometheans have an IC reason to be changing mass.
- var/nagmessage = "Adjust your mass to be a size between 25 to 200% (DO NOT ABUSE)"
+ if(!resizable)
+ to_chat(src, "You are immune to resizing!")
+ return
+
+ var/nagmessage = "Adjust your mass to be a size between 25 to 200% (or 1% to 600% in dormitories). (DO NOT ABUSE)"
var/new_size = input(nagmessage, "Pick a Size") as num|null
if(new_size && ISINRANGE(new_size, 25, 200))
resize(new_size/100)
diff --git a/code/modules/vore/resizing/sizegun_vr.dm b/code/modules/vore/resizing/sizegun_vr.dm
index 863fad54fc..b428337f16 100644
--- a/code/modules/vore/resizing/sizegun_vr.dm
+++ b/code/modules/vore/resizing/sizegun_vr.dm
@@ -41,8 +41,8 @@
set category = "Object"
set src in view(1)
- var/size_select = input("Put the desired size (25-200%)", "Set Size", size_set_to * 100) as num
- if(size_select > 200 || size_select < 25)
+ var/size_select = input("Put the desired size (25-200%), (1-600%) in dormitory areas.", "Set Size", size_set_to * 100) as num
+ if(!size_range_check(size_select))
to_chat(usr, "Invalid size.")
return
size_set_to = (size_select/100)
@@ -52,6 +52,21 @@
. = ..()
. += "It is currently set at [size_set_to*100]%"
+/obj/item/weapon/gun/energy/sizegun/admin
+ name = "modified size gun"
+ desc = "Sizegun, without limits on minimum/maximum size, and with unlimited charge. Time to show 'em that size does matter."
+ charge_cost = 0
+ projectile_type = /obj/item/projectile/beam/sizelaser/admin
+
+/obj/item/weapon/gun/energy/sizegun/admin/select_size()
+ set name = "Select Size"
+ set category = "Object"
+ set src in view(1)
+
+ var/size_select = input("Put the desired size", "Set Size", size_set_to * 100) as num
+ size_set_to = max(1,size_select/100) //No negative numbers
+ to_chat(usr, "You set the size to [size_set_to]%")
+
//
// Beams for size gun
//
@@ -71,8 +86,21 @@
/obj/item/projectile/beam/sizelaser/on_hit(var/atom/target)
var/mob/living/M = target
if(istype(M))
- M.resize(set_size)
- to_chat(M, " The beam fires into your body, changing your size!")
+ 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!")
+ M.updateicon()
+ return
+ return 1
+
+/obj/item/projectile/beam/sizelaser/admin/on_hit(var/atom/target)
+ var/mob/living/M = target
+ if(istype(M))
+ M.resize(set_size, TRUE, FALSE)
+ to_chat(M, "The beam fires into your body, changing your size!")
M.updateicon()
return
return 1