Files
Aurora.3/code/game/objects/items/stacks/nanopaste.dm
Alberyk 37f8366b62 Baymerge fixes and custom items tweaks (#1515)
-fix missing bottles sprites
-fix some things related to custom items sprites and desc
-fix missing syndicate cyborg
-add delay to repairing robotic limbs and using first aid items
-allows sprints to be applied to hands and feet
-nanopaste can be used on robotic limbs, not only surgery
-fix #1512
-fix cargo maglocks beind centcom ones
-fix hardsuit vision restrictions not working as intended
-fix webbing being able to hold medium items
2017-01-11 23:01:43 +02:00

50 lines
1.9 KiB
Plaintext

/obj/item/stack/nanopaste
name = "nanopaste"
singular_name = "nanite swarm"
desc = "A tube of paste containing swarms of repair nanites. Very effective in repairing robotic machinery."
icon = 'icons/obj/nanopaste.dmi'
icon_state = "tube"
origin_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 3)
amount = 10
var/list/construction_cost = list(DEFAULT_WALL_MATERIAL = 7000, "glass" = 7000)
var/construction_time = 5
/obj/item/stack/nanopaste/attack(mob/living/M as mob, mob/user as mob, var/target_zone)
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() )
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
R.adjustBruteLoss(-15)
R.adjustFireLoss(-15)
R.updatehealth()
use(1)
user.visible_message("<span class='notice'>\The [user] applied some [src] at [R]'s damaged areas.</span>",\
"<span class='notice'>You apply 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/obj/item/organ/external/S = H.get_organ(target_zone)
if (S && (S.status & ORGAN_ROBOT))
if(S.get_damage())
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
S.heal_damage(15, 15, robo_repair = 1)
H.updatehealth()
use(1)
user.visible_message("<span class='notice'>\The [user] applies some nanite paste at[user != M ? " \the [M]'s" : " \the"][S.name] with \the [src].</span>",\
"<span class='notice'>You apply some nanite paste at [user == M ? "your" : "[M]'s"] [S.name].</span>")
else
user << "<span class='notice'>Nothing to fix here.</span>"
else
if (can_operate(H))
if (do_surgery(H,user,src))
return
else
user << "<span class='notice'>Nothing to fix in here.</span>"