Adds new AI upgrade disks as space and trader loot (#29837)

* Adds new AI upgrade disks, makes them space loot and trader loot

* Fixed oversight
This commit is contained in:
PollardTheDragon
2025-08-07 16:54:49 +00:00
committed by GitHub
parent 2f875d9a67
commit 001430f6fc
4 changed files with 66 additions and 2 deletions
+4 -2
View File
@@ -70,6 +70,8 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
// AI Powers
var/datum/program_picker/program_picker
var/datum/spell/ai_spell/choose_program/program_action
/// Base rate of nanite regen
var/nanite_regen = 1
/// Whether or not the AI has unlocked universal adapter
var/universal_adapter = FALSE
/// How effective is the adapter?
@@ -331,7 +333,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
var/list/status_tab_data = ..()
. = status_tab_data
status_tab_data[++status_tab_data.len] = list("Nanites:", "[program_picker.nanites] / [program_picker.max_nanites]")
status_tab_data[++status_tab_data.len] = list("Nanite Manufacture Rate:", "[(1 + 0.5 * program_picker.bandwidth)]")
status_tab_data[++status_tab_data.len] = list("Nanite Manufacture Rate:", "[(nanite_regen + 0.5 * program_picker.bandwidth)]")
if(stat)
status_tab_data[++status_tab_data.len] = list("System status:", "Nonfunctional")
return
@@ -438,7 +440,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
qdel(src)
return
// Regenerate nanites for abilities only when powered.
powered_ai.program_picker.nanites = min(100, powered_ai.program_picker.nanites + (1 + 0.5 * powered_ai.program_picker.bandwidth))
powered_ai.program_picker.nanites = min(powered_ai.program_picker.max_nanites, powered_ai.program_picker.nanites + (powered_ai.nanite_regen + 0.5 * powered_ai.program_picker.bandwidth))
if(!powered_ai.anchored)
loc = powered_ai.loc
change_power_mode(NO_POWER_USE)