mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-26 10:03:45 +00:00
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).
This commit is contained in:
37
code/game/objects/items/stacks/nanopaste.dm
Normal file
37
code/game/objects/items/stacks/nanopaste.dm
Normal file
@@ -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("<span class='notice'>You apply some [src] at [R]'s damaged areas.</span>",\
|
||||
"<span class='notice'>\The [user] applied some [src] at [R]'s damaged areas.</span>")
|
||||
else
|
||||
user << "<span class='notice'>All [R]'s systems are nominal.</span>"
|
||||
|
||||
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("<span class='notice'>You apply some nanite paste at [user == M ? "your" : "[M]'s"] [S.display_name]</span>",\
|
||||
"<span class='notice'>\The [user] applies some nanite paste at[user != M ? " \the [M]'s" : " \the"][S.display_name] with \the [src]</span>")
|
||||
else
|
||||
user << "<span class='notice'>Nothing to fix here.</span>"
|
||||
Reference in New Issue
Block a user