diff --git a/modular_chomp/code/modules/clothing/spacesuits/rig/modules/specific/protean.dm b/modular_chomp/code/modules/clothing/spacesuits/rig/modules/specific/protean.dm index 5d37ade4d2..26d7f3b338 100644 --- a/modular_chomp/code/modules/clothing/spacesuits/rig/modules/specific/protean.dm +++ b/modular_chomp/code/modules/clothing/spacesuits/rig/modules/specific/protean.dm @@ -48,21 +48,22 @@ These should come standard with the Protean rigsuit, unless you want them to wor /obj/item/rig_module/protean/syphon/process() if(active) var/mob/living/carbon/human/H = holder.wearer - var/mob/living/carbon/human/P = holder?:myprotean?:humanform - if(H && P) + var/mob/living/P = holder?:myprotean + if(istype(H.species, /datum/species/protean)) + to_chat(H, "Your Protean modules do not function on yourself.") + deactivate(1) + else + P = P?:humanform if((H.nutrition >= 100) && (P.nutrition <= 5000)) H.nutrition -= 10 P.nutrition += 10 - else - deactivate(1) - //This rig module allows a worn Protean to toggle and configure its armor settings. /obj/item/rig_module/protean/armor name = "Protean Adaptive Armor" desc = "This should never be outside of a RIG." interface_name = "Protean Adaptive Armor" - interface_desc = "Adjusts the proteans deployed armor values to fit the needs of the wearer. Incurs a slowdown penalty." + interface_desc = "Adjusts the proteans deployed armor values to fit the needs of the wearer. Incurs a slowdown penalty that scales with the amount of armor provided." usable = 1 toggleable = 1 activate_string = "Enable Armor" @@ -72,14 +73,11 @@ These should come standard with the Protean rigsuit, unless you want them to wor var/armor_weight_ratio = 0.01 //This amount of slowdown per 1% of armour. 3 slowdown at the max armour. /obj/item/rig_module/protean/armor/engage() - - if(!..()) - return 0 var/armor_chosen = input(usr, "Which armor to adjust?", "Protean Armor") as null|anything in armor_settings if(armor_chosen) var/value = input(usr, "Set armour reduction value (Max of 60%)", "Protean Armor") as num if(value) - if((value > 60) && value <0) + if((value > 60) || (value < 0)) to_chat(usr, "Invalid armor value. Can only be between 0-60") else value = round(value) @@ -87,27 +85,44 @@ These should come standard with the Protean rigsuit, unless you want them to wor /obj/item/rig_module/protean/armor/activate() - if(!..()) + if(!..(1)) return 0 var/mob/living/carbon/human/H = holder.wearer if(H) - to_chat(usr, "You activate the suit's energy syphon.") - to_chat(H, "Your suit begins to sap at your own energy stores.") + var/list/temparmor = list("bio" = 100, "rad" = 100) + temparmor = armor_settings + temparmor + to_chat(usr, "You signal the suit to harden.") + to_chat(H, "Your suit hardens in response to physical trauma.") + holder.armor = temparmor.Copy() + for(var/obj/item/piece in list(holder.gloves,holder.helmet,holder.boots,holder.chest)) + piece.armor = temparmor.Copy() + for(var/entry in armor_settings) + holder.slowdown += temparmor[entry]*armor_weight_ratio + message_admins(temparmor[entry]) + //holder.slowdown -= (armor_weight_ratio*200) active = 1 else return 0 /obj/item/rig_module/protean/armor/deactivate(var/forced) - if(!..()) + if(!..(1)) return 0 if(forced) + holder.armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 100) + for(var/obj/item/piece in list(holder.gloves,holder.helmet,holder.boots,holder.chest)) + piece.armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 100) + holder.slowdown = initial(slowdown) active = 0 return var/mob/living/carbon/human/H = holder.wearer if(H) - to_chat(usr, "You deactivate the suit's energy syphon.") - to_chat(H, "Your suit ceases from sapping your own energy.") + to_chat(usr, "You signal the suit to relax.") + to_chat(H, "Your suit softens.") + holder.armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 100) + for(var/obj/item/piece in list(holder.gloves,holder.helmet,holder.boots,holder.chest)) + piece.armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 100) + holder.slowdown = initial(slowdown) active = 0 else return 0 @@ -115,12 +130,8 @@ These should come standard with the Protean rigsuit, unless you want them to wor /obj/item/rig_module/protean/armor/process() if(active) var/mob/living/carbon/human/H = holder.wearer - var/mob/living/carbon/human/P = holder?:myprotean?:humanform - if(H && P) - if((H.nutrition >= 100) && (P.nutrition <= 5000)) - H.nutrition -= 10 - P.nutrition += 10 - else + if(istype(H.species, /datum/species/protean)) + to_chat(H, "Your Protean modules do not function on yourself.") deactivate(1) diff --git a/modular_chomp/code/modules/mob/living/carbon/human/species/station/protean/protean_rig.dm b/modular_chomp/code/modules/mob/living/carbon/human/species/station/protean/protean_rig.dm index d20032b7b5..edaef6f7c8 100644 --- a/modular_chomp/code/modules/mob/living/carbon/human/species/station/protean/protean_rig.dm +++ b/modular_chomp/code/modules/mob/living/carbon/human/species/station/protean/protean_rig.dm @@ -13,7 +13,7 @@ offline_slowdown = 0 seal_delay = 1 var/mob/living/myprotean - initial_modules = list(/obj/item/rig_module/protean/syphon) + initial_modules = list(/obj/item/rig_module/protean/syphon, /obj/item/rig_module/protean/armor) helm_type = /obj/item/clothing/head/helmet/space/rig/protean //These are important for sprite pointers boot_type = /obj/item/clothing/shoes/magboots/rig/protean