Skip to content

Commit

Permalink
Re-Grow - limb regeneration for campaign (#16833)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lumipharon authored Dec 24, 2024
1 parent f0e84dd commit bd222c2
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@

/datum/loadout_item/secondary/kit/som_engineer/sentry/post_equip(mob/living/carbon/human/wearer, datum/outfit/quick/loadout, datum/outfit_holder/holder)
wearer.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/lasgun/lasrifle/volkite/cope, SLOT_IN_BACKPACK)
wearer.equip_to_slot_or_del(new /obj/item/ammo_magazine/minisentry, SLOT_IN_BACKPACK)
wearer.equip_to_slot_or_del(new /obj/item/explosive/grenade/som, SLOT_IN_BACKPACK)
wearer.equip_to_slot_or_del(new /obj/item/reagent_containers/hypospray/autoinjector/combat_advanced, SLOT_IN_BACKPACK)

/datum/loadout_item/secondary/kit/som_engineer/large_mines
Expand Down Expand Up @@ -139,7 +139,7 @@

/datum/loadout_item/secondary/kit/som_corpsman/advanced
name = "Advanced meds"
desc = "A variety of advanced medical injectors including Russian Red, as well as rezadone, a powerful chemical able to treat genetic damage in humanoids."
desc = "A variety of advanced medical injectors including Russian Red, rezadone and Re-Grow, allowing for the treatment of cloneloss and missing limbs."
ui_icon = "medkit"
purchase_cost = 30

Expand All @@ -148,5 +148,6 @@
wearer.equip_to_slot_or_del(new /obj/item/reagent_containers/hypospray/autoinjector/peridaxon_plus, SLOT_IN_BACKPACK)
wearer.equip_to_slot_or_del(new /obj/item/reagent_containers/hypospray/autoinjector/rezadone, SLOT_IN_BACKPACK)
wearer.equip_to_slot_or_del(new /obj/item/reagent_containers/hypospray/autoinjector/russian_red, SLOT_IN_BACKPACK)
wearer.equip_to_slot_or_del(new /obj/item/reagent_containers/hypospray/advanced/synaptizine, SLOT_IN_BACKPACK)
wearer.equip_to_slot_or_del(new /obj/item/reagent_containers/hypospray/autoinjector/regrow, SLOT_IN_BACKPACK)
wearer.equip_to_slot_or_del(new /obj/item/reagent_containers/hypospray/autoinjector/synaptizine, SLOT_IN_BACKPACK)
wearer.equip_to_slot_or_del(new /obj/item/reagent_containers/hypospray/autoinjector/antitox_mix, SLOT_IN_BACKPACK)
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@

/datum/loadout_item/secondary/kit/tgmc_corpsman/advanced
name = "Advanced meds"
desc = "A variety of advanced medical injectors including neuraline, as well as rezadone, a powerful chemical able to treat genetic damage in humanoids."
desc = "A variety of advanced medical injectors including neuraline, rezadone and Re-Grow, allowing for the treatment of cloneloss and missing limbs."
ui_icon = "medkit"
purchase_cost = 30

Expand All @@ -315,5 +315,6 @@
wearer.equip_to_slot_or_del(new /obj/item/reagent_containers/hypospray/autoinjector/peridaxon_plus, SLOT_IN_BACKPACK)
wearer.equip_to_slot_or_del(new /obj/item/reagent_containers/hypospray/autoinjector/rezadone, SLOT_IN_BACKPACK)
wearer.equip_to_slot_or_del(new /obj/item/reagent_containers/hypospray/autoinjector/neuraline, SLOT_IN_BACKPACK)
wearer.equip_to_slot_or_del(new /obj/item/reagent_containers/hypospray/advanced/synaptizine, SLOT_IN_BACKPACK)
wearer.equip_to_slot_or_del(new /obj/item/reagent_containers/hypospray/autoinjector/regrow, SLOT_IN_BACKPACK)
wearer.equip_to_slot_or_del(new /obj/item/reagent_containers/hypospray/autoinjector/synaptizine, SLOT_IN_BACKPACK)
wearer.equip_to_slot_or_del(new /obj/item/reagent_containers/hypospray/autoinjector/antitox_mix, SLOT_IN_BACKPACK)
13 changes: 13 additions & 0 deletions code/datums/gamemodes/campaign/loadout_items/secondary_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@
name = "Extra ammo"
desc = "Additional ammo for your primary weapon."
ui_icon = "default"
jobs_supported = list(
SQUAD_MARINE,
SQUAD_ENGINEER,
SQUAD_SMARTGUNNER,
SQUAD_LEADER,
FIELD_COMMANDER,
SOM_SQUAD_MARINE,
SOM_SQUAD_ENGINEER,
SOM_SQUAD_VETERAN,
SOM_SQUAD_LEADER,
SOM_FIELD_COMMANDER,
)

