Size fetish update

This commit is contained in:
Zap-zapper
2021-03-02 00:45:15 +07:00
parent 647203adb8
commit 906366bbf3
10 changed files with 86 additions and 18 deletions
+25 -2
View File
@@ -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, "<span class='warning'>You are immune to resizing!</span>")
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)
+32 -4
View File
@@ -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, "<span class='notice'>Invalid size.</span>")
return
size_set_to = (size_select/100)
@@ -52,6 +52,21 @@
. = ..()
. += "<span class='info'>It is currently set at [size_set_to*100]%</span>"
/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, "<span class='notice'>You set the size to [size_set_to]%</span>")
//
// 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, "<font color='blue'> The beam fires into your body, changing your size!</font>")
if(!M.in_dorms() || !istype(M, /mob/living/carbon/human))
if(!M.resize(clamp(set_size,0.25,2)))
to_chat(M, "<font color='blue'>The beam fires into your body, changing your size!</font>")
else
if(!M.resize(clamp(set_size,0.01,6)))
to_chat(M, "<font color='blue'>The beam fires into your body, changing your size!</font>")
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, "<font color='blue'>The beam fires into your body, changing your size!</font>")
M.updateicon()
return
return 1