diff --git a/modular_chomp/code/modules/clothing/spacesuits/rig/modules/specific/defib.dm b/modular_chomp/code/modules/clothing/spacesuits/rig/modules/specific/defib.dm new file mode 100644 index 0000000000..faeb5d7170 --- /dev/null +++ b/modular_chomp/code/modules/clothing/spacesuits/rig/modules/specific/defib.dm @@ -0,0 +1,24 @@ +/obj/item/rig_module/device/defib + name = "mounted defib" + desc = "A rig mounted defib unit. Has expanded functionality to function on both organics and FBP's." + icon_state = "flash" + interface_name = "mounted defib" + interface_desc = "Toggle to swap between FBP and Organic compatability." + device_type = /obj/item/weapon/shockpaddles/standalone/rig + usable = 1 + engage_string = "Toggle Mode" + +/obj/item/weapon/shockpaddles/standalone/rig + name = "mounted defib" + desc = "Rig mounted defib. How are you seeing this? Stop that." + wielded = 1 + +/obj/item/weapon/shockpaddles/standalone/rig/emp_act(severity) + return + +/obj/item/weapon/shockpaddles/standalone/rig/checked_use(var/charge_amt) + return 1 + +/obj/item/weapon/shockpaddles/standalone/rig/attack_self() + use_on_synthetic = !use_on_synthetic + to_chat(usr, "You switch the [src] to [use_on_synthetic ? "FBP" : "organic"] compatability.") \ No newline at end of file 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 new file mode 100644 index 0000000000..5d37ade4d2 --- /dev/null +++ b/modular_chomp/code/modules/clothing/spacesuits/rig/modules/specific/protean.dm @@ -0,0 +1,135 @@ +/* +A collection of Protean rigsuit modules, intended to encourage Symbiotic relations with a host. +All of these should require someone else to be wearing the Protean to function. +These should come standard with the Protean rigsuit, unless you want them to work for some upgrades. +*/ + + +//This rig module feeds nutrition directly from the wearer to the Protean, to help them stay charged while worn. +/obj/item/rig_module/protean + permanent = 1 + +/obj/item/rig_module/protean/syphon + name = "Protean Metabolic Syphon" + desc = "This should never be outside of a RIG." + icon_state = "flash" + interface_name = "Protean Metabolic Syphon" + interface_desc = "Toggle to drain nutrition/power from the user directly into the Protean's own energy stores." + toggleable = 1 + activate_string = "Enable Syphon" + deactivate_string = "Disable Syphon" + +/obj/item/rig_module/protean/syphon/activate() + if(!..()) + 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.") + active = 1 + else + return 0 + +/obj/item/rig_module/protean/syphon/deactivate(var/forced) + if(!..()) + return 0 + if(forced) + 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.") + active = 0 + else + return 0 + +/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) + 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." + usable = 1 + toggleable = 1 + activate_string = "Enable Armor" + deactivate_string = "Disable Armor" + engage_string = "Configure Armor" + var/list/armor_settings = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0) + 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) + to_chat(usr, "Invalid armor value. Can only be between 0-60") + else + value = round(value) + armor_settings[armor_chosen] = value + + +/obj/item/rig_module/protean/armor/activate() + if(!..()) + 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.") + active = 1 + else + return 0 + +/obj/item/rig_module/protean/armor/deactivate(var/forced) + if(!..()) + return 0 + if(forced) + 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.") + active = 0 + else + return 0 + +/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 + deactivate(1) + + +//This rig module lets a Protean expend its metal stores to heal its host +/obj/item/rig_module/protean/healing + name = "Protean Restorative Nanites" + desc = "This should never be outside of a RIG." + icon_state = "flash" + interface_name = "Protean Restorative Nanites" + interface_desc = "Utilises stored steel from the Protean to slowly heal and repair the wearer." + usable = 1 + engage_string = "Toggle Mode" \ No newline at end of file diff --git a/modular_chomp/code/modules/mob/living/carbon/human/species/station/protean/_protean_defines.dm b/modular_chomp/code/modules/mob/living/carbon/human/species/station/protean/_protean_defines.dm index a968ec9850..1e2d91577d 100644 --- a/modular_chomp/code/modules/mob/living/carbon/human/species/station/protean/_protean_defines.dm +++ b/modular_chomp/code/modules/mob/living/carbon/human/species/station/protean/_protean_defines.dm @@ -1 +1 @@ -#define PROTEAN_EDIBLE_MATERIALS list(MAT_STEEL,MAT_GLASS) \ No newline at end of file +#define PROTEAN_EDIBLE_MATERIALS list(MAT_STEEL) \ No newline at end of file diff --git a/modular_chomp/code/modules/mob/living/carbon/human/species/station/protean/protean_blob.dm b/modular_chomp/code/modules/mob/living/carbon/human/species/station/protean/protean_blob.dm index bb155fa215..bb2ecefc07 100644 --- a/modular_chomp/code/modules/mob/living/carbon/human/species/station/protean/protean_blob.dm +++ b/modular_chomp/code/modules/mob/living/carbon/human/species/station/protean/protean_blob.dm @@ -439,8 +439,8 @@ var/global/list/disallowed_protean_accessories = list( blob.transform = matrix()*size_multiplier blob.size_multiplier = size_multiplier - if(l_hand) drop_from_inventory(l_hand) - if(r_hand) drop_from_inventory(r_hand) + if(l_hand) drop_l_hand() + if(r_hand) drop_r_hand() //Put our owner in it (don't transfer var/mind) blob.ckey = ckey @@ -534,8 +534,8 @@ var/global/list/disallowed_protean_accessories = list( if(blob.healing) blob.healing.expire() - if(blob.l_hand) blob.drop_from_inventory(blob.l_hand) - if(blob.r_hand) blob.drop_from_inventory(blob.r_hand) + if(blob.l_hand) blob.drop_l_hand() + if(blob.r_hand) blob.drop_r_hand() if(blob.mob_radio) blob.mob_radio.forceMove(src) diff --git a/modular_chomp/code/modules/mob/living/carbon/human/species/station/protean/protean_organs.dm b/modular_chomp/code/modules/mob/living/carbon/human/species/station/protean/protean_organs.dm index 082ff2580f..8ac8238ff6 100644 --- a/modular_chomp/code/modules/mob/living/carbon/human/species/station/protean/protean_organs.dm +++ b/modular_chomp/code/modules/mob/living/carbon/human/species/station/protean/protean_organs.dm @@ -104,7 +104,7 @@ organ_tag = O_FACT parent_organ = BP_TORSO - var/list/materials = list(MAT_STEEL = 0, MAT_GLASS = 0) + var/list/materials = list(MAT_STEEL = 0) var/max_storage = 10000 organ_verbs = list( /mob/living/carbon/human/proc/reagent_purge diff --git a/modular_chomp/code/modules/mob/living/carbon/human/species/station/protean/protean_powers.dm b/modular_chomp/code/modules/mob/living/carbon/human/species/station/protean/protean_powers.dm index 5e4f2ac87f..55110ea1f2 100644 --- a/modular_chomp/code/modules/mob/living/carbon/human/species/station/protean/protean_powers.dm +++ b/modular_chomp/code/modules/mob/living/carbon/human/species/station/protean/protean_powers.dm @@ -221,7 +221,7 @@ var/held = caller.get_active_hand() if(!istype(held,/obj/item/stack/material)) - to_chat(caller,"You aren't holding a stack of materials in your active hand...!") + to_chat(caller,"You aren't holding a stack of materials in your active hand!") return var/obj/item/stack/material/matstack = held @@ -233,7 +233,7 @@ to_chat(caller,"You can't process [substance]!") return - var/howmuch = tgui_input_number(src,"How much do you want to store? (0-[matstack.get_amount()])","Select amount",null,matstack.get_amount(),0) + var/howmuch = tgui_input_number(caller,"How much do you want to store? (0-[matstack.get_amount()])","Select amount",null,matstack.get_amount(),0) if(!howmuch || matstack != caller.get_active_hand() || howmuch > matstack.get_amount()) return //Quietly fail @@ -343,9 +343,9 @@ to_chat(P,"You can only do this while not stunned.") else if(P.l_hand) - P.drop_from_inventory(P.l_hand) + P.drop_l_hand() if(P.r_hand) - P.drop_from_inventory(P.r_hand) + P.drop_r_hand() P.has_hands = 0 S.OurRig.myprotean = P src.drop_from_inventory(S.OurRig) 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 de923cdb56..d20032b7b5 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/power_sink) //Commented out unless I end up needing roundstart modules + initial_modules = list(/obj/item/rig_module/protean/syphon) 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 @@ -360,9 +360,9 @@ to_chat(user, "You need five sheets of plasteel to reconstruct this Protean.") return if(PL.use(5)) - to_chat(user, "You feed plasteel to the Protean, they will be able to reconstitute in a minute from now.") - to_chat(myprotean, "You've been fed the necessary plasteel to reconstitute your form, you will be able to reconstitute in one minute.") - addtimer(CALLBACK(src, .proc/make_alive, myprotean), 600) + to_chat(user, "You feed plasteel to the Protean, they will be able to reconstitute in ten minutes from now.") + to_chat(myprotean, "You've been fed the necessary plasteel to reconstitute your form, you will be able to reconstitute in ten minutes.") + addtimer(CALLBACK(src, .proc/make_alive, myprotean), 6000) return else to_chat(user, "This Protean is already reconstituting") diff --git a/modular_chomp/code/modules/mob/living/carbon/human/species/station/protean/protean_species.dm b/modular_chomp/code/modules/mob/living/carbon/human/species/station/protean/protean_species.dm index 53a6a0fef7..3e09370657 100644 --- a/modular_chomp/code/modules/mob/living/carbon/human/species/station/protean/protean_species.dm +++ b/modular_chomp/code/modules/mob/living/carbon/human/species/station/protean/protean_species.dm @@ -37,7 +37,7 @@ radiation_mod = 0 //Can't be assed with fandangling rad protections while blob formed/suited darksight = 10 siemens_coefficient = 2 - emp_dmg_mod = 1.4 + emp_dmg_mod = 0.8 //Since EMP's apply damage to all limbs, and Protean limbs account to their total health, EMP's are hyper lethal to them hazard_low_pressure = -1 //Space doesn't bother them hazard_high_pressure = INFINITY //consistency diff --git a/vorestation.dme b/vorestation.dme index f9fa796fb0..6bb672e10a 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -4496,6 +4496,8 @@ #include "modular_chomp\code\modules\clothing\face\miscellaneous.dm" #include "modular_chomp\code\modules\clothing\head\misc.dm" #include "modular_chomp\code\modules\clothing\spacesuits\rig\rig.dm" +#include "modular_chomp\code\modules\clothing\spacesuits\rig\modules\specific\defib.dm" +#include "modular_chomp\code\modules\clothing\spacesuits\rig\modules\specific\protean.dm" #include "modular_chomp\code\modules\datums\supplypacks\medical.dm" #include "modular_chomp\code\modules\datums\supplypacks\munitions.dm" #include "modular_chomp\code\modules\emotes\definitions\audiable.dm"