Merge remote-tracking branch 'citadel/master' into tgsync

This commit is contained in:
silicons
2021-01-19 04:24:42 -07:00
105 changed files with 978 additions and 411 deletions
+48
View File
@@ -476,3 +476,51 @@
return TRUE
to_chat(user, "<span class='warning'>You can't heal [M] with the \the [src]!</span>")
/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, "<span class='warning'>You are already applying [src]!</span>")
return
if(!iscarbon(M))
to_chat(user, "<span class='warning'>This won't work on [M]!</span>")
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, "<span class='warning'>[C] doesn't have \a [parse_zone(user.zone_selected)]!</span>")
return
if(!affecting.is_robotic_limb())
to_chat(user, "<span class='warning'>This won't work on nonrobotic limbs!</span>")
return
if(!affecting.threshhold_brute_passed && !affecting.threshhold_burn_passed)
to_chat(user, "<span class='warning'>There is no need to use this on [affecting]</span>")
return
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("<span class='green'>The nanogel gets to work on [C], repairing [affecting]'s internal damage.</span>", "<span_class='green'>You watch as the nanogel gets to work on fixing the internal damage in [affecting]</span>")
return
//If it gets here: It failed, lets tell the user why.
to_chat(user, "<span class='warning'>[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.</span>")
@@ -246,7 +246,6 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
new /datum/stack_recipe("pew (right)", /obj/structure/chair/pew/right, 3, one_per_turf = TRUE, on_floor = TRUE),\
)),
null, \
new/datum/stack_recipe("wooden firearm body", /obj/item/weaponcrafting/improvised_parts/wooden_body, 10, time = 20), \
new/datum/stack_recipe("rifle stock", /obj/item/weaponcrafting/stock, 10, time = 20), \
new/datum/stack_recipe("rolling pin", /obj/item/kitchen/rollingpin, 2, time = 30), \
new/datum/stack_recipe("wooden bucket", /obj/item/reagent_containers/glass/bucket/wood, 2, time = 30), \
@@ -391,7 +390,7 @@ GLOBAL_LIST_INIT(cloth_recipes, list ( \
new/datum/stack_recipe("construction bag", /obj/item/storage/bag/construction, 4), \
null, \
new/datum/stack_recipe("string", /obj/item/weaponcrafting/string, 1, time = 10), \
new/datum/stack_recipe("improvised gauze", /obj/item/stack/medical/gauze/improvised, 1, 2, 6), \
new/datum/stack_recipe("improvised gauze", /obj/item/stack/medical/gauze/improvised, 1, 2, 10), \
new/datum/stack_recipe("rag", /obj/item/reagent_containers/rag, 1), \
new/datum/stack_recipe("towel", /obj/item/reagent_containers/rag/towel, 3), \
new/datum/stack_recipe("bedsheet", /obj/item/bedsheet, 3), \