mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-29 23:16:21 +01:00
* Consolidates copypasta for repairing robolimbs Also prevents self-repairing a limb you are using to hold the tool * Fixes robot organs becoming undamagable after reaching cap * Fixes repairing with cable not using any cable, repairing with weldingtool not doing eyecheck * Removes ORGAN_ROBOT and ORGAN_ASSISTED flags, fixes #13123 * Fixes damage to robotic limbs not triggering organ processing At the same time, robotic limbs with damage don't need to process. However, it's much safer to explicitly have robot limbs return 0 from needs_process() instead of not rechecking bad external organs. * Build on HarpyEagle changes to apply to Polaris Had to apply the change from flag to an enumeration. * Removes unneeded file * Fix bruisepacks, remove heart Well, the unused bay version of the heart anyway * Tweaks examine, reverts isSynthetic Reverted that because Bay doesn't use it the same way. Also changed Examine to not list every robo-limb on non-FBPs in red, but left them listed as normal per Spookerton
46 lines
1.7 KiB
Plaintext
46 lines
1.7 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
|
|
|
|
|
|
/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(-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(user.zone_sel.selecting)
|
|
|
|
if(S.open == 1)
|
|
if (S && (S.robotic >= ORGAN_ROBOT))
|
|
if(S.get_damage())
|
|
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>"
|