Skip to content

Commit

Permalink
[MIRROR] [NO GBP] Only add the armor plate prefix once. [MDB IGNORE] (#…
Browse files Browse the repository at this point in the history
…2881)

* [NO GBP] Only add the armor plate prefix once. (#83650)

## About The Pull Request

Currently, this will add the prefix for every upgrade. We only want to
add it once.

## Why It's Good For The Game

Oops. This isn't working as intended.

## Changelog
:cl:
fix: The armor plate component only adds the prefix once.
/:cl:

* [NO GBP] Only add the armor plate prefix once.

---------

Co-authored-by: necromanceranne <[email protected]>
Co-authored-by: NovaBot13 <[email protected]>
  • Loading branch information
3 people authored and StealsThePRs committed Jun 7, 2024
1 parent 7acf9e9 commit 066706d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions code/datums/components/armor_plate.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
var/upgrade_name
/// Adds a prefix to the item, demonstrating that it is upgraded in some way.
var/upgrade_prefix = "reinforced"
/// Tracks whether or not we've received an upgrade or not.
var/have_upgraded = FALSE

/datum/armor/armor_plate
melee = 10
Expand Down Expand Up @@ -81,11 +83,11 @@
to_chat(user, span_info("You strengthen [mecha_for_upgrading], improving its resistance against attacks."))
else
SEND_SIGNAL(target_for_upgrading, COMSIG_ARMOR_PLATED, amount, maxamount)
if(upgrade_prefix)
if(upgrade_prefix && !have_upgraded)
target_for_upgrading.name = "[upgrade_prefix] [target_for_upgrading.name]"
have_upgraded = TRUE
to_chat(user, span_info("You strengthen [target_for_upgrading], improving its resistance against attacks."))


/datum/component/armor_plate/proc/dropplates(datum/source, force)
SIGNAL_HANDLER

Expand Down

0 comments on commit 066706d

Please sign in to comment.