/datum/loadout_item/secondary/kit/primary_ammo/post_equip(mob/living/carbon/human/wearer, datum/outfit/quick/loadout, datum/outfit_holder/holder)
var/datum/loadout_item/suit_store/main_gun/primary = holder.equipped_things["[ITEM_SLOT_SUITSTORE]"]
Expand All @@ -30,6 +42,7 @@

/datum/loadout_item/secondary/kit/primary_ammo/default
jobs_supported = list(SQUAD_CORPSMAN, SOM_SQUAD_CORPSMAN)
loadout_item_flags = LOADOUT_ITEM_ROUNDSTART_OPTION|LOADOUT_ITEM_DEFAULT_CHOICE

/datum/loadout_item/secondary/kit/emp_nades
name = "EMP nades"
Expand Down
41 changes: 41 additions & 0 deletions code/modules/reagents/chemistry/reagents/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1336,3 +1336,44 @@
if (21 to INFINITY)
L.jitter(5)
return ..()

/datum/reagent/medicine/regrow
name = "Re-grow"
description = "Re-grow is rare and unusual drug that stimulates the rapid (and horrifically painful) regeneration of missing limbs."
color = COLOR_REAGENT_SYNAPTIZINE
overdose_threshold = REAGENTS_OVERDOSE/5
overdose_crit_threshold = REAGENTS_OVERDOSE_CRITICAL/5
custom_metabolism = REAGENTS_METABOLISM * 5

/datum/reagent/medicine/regrow/on_mob_add(mob/living/L, metabolism)
if(volume < 5 || L.stat == DEAD || (!ishuman(L)))
return
var/mob/living/carbon/human/human = L
var/limb_regrown = FALSE
for(var/datum/limb/limb AS in human.limbs)
if(!(limb.limb_status & LIMB_DESTROYED))
continue
limb_regrown = TRUE
limb.biotize()
to_chat(human, span_userdanger("You feel unbelievable pain as your [limb.display_name] regrows before your eyes!"))
human.jitter(10)
human.Paralyze(1 SECONDS)
human.adjustStaminaLoss(20)
if(!limb_regrown)
return
human.emote("burstscream")
human.update_body()
human.updatehealth()
human.UpdateDamageIcon()

/datum/reagent/medicine/regrow/on_mob_life(mob/living/L, metabolism)
L.reagent_shock_modifier -= PAIN_REDUCTION_SUPER_HEAVY
L.adjustToxLoss(effect_str * 2)
return ..()

/datum/reagent/medicine/regrow/overdose_process(mob/living/L, metabolism)
L.apply_damage(effect_str * 4, TOX)

/datum/reagent/medicine/regrow/overdose_crit_process(mob/living/L, metabolism)
L.reagent_shock_modifier -= PAIN_REDUCTION_SUPER_HEAVY
L.apply_damages(effect_str, effect_str, effect_str * 4)
10 changes: 10 additions & 0 deletions code/modules/reagents/reagent_containers/autoinjectors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -356,3 +356,13 @@
/datum/reagent/medicine/arithrazine = 7.5,
)
description_overlay = "Tx4"

/obj/item/reagent_containers/hypospray/autoinjector/regrow
name = "Re-Grow autoinjector"
desc = "An auto-injector loaded with Re-Grow - able to rapidly regrow missing limbs."
icon_state = "AngelLight"
amount_per_transfer_from_this = 5
list_reagents = list(
/datum/reagent/medicine/regrow = 30,
)
description_overlay = "Grw"

0 comments on commit bd222c2

Please sign in to comment.