diff --git a/code/modules/client/preference_setup/vore/02_size.dm b/code/modules/client/preference_setup/vore/02_size.dm index 3b262e12fc..f63252f839 100644 --- a/code/modules/client/preference_setup/vore/02_size.dm +++ b/code/modules/client/preference_setup/vore/02_size.dm @@ -3,6 +3,8 @@ #define WEIGHT_MAX 500 #define WEIGHT_CHANGE_MIN 0 #define WEIGHT_CHANGE_MAX 100 +#define SIZE_MIN 0.25 +#define SIZE_MAX 2.0 // Define a place to save in character setup /datum/preferences @@ -30,9 +32,7 @@ S["weight_loss"] << pref.weight_loss /datum/category_item/player_setup_item/vore/size/sanitize_character() - var/valid_scales = list(RESIZE_HUGE, RESIZE_BIG, RESIZE_NORMAL, RESIZE_SMALL, RESIZE_TINY); - pref.size_multiplier = sanitize_inlist(pref.size_multiplier, valid_scales, initial(pref.size_multiplier)) - + pref.size_multiplier= pref.size_multiplier pref.weight_vr = sanitize_integer(pref.weight_vr, WEIGHT_MIN, WEIGHT_MAX, initial(pref.weight_vr)) pref.weight_gain = sanitize_integer(pref.weight_gain, WEIGHT_CHANGE_MIN, WEIGHT_CHANGE_MAX, initial(pref.weight_gain)) pref.weight_loss = sanitize_integer(pref.weight_loss, WEIGHT_CHANGE_MIN, WEIGHT_CHANGE_MAX, initial(pref.weight_loss)) @@ -53,10 +53,13 @@ /datum/category_item/player_setup_item/vore/size/OnTopic(var/href, var/list/href_list, var/mob/user) if(href_list["size_multiplier"]) - var/list/size_types = player_sizes_list - var/new_size = input(user, "Choose your character's size:", "Character Preference", pref.size_multiplier) as null|anything in size_types - if(new_size) - pref.size_multiplier = size_types[new_size] + var/new_size = input(user, "Choose your character's size, ranging from 25% to 200%", "Set Size") as num|null + if (!IsInRange(new_size,25,200)) + pref.size_multiplier = 1 + user << "Invalid size." + return TOPIC_REFRESH_UPDATE_PREVIEW + else if(new_size) + pref.size_multiplier = (new_size/100) return TOPIC_REFRESH_UPDATE_PREVIEW else if(href_list["weight"]) diff --git a/code/modules/clothing/under/miscellaneous_vr.dm b/code/modules/clothing/under/miscellaneous_vr.dm index dcf3cb2c53..821e4d1b5a 100644 --- a/code/modules/clothing/under/miscellaneous_vr.dm +++ b/code/modules/clothing/under/miscellaneous_vr.dm @@ -62,52 +62,33 @@ to_chat(H,"You must be WEARING the uniform to change your size.") return - var/choice = alert(H,"Change which way?","Mass Alteration","Size Up","Cancel","Size Down") - if(choice == "Cancel") - return FALSE + var/new_size = input("Put the desired size (25-200%)", "Set Size", 200) as num|null //Check AGAIN because we accepted user input which is blocking. if (src != H.w_uniform) to_chat(H,"You must be WEARING the uniform to change your size.") return + if (H.stat || H.restrained()) + return + if (isnull(H.size_multiplier)) to_chat(H,"The uniform panics and corrects your apparently microscopic size.") H.resize(RESIZE_NORMAL) H.update_icons() return - var/new_size - if (choice == "Size Up") - switch(H.size_multiplier) - if(RESIZE_BIG to RESIZE_HUGE) - new_size = RESIZE_HUGE - if(RESIZE_NORMAL to RESIZE_BIG) - new_size = RESIZE_BIG - if(RESIZE_SMALL to RESIZE_NORMAL) - new_size = RESIZE_NORMAL - if((0 - INFINITY) to RESIZE_TINY) - new_size = RESIZE_SMALL + if (!IsInRange(new_size,25,200)) + to_chat(H,"The safety features of the uniform prevent you from choosing this size.") + return - else if (choice == "Size Down") - switch(H.size_multiplier) - if(RESIZE_HUGE to INFINITY) - new_size = RESIZE_BIG - if(RESIZE_BIG to RESIZE_HUGE) - new_size = RESIZE_NORMAL - if(RESIZE_NORMAL to RESIZE_BIG) - new_size = RESIZE_SMALL - if((0 - INFINITY) to RESIZE_NORMAL) - new_size = RESIZE_TINY - - if(new_size) + else if(new_size) if(new_size != H.size_multiplier) if(!original_size) original_size = H.size_multiplier - H.resize(new_size) + H.resize(new_size/100) H.visible_message("The space around [H] distorts as they change size!","The space around you distorts as you change size!") - else - to_chat(H,"That's as far as you can resize in that direction!") + else //They chose their current size. return /obj/item/clothing/under/bluespace/mob_can_unequip(mob/M, slot, disable_warning = 0) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 21decac0fe..e4e2d70fa9 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -310,6 +310,7 @@ msg += attempt_vr(src,"examine_weight",args) //VOREStation Code msg += attempt_vr(src,"examine_nutrition",args) //VOREStation Code msg += attempt_vr(src,"examine_bellies",args) //VOREStation Code + msg += attempt_vr(src,"examine_size",args) //VOREStation Code if(mSmallsize in mutations) msg += "[T.He] [T.is] small halfling!\n" diff --git a/code/modules/mob/living/carbon/human/examine_vr.dm b/code/modules/mob/living/carbon/human/examine_vr.dm index a53c543629..0bf3abfa19 100644 --- a/code/modules/mob/living/carbon/human/examine_vr.dm +++ b/code/modules/mob/living/carbon/human/examine_vr.dm @@ -112,7 +112,6 @@ return "" var/message = "" - for (var/I in src.vore_organs) var/datum/belly/B = vore_organs[I] message += B.get_examine_msg() @@ -141,3 +140,9 @@ return TRUE return FALSE + +/mob/living/carbon/human/proc/examine_size(mob/living/carbon/human/H) + var/message = "" + if((H.get_effective_size() - src.get_effective_size()) >= 0.75) + message = "They are small enough that you could easily pick them up!\n" + return message diff --git a/code/modules/nifsoft/software/15_misc.dm b/code/modules/nifsoft/software/15_misc.dm index 91ea175338..1e284159b8 100644 --- a/code/modules/nifsoft/software/15_misc.dm +++ b/code/modules/nifsoft/software/15_misc.dm @@ -136,37 +136,14 @@ activate() if((. = ..())) - var/choice = alert(nif.human,"Change which way?","Mass Alteration","Size Up","Cancel", "Size Down") - if(choice == "Cancel") - spawn(0) deactivate() - return FALSE + var/new_size = input("Put the desired size (25-200%)", "Set Size", 200) as num - if(!nif.use_charge(100)) - nif.notify("Insufficient energy to resize!",TRUE) - spawn(0) deactivate() - return FALSE - - if(choice == "Size Up") - switch(nif.human.size_multiplier) - if(RESIZE_BIG to RESIZE_HUGE) - nif.human.resize(RESIZE_HUGE) - if(RESIZE_NORMAL to RESIZE_BIG) - nif.human.resize(RESIZE_BIG) - if(RESIZE_SMALL to RESIZE_NORMAL) - nif.human.resize(RESIZE_NORMAL) - if((0 - INFINITY) to RESIZE_TINY) - nif.human.resize(RESIZE_SMALL) - - else if(choice == "Size Down") - switch(nif.human.size_multiplier) - if(RESIZE_HUGE to INFINITY) - nif.human.resize(RESIZE_BIG) - if(RESIZE_BIG to RESIZE_HUGE) - nif.human.resize(RESIZE_NORMAL) - if(RESIZE_NORMAL to RESIZE_BIG) - nif.human.resize(RESIZE_SMALL) - if((0 - INFINITY) to RESIZE_NORMAL) - nif.human.resize(RESIZE_TINY) + if (!IsInRange(new_size,25,200)) + 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!") nif.human.update_icons() diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Vore_vr.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Vore_vr.dm index c45e18121e..ff6f713b67 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Vore_vr.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Vore_vr.dm @@ -9,15 +9,12 @@ description = "Glowing yellow liquid." reagent_state = LIQUID color = "#FFFF00" // rgb: 255, 255, 0 - metabolism = 2.5 + metabolism = 0.01 /datum/reagent/macrocillin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) ..() - for(var/size in list(RESIZE_SMALL, RESIZE_NORMAL, RESIZE_BIG, RESIZE_HUGE)) - if(M.size_multiplier < size) - M.resize(size) - M << "You grow!" - break + if(M.size_multiplier < RESIZE_HUGE) + M.resize(M.size_multiplier+0.01)//Incrrease 1% per tick. return /datum/reagent/microcillin @@ -26,15 +23,12 @@ description = "Murky purple liquid." reagent_state = LIQUID color = "#800080" - metabolism = 2.5 + metabolism = 0.01 /datum/reagent/microcillin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) ..() - for(var/size in list(RESIZE_BIG, RESIZE_NORMAL, RESIZE_SMALL, RESIZE_TINY)) - if(M.size_multiplier > size) - M.resize(size) - M << "You shrink!" - break; + if(M.size_multiplier > RESIZE_TINY) + M.resize(M.size_multiplier-0.01) //Decrease 1% per tick. return @@ -44,22 +38,14 @@ description = "Translucent cyan liquid." reagent_state = LIQUID color = "#00FFFF" - metabolism = 2.5 + metabolism = 0.01 //One unit will be just enough to bring someone from 200% to 100% /datum/reagent/normalcillin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) ..() - if(M.size_multiplier > RESIZE_BIG) - M.resize(RESIZE_BIG) - M << "You shrink!" - else if(M.size_multiplier > RESIZE_NORMAL) - M.resize(RESIZE_NORMAL) - M << "You shrink!" + if(M.size_multiplier > RESIZE_NORMAL) + M.resize(M.size_multiplier-0.01) //Decrease by 1% size per tick. else if(M.size_multiplier < RESIZE_NORMAL) - M.resize(RESIZE_NORMAL) - M << "You grow!" - else if(M.size_multiplier < RESIZE_SMALL) - M.resize(RESIZE_SMALL) - M << "You grow!" + M.resize(M.size_multiplier+0.01) //Increase 1% per tick. return diff --git a/code/modules/resleeving/designer.dm b/code/modules/resleeving/designer.dm index c05668b9f9..598eb7b8d0 100644 --- a/code/modules/resleeving/designer.dm +++ b/code/modules/resleeving/designer.dm @@ -304,9 +304,9 @@ return if(href_list["size_multiplier"]) - var/new_size = input(user, "Choose your character's size:", "Character Preference", player_size_name(active_br.sizemult)) as null|anything in player_sizes_list - if(new_size && (new_size in player_sizes_list)) - active_br.sizemult = player_sizes_list[new_size] + var/new_size = input(user, "Choose your character's size, ranging from 25% to 200%", "Character Preference") as num|null + if(new_size && IsInRange(new_size,25,200)) + active_br.sizemult = (new_size/100) preview_icon = null return 1 diff --git a/code/modules/virus2/effect_vr.dm b/code/modules/virus2/effect_vr.dm index 6a65d47e71..20058437a0 100644 --- a/code/modules/virus2/effect_vr.dm +++ b/code/modules/virus2/effect_vr.dm @@ -44,8 +44,8 @@ chance_maxm = 1 activate(var/mob/living/carbon/mob,var/multiplier) - var/newsize = pick(player_sizes_list) - mob.resize(player_sizes_list[newsize]) + var/newsize = rand (25, 200) + mob.resize(newsize/100) viewers(mob) << "[mob.name] suddenly changes size!" /datum/disease2/effect/flip diff --git a/code/modules/vore/fluffstuff/guns/nsfw.dm b/code/modules/vore/fluffstuff/guns/nsfw.dm index 7ef25c4e22..66cb19c906 100644 --- a/code/modules/vore/fluffstuff/guns/nsfw.dm +++ b/code/modules/vore/fluffstuff/guns/nsfw.dm @@ -357,7 +357,7 @@ L.gib() ..() - +/* /obj/item/ammo_casing/nsfw_batt/shrink name = "\'NSFW\' microbattery - SHRINK" type_color = "#910ffc" @@ -369,7 +369,7 @@ type_color = "#fc0fdc" type_name = "GROW" projectile_type = /obj/item/projectile/beam/growlaser - +*/ /obj/item/weapon/storage/secure/briefcase/nsfw_pack name = "\improper KHI-102b \'NSFW\' gun kit" desc = "A storage case for a multi-purpose handgun. Variety hour!" diff --git a/code/modules/vore/resizing/resize_vr.dm b/code/modules/vore/resizing/resize_vr.dm index 8f4baaee46..c12e0dcd0f 100644 --- a/code/modules/vore/resizing/resize_vr.dm +++ b/code/modules/vore/resizing/resize_vr.dm @@ -97,10 +97,11 @@ var/const/RESIZE_A_SMALLTINY = (RESIZE_SMALL + RESIZE_TINY) / 2 if (!istype(src,/mob/living/carbon/human)) src << "Only organic creatures can use this command!" return - var/size_name = input(nagmessage, "Pick a Size") in player_sizes_list - if (size_name && player_sizes_list[size_name]) - src.resize(player_sizes_list[size_name]) - message_admins("[key_name(src)] used the resize command in-game to be [size_name]. \ + var/new_size = input(user, "Choose your character's size, ranging from 25% to 200%", "Character Preference") as num|null + if(new_size && IsInRange(new_size,25,200)) + resize(new_size/100) + preview_icon = null + message_admins("[key_name(src)] used the resize command in-game to be [new_size]% size. \ ([src ? "JMP" : "null"])") /** Add the set_size() proc to usable verbs. */ @@ -193,7 +194,7 @@ var/const/RESIZE_A_SMALLTINY = (RESIZE_SMALL + RESIZE_TINY) / 2 var/damage = (rand(15,30)* size_damage_multiplier) //Since stunned is broken, let's do this. Rand 15-30 multiplied by 1 min or 1.75 max. 15 holo to 52.5 holo, depending on RNG and size differnece. tmob.apply_damage(damage, HALLOSS) tmob.resting = 1 - + var/mob/living/carbon/human/H = src if(istype(H) && istype(H.tail_style, /datum/sprite_accessory/tail/taur/naga)) src << "You push down on [tmob] with your tail, pinning them down under you!" @@ -209,7 +210,7 @@ var/const/RESIZE_A_SMALLTINY = (RESIZE_SMALL + RESIZE_TINY) / 2 src.forceMove(tmob.loc) var/size_damage_multiplier = (src.size_multiplier - tmob.size_multiplier) var/damage = (rand(1,3)* size_damage_multiplier) //Rand 1-3 multiplied by 1 min or 1.75 max. 1 min 5.25 max damage. - + if(src.m_intent == "run") tmob.apply_damage(damage, BRUTE) var/mob/living/carbon/human/H = src @@ -218,7 +219,7 @@ var/const/RESIZE_A_SMALLTINY = (RESIZE_SMALL + RESIZE_TINY) / 2 tmob << "[src] quickly goes over your body, carelessly crushing you with their heavy tail!" if(istype(tmob,/mob/living/carbon/human)) var/mob/living/carbon/human/M = tmob - M.drip(0.1) + M.drip(0.1) else src << "You carlessly step down onto [tmob], crushing them!!" tmob << "[src] steps carelessly on your body, crushing you!" diff --git a/code/modules/vore/resizing/sizegun_vr.dm b/code/modules/vore/resizing/sizegun_vr.dm index 2d88c7ab25..73fb2e0a96 100644 --- a/code/modules/vore/resizing/sizegun_vr.dm +++ b/code/modules/vore/resizing/sizegun_vr.dm @@ -3,81 +3,74 @@ // /obj/item/weapon/gun/energy/sizegun - name = "shrink ray" + name = "size gun" //I have no idea why this was called shrink ray when this increased and decreased size. desc = "A highly advanced ray gun with two settings: Shrink and Grow. Warning: Do not insert into mouth." icon = 'icons/obj/gun_vr.dmi' icon_state = "sizegun-shrink100" // Someone can probably do better. -Ace item_state = null //so the human update icon uses the icon_state instead fire_sound = 'sound/weapons/wave.ogg' charge_cost = 100 - projectile_type = /obj/item/projectile/beam/shrinklaser + projectile_type = /obj/item/projectile/beam/sizelaser origin_tech = "redspace=1;bluespace=4" modifystate = "sizegun-shrink" self_recharge = 1 + var/size_set_to = 1 firemodes = list( - list(mode_name = "grow", - projectile_type = /obj/item/projectile/beam/growlaser, + list(mode_name = "select size", + projectile_type = /obj/item/projectile/beam/sizelaser, modifystate = "sizegun-grow", fire_sound = 'sound/weapons/pulse3.ogg' - ), - list(mode_name = "shrink", - projectile_type = /obj/item/projectile/beam/shrinklaser, - modifystate = "sizegun-shrink", - fire_sound = 'sound/weapons/wave.ogg' )) // // Beams for size gun // -/obj/item/projectile/beam/shrinklaser - name = "shrink beam" +/obj/item/projectile/beam/sizelaser + name = "size beam" icon_state = "xray" nodamage = 1 damage = 0 check_armour = "laser" + var/set_size = 1 //Let's default to 100% muzzle_type = /obj/effect/projectile/xray/muzzle tracer_type = /obj/effect/projectile/xray/tracer impact_type = /obj/effect/projectile/xray/impact -/obj/item/projectile/beam/shrinklaser/on_hit(var/atom/target, var/blocked = 0) - if(istype(target, /mob/living)) + on_hit(var/atom/target) var/mob/living/M = target - switch(M.size_multiplier) - if(RESIZE_HUGE to INFINITY) - M.resize(RESIZE_BIG) - if(RESIZE_BIG to RESIZE_HUGE) - M.resize(RESIZE_NORMAL) - if(RESIZE_NORMAL to RESIZE_BIG) - M.resize(RESIZE_SMALL) - if((0 - INFINITY) to RESIZE_NORMAL) - M.resize(RESIZE_TINY) - M.update_icons() - return 1 + if(ishuman(target)) + var/mob/living/carbon/human/H = M + H.resize(set_size) + H.show_message(" The beam fires into your body, changing your size!") + H.updateicon() + else if (istype(target, /mob/living/carbon/)) + var/mob/living/carbon/H = M + H.resize(set_size) + H.updateicon() + else + return 1 -/obj/item/projectile/beam/growlaser - name = "growth beam" - icon_state = "bluelaser" - nodamage = 1 - damage = 0 - check_armour = "laser" +/obj/item/weapon/gun/energy/sizegun/consume_next_projectile() + . = ..() + var/obj/item/projectile/beam/sizelaser/G = . + if(istype(G)) + G.set_size = size_set_to - muzzle_type = /obj/effect/projectile/laser_blue/muzzle - tracer_type = /obj/effect/projectile/laser_blue/tracer - impact_type = /obj/effect/projectile/laser_blue/impact +/obj/item/weapon/gun/energy/sizegun/verb/select_size() + set name = "Select Size" + set category = "Object" + set src in view(1) -/obj/item/projectile/beam/growlaser/on_hit(var/atom/target, var/blocked = 0) - if(istype(target, /mob/living)) - var/mob/living/M = target - switch(M.size_multiplier) - if(RESIZE_BIG to RESIZE_HUGE) - M.resize(RESIZE_HUGE) - if(RESIZE_NORMAL to RESIZE_BIG) - M.resize(RESIZE_BIG) - if(RESIZE_SMALL to RESIZE_NORMAL) - M.resize(RESIZE_NORMAL) - if((0 - INFINITY) to RESIZE_TINY) - M.resize(RESIZE_SMALL) - M.update_icons() - return 1 + var/size_select = input("Put the desired size (25-200%)", "Set Size", 200) as num + if(size_select>200 || size_select<25) + usr << "Invalid size." + return + size_set_to = (size_select/100) + usr << "You set the size to [size_select]%" + +/obj/item/weapon/gun/energy/sizegun/examine(mob/user) + ..() + var/size_examine = size_set_to + user << "It is currently set at [size_examine]%"