From 1f65719a7187db3eef3237e02699bc9cf42d1d34 Mon Sep 17 00:00:00 2001
From: jaahay <10636658+jaahay@users.noreply.github.com>
Date: Wed, 24 Jun 2026 23:07:40 -0700
Subject: [PATCH] arpa notifications
---
src/arpa.js | 12 ++++++++++++
src/index.js | 3 ++-
src/vars.js | 5 ++++-
strings/strings.json | 7 +++++++
4 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/src/arpa.js b/src/arpa.js
index 9ef9e0e25..c322ac919 100644
--- a/src/arpa.js
+++ b/src/arpa.js
@@ -2164,6 +2164,9 @@ function genetics(){
global.resource.Genes.amount -= cost;
global.race.minor[t] ? global.race.minor[t]++ : global.race.minor[t] = 1;
global.race[t] ? global.race[t]++ : global.race[t] = 1;
+ if (global.settings.arpaMsg){
+ messageQueue(loc('arpa_notify_minor_gene',[sizeApproximation(cost),traitSkin('name',t),global.race.minor[t]]),'success',false,['arpa']);
+ }
redraw = true;
}
else {
@@ -2193,6 +2196,9 @@ function genetics(){
global.prestige.Phage.count -= cost;
global.genes.minor[t] ? global.genes.minor[t]++ : global.genes.minor[t] = 1;
global.race[t] ? global.race[t]++ : global.race[t] = 1;
+ if (global.settings.arpaMsg){
+ messageQueue(loc('arpa_notify_minor_phage',[sizeApproximation(cost),traitSkin('name',t),global.genes.minor[t]]),'success',false,['arpa']);
+ }
redraw = true;
}
else {
@@ -2218,6 +2224,9 @@ function genetics(){
let res = global.race.universe === 'antimatter' ? 'AntiPlasmid' : 'Plasmid';
if (global.prestige[res].count >= cost){
global.prestige[res].count -= cost;
+ if (global.settings.arpaMsg){
+ messageQueue(loc('arpa_notify_trait_remove',[cost,loc(res === 'AntiPlasmid' ? 'resource_AntiPlasmid_plural_name' : 'resource_Plasmid_plural_name'),traitSkin('name',t)]),'warning',false,['arpa']);
+ }
let rank = global.race[t];
delete global.race[t];
if (!global.race['modified']){
@@ -2257,6 +2266,9 @@ function genetics(){
let res = global.race.universe === 'antimatter' ? 'AntiPlasmid' : 'Plasmid';
if (global.prestige[res].count >= cost){
global.prestige[res].count -= cost;
+ if (global.settings.arpaMsg){
+ messageQueue(loc('arpa_notify_trait_gain',[cost,loc(res === 'AntiPlasmid' ? 'resource_AntiPlasmid_plural_name' : 'resource_Plasmid_plural_name'),traitSkin('name',t)]),'success',false,['arpa']);
+ }
global.race[t] = 1;
if (!global.race.hasOwnProperty('modified')){
global.race['modified'] = {
diff --git a/src/index.js b/src/index.js
index 8845ee9e0..1cd849d9d 100644
--- a/src/index.js
+++ b/src/index.js
@@ -216,7 +216,7 @@ export function mainVue(){
}
});
- ['1','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17'].forEach(function(k){
+ ['1','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18'].forEach(function(k){
popover(`settings${k}`, function(){
return loc(`settings${k}`);
},
@@ -1406,6 +1406,7 @@ export function index(){
{{ 'm_keys' | label }}
{{ 'c_cat' | label }}
{{ 'always_power' | label }}
+ {{ 'arpa_messages' | label }}
{{ 'q_key' | label }}
{{ 'q_any' | label }}
{{ 'q_any_res' | label }}
diff --git a/src/vars.js b/src/vars.js
index f385095b2..7f8293be0 100644
--- a/src/vars.js
+++ b/src/vars.js
@@ -58,7 +58,7 @@ export var hell_graphs = {};
export var message_logs = {
view: 'all'
};
-export const message_filters = ['all','progress','queue','building_queue','research_queue','combat','spy','events','major_events','minor_events','achievements','hell'];
+export const message_filters = ['all','progress','queue','building_queue','research_queue','combat','spy','events','major_events','minor_events','achievements','hell','arpa'];
export var callback_queue = new Map();
export var active_rituals = {};
@@ -1532,6 +1532,9 @@ if (typeof global.settings.expose === 'undefined'){
if (typeof global.settings.alwaysPower === 'undefined'){
global.settings['alwaysPower'] = false;
}
+if (typeof global.settings.arpaMsg === 'undefined'){
+ global.settings['arpaMsg'] = true;
+}
if (typeof global.settings.tabLoad === 'undefined'){
global.settings['tabLoad'] = false;
}
diff --git a/strings/strings.json b/strings/strings.json
index f3efeaf39..919dce7d0 100644
--- a/strings/strings.json
+++ b/strings/strings.json
@@ -139,6 +139,7 @@
"settings15": "How the Building Queue manages merging similar items in the queue. It can merge similar items if they're nearby each other in the queue, regardless of where they are in the queue, or never merge them at all.",
"settings16": "Enable Experimental Touch Device enhancements",
"settings17": "Always power on new structures, even when remaining electricity or support is insufficient.",
+ "settings18": "Show ARPA trait manipulation messages in the message queue.",
"enable_reset": "Enable Reset Buttons",
"reset_warn": "Warning: This completely resets all your progress and cannot be undone. This is NOT a prestige mechanic; you are wiping out your game data. Keep this button disabled.",
"reset_soft": "Soft Reset Game",
@@ -164,6 +165,7 @@
"touch": "Touch Device",
"tabLoad": "Preload Tab Content",
"always_power": "Always Power On New Buildings",
+ "arpa_messages": "ARPA Messages",
"load_string_pack": "Load String Pack",
"clear_string_pack": "Clear String Pack",
"string_pack_none": "No string pack chosen",
@@ -177,6 +179,11 @@
"restore_warning": "Are you sure you want to Restore Backup? This will load a backup save that was saved to your browser's local storage right before the last time you prestiged. If no save is found, this option will not do anything.",
"update_avail": "Update Available",
"building_queue": "Building Queue",
+ "message_log_arpa": "ARPA",
+ "arpa_notify_minor_gene": "You have spent %0 genes on improving minor trait %1 to rank %2.",
+ "arpa_notify_minor_phage": "You have spent %0 phage on improving minor trait %1 to rank %2.",
+ "arpa_notify_trait_remove": "You have spent %0 %1 on removing genetic trait %2.",
+ "arpa_notify_trait_gain": "You have spent %0 %1 on gaining genetic trait %2.",
"queue_play": "Start the Building Queue",
"queue_pause": "Pause the Building Queue",
"research_queue": "Research Queue",