starting prot rig modules

This commit is contained in:
BlackMajor
2022-08-25 21:57:08 +12:00
parent a26503b1a5
commit 43888a6718
9 changed files with 176 additions and 15 deletions
@@ -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, "<span class='notice'>You switch the [src] to [use_on_synthetic ? "FBP" : "organic"] compatability.</span>")
@@ -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, "<font color='blue'><b>You activate the suit's energy syphon.</b></font>")
to_chat(H, "<span class='warning'>Your suit begins to sap at your own energy stores.</span>")
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, "<font color='blue'><b>You deactivate the suit's energy syphon.</b></font>")
to_chat(H, "<span class='warning'>Your suit ceases from sapping your own energy.</span>")
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, "<span class ='warning'>Invalid armor value. Can only be between 0-60</span>")
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, "<font color='blue'><b>You activate the suit's energy syphon.</b></font>")
to_chat(H, "<span class='warning'>Your suit begins to sap at your own energy stores.</span>")
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, "<font color='blue'><b>You deactivate the suit's energy syphon.</b></font>")
to_chat(H, "<span class='warning'>Your suit ceases from sapping your own energy.</span>")
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"
@@ -1 +1 @@
#define PROTEAN_EDIBLE_MATERIALS list(MAT_STEEL,MAT_GLASS)
#define PROTEAN_EDIBLE_MATERIALS list(MAT_STEEL)
@@ -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)
@@ -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
@@ -221,7 +221,7 @@
var/held = caller.get_active_hand()
if(!istype(held,/obj/item/stack/material))
to_chat(caller,"<span class='warning'>You aren't holding a stack of materials in your active hand...!</span>")
to_chat(caller,"<span class='warning'>You aren't holding a stack of materials in your active hand!</span>")
return
var/obj/item/stack/material/matstack = held
@@ -233,7 +233,7 @@
to_chat(caller,"<span class='warning'>You can't process [substance]!</span>")
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,"<span class='warning'>You can only do this while not stunned.</span>")
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)
@@ -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, "<span class='warning'>You need five sheets of plasteel to reconstruct this Protean.</span>")
return
if(PL.use(5))
to_chat(user, "<span class='notice'>You feed plasteel to the Protean, they will be able to reconstitute in a minute from now.</span>")
to_chat(myprotean, "<span class='notice'>You've been fed the necessary plasteel to reconstitute your form, you will be able to reconstitute in one minute.</span>")
addtimer(CALLBACK(src, .proc/make_alive, myprotean), 600)
to_chat(user, "<span class='notice'>You feed plasteel to the Protean, they will be able to reconstitute in ten minutes from now.</span>")
to_chat(myprotean, "<span class='notice'>You've been fed the necessary plasteel to reconstitute your form, you will be able to reconstitute in ten minutes.</span>")
addtimer(CALLBACK(src, .proc/make_alive, myprotean), 6000)
return
else
to_chat(user, "<span class='notice'>This Protean is already reconstituting</span>")
@@ -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