diff --git a/code/__DEFINES/xeno.dm b/code/__DEFINES/xeno.dm
index 6b6ee730ee1..93621d4654b 100644
--- a/code/__DEFINES/xeno.dm
+++ b/code/__DEFINES/xeno.dm
@@ -219,10 +219,7 @@ GLOBAL_LIST_INIT(xeno_utility_upgrades, list(
/datum/status_effect/upgrade_trail,
))
-#define XENO_UPGRADE_BIOMASS_COST_T1 10
-#define XENO_UPGRADE_BIOMASS_COST_T2 15
-#define XENO_UPGRADE_BIOMASS_COST_T3 20
-#define XENO_UPGRADE_BIOMASS_COST_T4 25
+#define XENO_UPGRADE_COST 25
#define CHARGE_SPEED(charger) (min(charger.valid_steps_taken, charger.max_steps_buildup) * charger.speed_per_step)
#define CHARGE_MAX_SPEED (speed_per_step * max_steps_buildup)
diff --git a/code/modules/mob/living/carbon/xenomorph/evolution.dm b/code/modules/mob/living/carbon/xenomorph/evolution.dm
index 6cb2d88c467..0af4df8ae57 100644
--- a/code/modules/mob/living/carbon/xenomorph/evolution.dm
+++ b/code/modules/mob/living/carbon/xenomorph/evolution.dm
@@ -167,6 +167,9 @@
qdel(new_xeno.hunter_data)
new_xeno.hunter_data = hunter_data
hunter_data = null
+ new_xeno.upgrades_holder = upgrades_holder
+ for(var/datum/status_effect/S AS in new_xeno.upgrades_holder)
+ new_xeno.apply_status_effect(S)
new_xeno.generate_name() // This is specifically for numbered xenos who want to keep their previous number instead of a random new one.
new_xeno.hive?.update_ruler() // Since ruler wasn't set during initialization, update ruler now.
transfer_observers_to(new_xeno)
diff --git a/code/modules/mob/living/carbon/xenomorph/hive_upgrades.dm b/code/modules/mob/living/carbon/xenomorph/hive_upgrades.dm
index 562bb3cdb04..f0bfd843dd6 100644
--- a/code/modules/mob/living/carbon/xenomorph/hive_upgrades.dm
+++ b/code/modules/mob/living/carbon/xenomorph/hive_upgrades.dm
@@ -250,6 +250,7 @@ GLOBAL_LIST_INIT(tier_to_primo_upgrade, list(
/datum/hive_upgrade/building/upgrade_chamber
flags_upgrade = ABILITY_NUCLEARWAR
+ building_loc = 0
var/max_chambers = 3
/datum/hive_upgrade/building/upgrade_chamber/shell
diff --git a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm
index c8dd5e558df..eb0b5f97959 100644
--- a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm
+++ b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm
@@ -350,6 +350,8 @@ GLOBAL_LIST_INIT(strain_list, init_glob_strain_list())
var/regen_power = 0
///Stored biomass
var/biomass = 0
+ ///Stored upgrade effects, so we reapply them on evolve
+ var/list/upgrades_holder = list()
var/is_zoomed = FALSE
var/zoom_turf = null
diff --git a/code/modules/mob/living/carbon/xenomorph/xenoprocs.dm b/code/modules/mob/living/carbon/xenomorph/xenoprocs.dm
index 73ea93cfb49..90e971d031b 100644
--- a/code/modules/mob/living/carbon/xenomorph/xenoprocs.dm
+++ b/code/modules/mob/living/carbon/xenomorph/xenoprocs.dm
@@ -657,16 +657,6 @@
get_upgrades(src)
/mob/living/carbon/xenomorph/proc/get_upgrades(mob/living/carbon/xenomorph/user)
- var/upgrade_price
- switch(xeno_caste.tier)
- if(XENO_TIER_ONE)
- upgrade_price = XENO_UPGRADE_BIOMASS_COST_T1
- if(XENO_TIER_TWO)
- upgrade_price = XENO_UPGRADE_BIOMASS_COST_T2
- if(XENO_TIER_THREE)
- upgrade_price = XENO_UPGRADE_BIOMASS_COST_T3
- else
- upgrade_price = XENO_UPGRADE_BIOMASS_COST_T4
var/dat = "
"
dat += "
Active Upgrade Chambers:"
@@ -680,17 +670,17 @@
var/spur_chambers_built = length(user?.hive?.spur_chambers)
var/veil_chambers_built = length(user?.hive?.veil_chambers)
dat += "
SURVIVAL
"
- dat += "[shell_chambers_built ? "
Carapace " : "
Carapace "] | Cost: [upgrade_price] | Increase our armor."
- dat += "[shell_chambers_built ? "
Regeneration " : "
Regeneration "] | Cost: [upgrade_price] | Increase our health regeneration."
- dat += "[shell_chambers_built ? "
Vampirism " : "
Vampirism "] | Cost: [upgrade_price] | Leech from our attacks."
+ dat += "[shell_chambers_built ? "
Carapace " : "
Carapace "] | Cost: [XENO_UPGRADE_COST] | Increase our armor."
+ dat += "[shell_chambers_built ? "
Regeneration " : "
Regeneration "] | Cost: [XENO_UPGRADE_COST] | Increase our health regeneration."
+ dat += "[shell_chambers_built ? "
Vampirism " : "
Vampirism "] | Cost: [XENO_UPGRADE_COST] | Leech from our attacks."
dat += "
ATTACK
"
- dat += "[spur_chambers_built ? "
Celerity " : "
Celerity "] | Cost: [upgrade_price] | Increase our movement speed."
- dat += "[spur_chambers_built ? "
Adrenalin " : "
Adrenalin "] | Cost: [upgrade_price] | Increase our plasma regeneration."
- dat += "[spur_chambers_built ? "
Crush " : "
Crush "] | Cost: [upgrade_price] | Increase our damage to objects."
+ dat += "[spur_chambers_built ? "
Celerity " : "
Celerity "] | Cost: [XENO_UPGRADE_COST] | Increase our movement speed."
+ dat += "[spur_chambers_built ? "
Adrenalin " : "
Adrenalin "] | Cost: [XENO_UPGRADE_COST] | Increase our plasma regeneration."
+ dat += "[spur_chambers_built ? "
Crush " : "
Crush "] | Cost: [XENO_UPGRADE_COST] | Increase our damage to objects."
dat += "
UTILITY
"
- dat += "[veil_chambers_built ? "
Toxin " : "
Toxin "] | Cost: [upgrade_price] | Inject neurotoxin into the target."
- dat += "[veil_chambers_built ? "
Pheromones " : "
Pheromones "] | Cost: [upgrade_price] | Ability to emit pheromones."
- dat += "[veil_chambers_built ? "
Trail " : "
Trail "] | Cost: [upgrade_price] | Leave a trail behind."
+ dat += "[veil_chambers_built ? "
Toxin " : "
Toxin "] | Cost: [XENO_UPGRADE_COST] | Inject neurotoxin into the target."
+ dat += "[veil_chambers_built ? "
Pheromones " : "
Pheromones "] | Cost: [XENO_UPGRADE_COST] | Ability to emit pheromones."
+ dat += "[veil_chambers_built ? "
Trail " : "
Trail "] | Cost: [XENO_UPGRADE_COST] | Leave a trail behind."
var/datum/browser/popup = new(user, "upgrademenu", "
Mutations Menu
", 600, 600)
popup.set_content(dat)
@@ -700,17 +690,7 @@
if(incapacitated(TRUE))
to_chat(usr, span_warning("Cant do that right now!"))
return
- var/upgrade_price
- switch(xeno_caste.tier)
- if(XENO_TIER_ONE)
- upgrade_price = XENO_UPGRADE_BIOMASS_COST_T1
- if(XENO_TIER_TWO)
- upgrade_price = XENO_UPGRADE_BIOMASS_COST_T2
- if(XENO_TIER_THREE)
- upgrade_price = XENO_UPGRADE_BIOMASS_COST_T3
- else
- upgrade_price = XENO_UPGRADE_BIOMASS_COST_T4
- if(biomass < upgrade_price)
+ if(biomass < XENO_UPGRADE_COST)
to_chat(usr, span_warning("You dont have enough biomass!"))
return
var/upgrade = locate(upgrade_to_apply) in status_effects
@@ -718,12 +698,14 @@
to_chat(usr, span_xenonotice("Existing mutation chosen. No biomass spent."))
DIRECT_OUTPUT(usr, browse(null, "window=["upgrademenu"]"))
return
- biomass -= upgrade_price
+ biomass -= XENO_UPGRADE_COST
to_chat(usr, span_xenonotice("Mutation gained."))
for(var/datum/status_effect/S AS in upgrades_to_remove)
remove_status_effect(S)
+ upgrades_holder.Remove(S.type)
do_jitter_animation(500)
apply_status_effect(upgrade_to_apply)
+ upgrades_holder.Add(upgrade_to_apply.type)
DIRECT_OUTPUT(usr, browse(null, "window=["upgrademenu"]"))
//Special override case. May not call the parent.