Fixes AI program nanites (#29373)

* Fixes AI program nanites

* Updates descriptions

* Fixes bad indentation from merge conflict resoltion

* Makes nanite cost work with one var

* All one var

* Linters

---------

Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
This commit is contained in:
PollardTheDragon
2025-06-07 14:20:32 +00:00
committed by GitHub
parent 796f91aeb5
commit d8f47f5ee9
2 changed files with 90 additions and 20 deletions
@@ -14,6 +14,13 @@
var/uses //If we have multiple uses of the same power
var/auto_use_uses = TRUE //If we automatically use up uses on each activation
antimagic_flags = NONE
/// Is this spell an AI program?
var/datum/ai_program/program
/datum/spell/ai_spell/New()
. = ..()
if(program)
desc += " Costs [program.nanite_cost] Nanites to use."
/datum/spell/ai_spell/create_new_targeting()
return new /datum/spell_targeting/self
@@ -46,6 +53,12 @@
continue
return closest_camera
/datum/spell/ai_spell/proc/desc_update()
desc = initial(desc)
if(program)
desc += " Costs [program.nanite_cost] Nanites to use."
action.desc = desc
/datum/spell/ai_spell/proc/camera_beam(target, icon_state, icon, time)
var/obj/machinery/camera/C = find_nearest_camera(target)
if(!istype(C))