diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 01d684adad..64e58ded40 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -472,3 +472,50 @@ return TRUE to_chat(user, "You can't heal [M] with the \the [src]!") + +/obj/item/stack/medical/nanogel + name = "nanogel" + singular_name = "nanogel" + desc = "A highly advanced gel that when applied on a sufficiently repaired robotic limb will neutralize internal damage if present, allowing further repairs without the need for surgery." + self_delay = 150 //Agonizingly slow if used on self, but, not completely forbidden because antags with robolimbs need a way to handle their thresholds. + other_delay = 30 //Pretty fast if used on others. + amount = 12 + max_amount = 12 //Two synths worth of fixing, if every single bodypart of them has internal damage. Usually, probably more like 6-12. + icon_state = "nanogel" + var/being_applied = FALSE //No doafter stacking. + +/obj/item/stack/medical/nanogel/try_heal(mob/living/M, mob/user, silent = FALSE) + if(being_applied) + to_chat(user, "You are already applying [src]!") + return + if(!iscarbon(M)) + to_chat(user, "This won't work on [M]!") + return + being_applied = TRUE + ..() + being_applied = FALSE + +/obj/item/stack/medical/nanogel/heal(mob/living/M, mob/user) + var/mob/living/carbon/C = M //Only carbons should be able to get here + if(!C) + return + var/obj/item/bodypart/affecting = C.get_bodypart(check_zone(user.zone_selected)) + if(!affecting) //Missing limb? + to_chat(user, "[C] doesn't have \a [parse_zone(user.zone_selected)]!") + return + if(!affecting.is_robotic_limb()) + to_chat(user, "This won't work on nonrobotic limbs!") + return + if(!affecting.threshhold_brute_passed && !affecting.threshhold_burn_passed) + to_chat(user, "There is no need to use this on [affecting]") + if(affecting.threshhold_brute_passed && affecting.brute_dam == affecting.threshhold_passed_mindamage) + . = TRUE + affecting.threshhold_brute_passed = FALSE + if(affecting.threshhold_burn_passed && affecting.burn_dam == affecting.threshhold_passed_mindamage) + . = TRUE + affecting.threshhold_burn_passed = FALSE + if(.) + user.visible_message("The nanogel gets to work on [C], repairing [affecting]'s internal damage.", "You watch as the nanogel gets to work on fixing the internal damage in [affecting]") + return + //If it gets here: It failed, lets tell the user why. + to_chat(user, "[src] fails to work on [affecting] due to residual [(affecting.threshhold_burn_passed && affecting.threshhold_burn_passed) ? "brute and burn" : "[affecting.threshhold_burn_passed ? "burn" : "brute"]"] damage! Perform some external repairs before using this.") diff --git a/code/modules/vending/medical.dm b/code/modules/vending/medical.dm index 795d35adc4..a24233b17c 100644 --- a/code/modules/vending/medical.dm +++ b/code/modules/vending/medical.dm @@ -34,7 +34,8 @@ /obj/item/healthanalyzer/wound = 4, /obj/item/stack/medical/ointment = 2, /obj/item/stack/medical/suture = 2, - /obj/item/stack/medical/bone_gel = 4) + /obj/item/stack/medical/bone_gel = 4, + /obj/item/stack/medical/nanogel = 4) contraband = list(/obj/item/reagent_containers/pill/tox = 3, /obj/item/reagent_containers/pill/morphine = 4, /obj/item/reagent_containers/pill/charcoal = 6) diff --git a/code/modules/vending/medical_wall.dm b/code/modules/vending/medical_wall.dm index 31f3dc49f1..2d4c30080d 100644 --- a/code/modules/vending/medical_wall.dm +++ b/code/modules/vending/medical_wall.dm @@ -13,6 +13,7 @@ /obj/item/reagent_containers/medspray/sterilizine = 1, /obj/item/healthanalyzer/wound = 2, /obj/item/stack/medical/bone_gel = 2, + /obj/item/stack/medical/nanogel = 2, /obj/item/reagent_containers/syringe/dart = 10) contraband = list(/obj/item/reagent_containers/pill/tox = 2, /obj/item/reagent_containers/pill/morphine = 2) diff --git a/code/modules/vending/robotics.dm b/code/modules/vending/robotics.dm index 88f65506a6..2d77b2fc51 100644 --- a/code/modules/vending/robotics.dm +++ b/code/modules/vending/robotics.dm @@ -17,7 +17,8 @@ /obj/item/tank/internals/anesthetic = 2, /obj/item/clothing/mask/breath/medical = 5, /obj/item/screwdriver = 5, - /obj/item/crowbar = 5) + /obj/item/crowbar = 6, + /obj/item/stack/medical/nanogel = 5) armor = list("melee" = 100, "bullet" = 100, "laser" = 100, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50) resistance_flags = FIRE_PROOF default_price = PRICE_EXPENSIVE diff --git a/icons/obj/stack_objects.dmi b/icons/obj/stack_objects.dmi index 1cdb3b6443..4bd5dd91e1 100644 Binary files a/icons/obj/stack_objects.dmi and b/icons/obj/stack_objects.dmi differ