moves ai upgrades to new attack chain, fixes bugs (#28668)

* ai upgrade fix

* duplicate icon and icon state
This commit is contained in:
Qwertytoforty
2025-03-15 04:15:19 -04:00
committed by GitHub
parent 587767c230
commit 459ab2d565
5 changed files with 25 additions and 16 deletions
@@ -95,7 +95,7 @@
/obj/item/slimepotion/transference = 50,
// Might as well let AI be interested
/obj/item/surveillance_upgrade = 25,
/obj/item/ai_upgrade/surveillance_upgrade = 25,
)
/obj/effect/spawner/random/traders/medical
@@ -178,7 +178,7 @@
/obj/item/organ/internal/cyberimp/arm/shell_launcher = 30,
/obj/item/organ/internal/cyberimp/brain/anti_drop/hardened = 20,
/obj/item/organ/internal/cyberimp/brain/anti_stam/hardened = 30,
/obj/item/surveillance_upgrade = 35
/obj/item/ai_upgrade/surveillance_upgrade = 35
)
/obj/effect/spawner/random/traders/skipjack_minor
@@ -273,7 +273,7 @@
/obj/item/organ/internal/cyberimp/brain/anti_drop/hardened = 20,
/obj/item/organ/internal/cyberimp/brain/anti_stam/hardened = 30,
/obj/item/assembly/signaler/anomaly/random = 50,
/obj/item/surveillance_upgrade = 35,
/obj/item/ai_upgrade/surveillance_upgrade = 35,
/obj/item/mod/module/storage/bluespace = 40
)
+19 -10
View File
@@ -1,15 +1,26 @@
///AI Upgrades
//Malf Picker
/obj/item/malf_upgrade
name = "combat software upgrade"
desc = "A highly illegal, highly dangerous upgrade for artificial intelligence units, granting them a variety of powers as well as the ability to hack APCs."
/obj/item/ai_upgrade
name = "parent ai upgrade"
desc = "A base rootkit for ai upgrades. If you are seeing this, report where you found it on the github issues."
icon = 'icons/obj/module.dmi'
icon_state = "datadisk3"
new_attack_chain = TRUE
/obj/item/ai_upgrade/interact_with_atom(atom/target, mob/living/user, list/modifiers)
if(is_ai(target))
ai_upgrade_action(target, user)
return ITEM_INTERACT_COMPLETE
/obj/item/malf_upgrade/afterattack__legacy__attackchain(mob/living/silicon/ai/AI, mob/user)
/obj/item/ai_upgrade/proc/ai_upgrade_action(mob/living/silicon/ai/AI, mob/user)
return
//Malf Picker
/obj/item/ai_upgrade/malf_upgrade
name = "combat software upgrade"
desc = "A highly illegal, highly dangerous upgrade for artificial intelligence units, granting them a variety of powers as well as the ability to hack APCs."
/obj/item/ai_upgrade/malf_upgrade/ai_upgrade_action(mob/living/silicon/ai/AI, mob/user)
if(!istype(AI))
return
if(AI.malf_picker)
@@ -23,13 +34,11 @@
//Lipreading
/obj/item/surveillance_upgrade
/obj/item/ai_upgrade/surveillance_upgrade
name = "surveillance software upgrade"
desc = "A software package that will allow an artificial intelligence to 'hear' from its cameras via lip reading."
icon = 'icons/obj/module.dmi'
icon_state = "datadisk3"
/obj/item/surveillance_upgrade/afterattack__legacy__attackchain(mob/living/silicon/ai/AI, mob/user)
/obj/item/ai_upgrade/surveillance_upgrade/ai_upgrade_action(mob/living/silicon/ai/AI, mob/user)
if(!istype(AI))
return
if(AI.eyeobj)
@@ -223,7 +223,7 @@
if(prob(10))
new /obj/item/clothing/mask/facehugger(src) //Suprise! Storing facehuggers improperly is what lead to this mess.
return
var/spawn_type = pick(/obj/item/gun/energy/kinetic_accelerator/experimental, /obj/item/surveillance_upgrade, /obj/item/mod/module/stealth/ninja)
var/spawn_type = pick(/obj/item/gun/energy/kinetic_accelerator/experimental, /obj/item/ai_upgrade/surveillance_upgrade, /obj/item/mod/module/stealth/ninja)
if(prob(25))
if(rand(1, 6) == 1) //organ time. I want this to be more balanced in distribution, so organs are under a prob 25
new /obj/item/organ/internal/alien/plasmavessel/drone(src) //Disected drone before the place got wiped. No hivenode.