Nanopaste balance changes (#20672)

This makes nanopaste take about twice as long to apply at a baseline, 2
seconds rather than 0.7, multiplied by five times if the mob you are
applying it to is yourself, reckoning out to 10 seconds to apply it once
to yourself. This also prevents you from applying nanopaste multiple
times at once, so this time limit can't be contravened.

The intention of this is to discourage using nanopaste mid-firefight,
which has been very powerful in the past since it took less than a
second to apply and could be spammed repeatedly to speed that up even
further. I also hope that it'll encourage IPCs to ask for help to apply
nanopaste, involving other people in the repair process, or to simply
use the workshop now that nanopaste is less instantaneous.
This commit is contained in:
hazelrat
2025-04-13 10:13:37 +00:00
committed by GitHub
parent 843387d6d8
commit 32b492d2f9
2 changed files with 110 additions and 14 deletions
+50 -14
View File
@@ -1,3 +1,4 @@
// Repairs robotic limbs and silicon mobs, with a limited number of uses.
/obj/item/stack/nanopaste
name = "nanopaste"
singular_name = "nanite swarm"
@@ -10,7 +11,16 @@
amount = 10
surgerysound = 'sound/items/surgery/bonegel.ogg'
desc_extended = "It takes significantly longer to apply nanopaste to yourself than it does to apply it to others. Nanites are best enjoyed with a friend!"
/// What materials does it take to fabricate nanopaste?
var/list/construction_cost = list(DEFAULT_WALL_MATERIAL = 7000, MATERIAL_GLASS = 7000)
/// How long does it take to apply nanopaste?
var/time_to_apply = 2 SECONDS
/// Multiplier applied to time_to_apply, if we want it to take longer in some situations.
var/application_multiplier = 5
/// Used to prevent applying nanopaste multiple times at once.
var/application_in_progress = FALSE
/obj/item/stack/nanopaste/update_icon()
var/amount = round(get_amount() / 2)
@@ -23,6 +33,8 @@
check_maptext(SMALL_FONTS(7, amount))
/obj/item/stack/nanopaste/attack(mob/living/target_mob, mob/living/user, target_zone)
var/application_time = time_to_apply // Local variant declared inside the proc so changes to it do not persist.
if(!ismob(target_mob) || !istype(user))
return 0
if (!can_use(1, user))
@@ -31,14 +43,26 @@
if (isrobot(target_mob)) //Repairing cyborgs
var/mob/living/silicon/robot/R = target_mob
if (R.getBruteLoss() || R.getFireLoss() )
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
if(do_mob(user, target_mob, 7))
R.adjustBruteLoss(-15)
R.adjustFireLoss(-15)
R.updatehealth()
use(1)
user.visible_message(SPAN_NOTICE("\The [user] applied some [src] at [R]'s damaged areas."),\
SPAN_NOTICE("You apply some [src] at [R]'s damaged areas."))
if(target_mob == user)
application_time *= application_multiplier // It takes longer to apply nanopaste to yourself than to someone else.
if (application_in_progress == FALSE)
application_in_progress = TRUE
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.visible_message(SPAN_NOTICE("\The [user] begins to apply some [src] to \the [target_mob]."),\
SPAN_NOTICE("You begin to apply some [src] to \the [target_mob]."))
if(do_mob(user, target_mob, application_time))
R.adjustBruteLoss(-15)
R.adjustFireLoss(-15)
R.updatehealth()
use(1)
user.visible_message(SPAN_NOTICE("\The [user] successfully applies some [src] at [R]'s damaged areas."),\
SPAN_NOTICE("You successfully apply some [src] at [R]'s damaged areas."))
application_in_progress = FALSE
else
to_chat(user, SPAN_WARNING("You are too focused applying \the [src] to do it multiple times simultaneously!"))
else
to_chat(user, SPAN_NOTICE("All [R]'s systems are nominal."))
@@ -58,13 +82,23 @@
if(H.wear_suit && istype(H.wear_suit,/obj/item/clothing/suit/space))
to_chat(user, SPAN_WARNING("You can't apply [src] through [H.wear_suit]!"))
return
if(target_mob == user)
application_time *= application_multiplier // It takes longer to apply nanopaste to yourself than to someone else.
if (application_in_progress == FALSE)
application_in_progress = TRUE
user.visible_message(SPAN_NOTICE("\The [user] begins to apply some nanite paste at[user != target_mob ? " \the [target_mob]'s" : " \the [user]"] [S.name] with \the [src]."),\
SPAN_NOTICE("You begin to apply some nanite paste at[user != target_mob ? " \the [target_mob]'s" : " \the [user]"] [S.name] with \the [src]."))
if(do_mob(user, target_mob, application_time))
S.heal_damage(15, 15, robo_repair = 1)
H.updatehealth()
use(1)
user.visible_message(SPAN_NOTICE("\The [user] successfully applies some nanite paste at[user != target_mob ? " \the [target_mob]'s" : " \the [user]"] [S.name] with \the [src]."),\
SPAN_NOTICE("You successfully apply some nanite paste at [user == target_mob ? "your" : "[target_mob]'s"] [S.name]."))
application_in_progress = FALSE
else
to_chat(user, SPAN_WARNING("You are too focused applying \the [src] to do it multiple times simultaneously!"))
if(do_mob(user, target_mob, 7))
S.heal_damage(15, 15, robo_repair = 1)
H.updatehealth()
use(1)
user.visible_message(SPAN_NOTICE("\The [user] applies some nanite paste at[user != target_mob ? " \the [target_mob]'s" : " \the [user]"] [S.name] with \the [src]."),\
SPAN_NOTICE("You apply some nanite paste at [user == target_mob ? "your" : "[target_mob]'s"] [S.name]."))
else
to_chat(user, SPAN_NOTICE("Nothing to fix here."))
else
@@ -75,6 +109,8 @@
to_chat(user, SPAN_NOTICE("Nothing to fix in here."))
// Antagonist-specific nanopaste. Functions similarly to usual nanopaste, except that it also applies a surge protection organ to the target.
// This organ protects the target from a specific number of EMPs. Intended to provide antagonist IPCs counterplay to ions.
/obj/item/stack/nanopaste/surge
name = "modified nanopaste"
singular_name = "nanite swarm"