From 82c05428e1f00e64f851d25abfc5c432b17234d4 Mon Sep 17 00:00:00 2001 From: Arokha Sieyes Date: Mon, 9 Apr 2018 22:43:02 -0400 Subject: [PATCH] Some protean fixes (regen, size as blob, gender) --- .../station/protean_vr/protean_blob.dm | 1 - .../station/protean_vr/protean_powers.dm | 30 ++++++++++++------- .../station/protean_vr/protean_species.dm | 15 ++++------ code/modules/mob/living/life.dm | 3 +- 4 files changed, 27 insertions(+), 22 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm index 692100d15f..610315275a 100644 --- a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm +++ b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm @@ -54,7 +54,6 @@ humanform = H updatehealth() refactory = locate() in humanform.internal_organs - verbs |= /mob/living/proc/nano_set_size verbs |= /mob/living/proc/ventcrawl verbs |= /mob/living/proc/hide else 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 6240c4a44d..7b7304b846 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 @@ -196,10 +196,14 @@ var/substance = matstack.material.name var/actually_added = refactory.add_stored_material(substance,howmuch*matstack.perunit) matstack.use(Ceiling(actually_added/matstack.perunit)) - if(actually_added < howmuch) + if(actually_added && actually_added < howmuch) to_chat(src,"Your refactory module is now full, so only [actually_added] units were stored.") - else + visible_message(src,"[src] nibbles some of the [substance] right off the stack!") + else if(actually_added) to_chat(src,"You store [actually_added] units of [substance].") + visible_message(src,"[src] devours some of the [substance] right off the stack!") + else + to_chat(src,"You're completely capped out on [substance]!") //// // Blob Form @@ -247,26 +251,28 @@ //// // Change size //// -/mob/living/proc/nano_set_size() +/mob/living/carbon/human/proc/nano_set_size() set name = "Adjust Volume" set category = "Abilities" set hidden = TRUE + var/mob/living/user = temporary_form || src + var/obj/item/organ/internal/nano/refactory/refactory = nano_get_refactory() //Missing the organ that does this if(!istype(refactory)) - to_chat(src,"You don't have a working refactory module!") + 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/new_size = input(src, nagmessage, "Pick a Size", size_multiplier*100) as num|null + var/new_size = input(user, nagmessage, "Pick a Size", user.size_multiplier*100) as num|null if(!new_size || !IsInRange(new_size,25,200)) return var/size_factor = new_size/100 //Will be: -1.75 for 200->25, and 1.75 for 25->200 - var/sizediff = size_factor - size_multiplier + var/sizediff = size_factor - user.size_multiplier //Negative if shrinking, positive if growing //Will be (PLSC*2)*-1.75 to 1.75 @@ -276,17 +282,19 @@ //Sizing up if(cost > 0) if(refactory.use_stored_material("steel",cost)) - resize(size_factor) + user.resize(size_factor) else - to_chat(src,"That size change would cost [cost] steel, which you don't have.") + to_chat(user,"That size change would cost [cost] steel, which you don't have.") return //Sizing down (or not at all) if(cost <= 0) cost = abs(cost) var/actually_added = refactory.add_stored_material("steel",cost) - resize(size_factor) + user.resize(size_factor) if(actually_added != cost) - to_chat(src,"Unfortunately, [cost-actually_added] steel was lost due to lack of storage space.") + to_chat(user,"Unfortunately, [cost-actually_added] steel was lost due to lack of storage space.") + + user.visible_message("Black mist swirls around [user] as they change size.") /// /// /// A helper to reuse /mob/living/proc/nano_get_refactory(obj/item/organ/internal/nano/refactory/R) @@ -350,7 +358,7 @@ ability_name = "Change Volume" desc = "Alter your size by consuming steel to produce additional nanites, or regain steel by reducing your size and reclaiming them." icon_state = "volume" - to_call = /mob/living/proc/nano_set_size + to_call = /mob/living/carbon/human/proc/nano_set_size /obj/effect/protean_ability/reform_limb ability_name = "Ref - Single Limb" diff --git a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_species.dm b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_species.dm index 80d62c1946..a37a0d921d 100644 --- a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_species.dm +++ b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_species.dm @@ -86,12 +86,13 @@ /mob/living/carbon/human/proc/nano_partswap, /mob/living/carbon/human/proc/nano_metalnom, /mob/living/carbon/human/proc/nano_blobform, - /mob/living/proc/nano_set_size, + /mob/living/carbon/human/proc/nano_set_size, /mob/living/carbon/human/proc/nano_change_fitting, //These verbs are displayed normally, /mob/living/carbon/human/proc/shapeshifter_select_hair, /mob/living/carbon/human/proc/shapeshifter_select_hair_colors, /mob/living/carbon/human/proc/shapeshifter_select_colour, - /mob/living/carbon/human/proc/shapeshifter_select_eye_colour + /mob/living/carbon/human/proc/shapeshifter_select_eye_colour, + /mob/living/carbon/human/proc/shapeshifter_select_gender ) var/global/list/abilities = list() @@ -204,7 +205,7 @@ // Various modifiers /datum/modifier/protean stacks = MODIFIER_STACK_FORBID - var/material_use = 100 + var/material_use = 150 var/material_name = DEFAULT_WALL_MATERIAL /datum/modifier/protean/on_applied() @@ -217,7 +218,7 @@ if(holder.temporary_form) to_chat(holder.temporary_form,on_expired_text) -/datum/modifier/protean/tick() +/datum/modifier/protean/check_if_valid() //No origin set if(!istype(origin)) expire() @@ -238,7 +239,6 @@ on_created_text = "You feel yourself accelerate, the metallic hydrogen increasing your speed temporarily." on_expired_text = "Your refactory finishes consuming the metallic hydrogen, and you return to normal speed." - material_use = 100 material_name = "mhydrogen" slowdown = -1 @@ -250,7 +250,6 @@ on_created_text = "You feel yourself become nearly impervious to physical attacks as plasteel nanites are made." on_expired_text = "Your refactory finishes consuming the plasteel, and you return to your normal nanites." - material_use = 100 material_name = "plasteel" incoming_brute_damage_percent = 0.5 @@ -262,7 +261,6 @@ on_created_text = "You feel yourself become more reflective, able to resist heat and fire better for a time." on_expired_text = "Your refactory finishes consuming the diamond, and you return to your normal nanites." - material_use = 100 material_name = "diamond" incoming_fire_damage_percent = 0.2 @@ -274,7 +272,6 @@ on_created_text = "You feel new nanites being produced from your stockpile of steel, healing you slowly." on_expired_text = "Your steel supply has either run out, or is no longer needed, and your healing stops." - material_use = 100 material_name = "steel" /datum/modifier/protean/steel/tick() @@ -303,4 +300,4 @@ src.name += " ([new_name])" desc += "\nVALID THROUGH END OF: [time2text(world.timeofday, "Month") +" "+ num2text(text2num(time2text(world.timeofday, "YYYY"))+544)]\nREGISTRANT: [new_name]" -#undef DAM_SCALE_FACTOR \ No newline at end of file +#undef DAM_SCALE_FACTOR diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 27b6d55ba8..6425081167 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -6,11 +6,12 @@ if (transforming) return + handle_modifiers() //VOREStation Edit - Needs to be done even if in nullspace. if(!loc) return var/datum/gas_mixture/environment = loc.return_air() - handle_modifiers() // Do this early since it might affect other things later. + //handle_modifiers() // Do this early since it might affect other things later. //VOREStation Edit handle_light()