Merge pull request #9928 from Zap-zapper/master

[BUG] Size update fixes
This commit is contained in:
Novacat
2021-03-12 08:28:12 -05:00
committed by GitHub
4 changed files with 10 additions and 6 deletions
+2 -1
View File
@@ -130,7 +130,8 @@
var/new_size = input("Put the desired size (25-200%), or (1-600%) in dormitory areas.", "Set Size", 200) as num|null
if (!nif.human.size_range_check(new_size))
to_chat(nif.human,"<span class='notice'>The safety features of the NIF Program prevent you from choosing this size.</span>")
if(new_size)
to_chat(nif.human,"<span class='notice'>The safety features of the NIF Program prevent you from choosing this size.</span>")
return
else
if(nif.human.resize(new_size/100))
@@ -13,7 +13,7 @@
mrate_static = TRUE
/datum/reagent/macrocillin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(M.size_multiplier < RESIZE_HUGE)
if(M.size_range_check(M.size_multiplier))
M.resize(M.size_multiplier+0.01)//Incrrease 1% per tick.
return
@@ -27,7 +27,7 @@
mrate_static = TRUE
/datum/reagent/microcillin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(M.size_multiplier > RESIZE_TINY)
if(M.size_range_check(M.size_multiplier))
M.resize(M.size_multiplier-0.01) //Decrease 1% per tick.
return
+1 -1
View File
@@ -144,7 +144,7 @@ var/const/RESIZE_A_SMALLTINY = (RESIZE_SMALL + RESIZE_TINY) / 2
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))
if(size_range_check(new_size))
resize(new_size/100)
// I'm not entirely convinced that `src ? ADMIN_JMP(src) : "null"` here does anything
// but just in case it does, I'm leaving the null-src checking
+5 -2
View File
@@ -24,7 +24,10 @@
/obj/item/weapon/gun/energy/sizegun/New()
..()
verbs += /obj/item/weapon/gun/energy/sizegun/proc/select_size
if(istype(src, /obj/item/weapon/gun/energy/sizegun/admin))
verbs += /obj/item/weapon/gun/energy/sizegun/admin/select_size
else
verbs += /obj/item/weapon/gun/energy/sizegun/proc/select_size
/obj/item/weapon/gun/energy/sizegun/attack_self(mob/user)
. = ..()
@@ -65,7 +68,7 @@
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>")
to_chat(usr, "<span class='notice'>You set the size to [size_select]%</span>")
//
// Beams for size gun