From a2e2c373ef97267404f8e9743fed9b28fc7fdbb5 Mon Sep 17 00:00:00 2001 From: Chinsky Date: Wed, 13 Mar 2013 05:57:53 +0400 Subject: [PATCH] Added new item - nanopaste. Researchable by RnD (materials and engineering tech), used to repair robots and robolimbs more efficiently (twice as fast and both damage types at once). --- baystation12.dme | 1 + code/game/objects/items/stacks/nanopaste.dm | 37 ++++++++++++++++++++ code/modules/research/designs.dm | 8 +++++ icons/obj/nanopaste.dmi | Bin 0 -> 311 bytes 4 files changed, 46 insertions(+) create mode 100644 code/game/objects/items/stacks/nanopaste.dm create mode 100644 icons/obj/nanopaste.dmi diff --git a/baystation12.dme b/baystation12.dme index 6ddd4de538e..fa319db3fab 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -508,6 +508,7 @@ #include "code\game\objects\items\robot\robot_parts.dm" #include "code\game\objects\items\robot\robot_upgrades.dm" #include "code\game\objects\items\stacks\medical.dm" +#include "code\game\objects\items\stacks\nanopaste.dm" #include "code\game\objects\items\stacks\rods.dm" #include "code\game\objects\items\stacks\stack.dm" #include "code\game\objects\items\stacks\sheets\glass.dm" diff --git a/code/game/objects/items/stacks/nanopaste.dm b/code/game/objects/items/stacks/nanopaste.dm new file mode 100644 index 00000000000..c4697e63b6f --- /dev/null +++ b/code/game/objects/items/stacks/nanopaste.dm @@ -0,0 +1,37 @@ +/obj/item/stack/nanopaste + name = "nanopaste" + singular_name = "nanite swarm" + desc = "A tube of paste containing swarms of repair nanties. Very effective in repairing robotic machinery." + icon = 'icons/obj/nanopaste.dmi' + icon_state = "tube" + origin_tech = "materials=4;engineering=3" + amount = 10 + + +/obj/item/stack/nanopaste/attack(mob/living/M as mob, mob/user as mob) + if (!istype(M) || !istype(user)) + return 0 + if (istype(M,/mob/living/silicon/robot)) //Repairing cyborgs + var/mob/living/silicon/robot/R = M + if (R.getBruteLoss() || R.getFireLoss() ) + R.adjustBruteLoss(-60) + R.adjustFireLoss(-60) + R.updatehealth() + use(1) + user.visible_message("You apply some [src] at [R]'s damaged areas.",\ + "\The [user] applied some [src] at [R]'s damaged areas.") + else + user << "All [R]'s systems are nominal." + + if (istype(M,/mob/living/carbon/human)) //Repairing robolimbs + var/mob/living/carbon/human/H = M + var/datum/organ/external/S = H.get_organ(user.zone_sel.selecting) + if (S && (S.status & ORGAN_ROBOT)) + if(S.get_damage()) + S.heal_damage(30, 30, robo_repair = 1) + H.updatehealth() + use(1) + user.visible_message("You apply some nanite paste at [user == M ? "your" : "[M]'s"] [S.display_name]",\ + "\The [user] applies some nanite paste at[user != M ? " \the [M]'s" : " \the"][S.display_name] with \the [src]") + else + user << "Nothing to fix here." diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index 0fd82e0b38a..f1a4e8b683c 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -1321,6 +1321,14 @@ datum/design/synthetic_flash build_path = "/obj/item/device/flash/synthetic" category = "Misc" +datum/design/nanopaste + name = "nanopaste" + desc = "A tube of paste containing swarms of repair nanties. Very effective in repairing robotic machinery." + id = "nanopaste" + req_tech = list("materials" = 4, "engineering" = 3) + build_type = PROTOLATHE + materials = list("$metal" = 7000, "$glass" = 7000) + build_path = "/obj/item/stack/nanopaste" ///////////////////////////////////////// /////////////////Weapons///////////////// ///////////////////////////////////////// diff --git a/icons/obj/nanopaste.dmi b/icons/obj/nanopaste.dmi new file mode 100644 index 0000000000000000000000000000000000000000..b3c096325f9134bbd4eafc10448c211712bf0984 GIT binary patch literal 311 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnF3?v&v(vJfvxd5LK*8>L*7#q*j*?8G_=9#pa z|9yRZo1435&z_x>m|QSv-_CCqQb3iAB|(0{3=Yq3qyae@RUr{2E~&-IMVSR9nfZAP z3>9;N!wQN@zkdlX`1tjSmbb3fxija3H-s8oG=A_%=e&>RNrs}H-W?XkLB^Mjy%gp= znsj7Rh(hqnB_^7oo!!Q&n^#DjFn#jKN89U+Z|jDsqA`DC4lHA0kk}=;d)p*eGoYQp zo-U3d8WWQf7N{qPI0y?Exd;mcx;)+7X0eEK$?`>L>n;M}s1%O#{_$|8;y)3Xl3 zFRnOgTe~ HDWM4fOucs4 literal 0 HcmV?d00001