Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AI Programs: More than a Door #27988

Draft
wants to merge 46 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
c08d4bc
AI Powers initial commit - Base datums for picker and program
PollardTheDragon Jan 5, 2025
b8fcaa4
Small fixes in base datums
PollardTheDragon Jan 5, 2025
c6d6ba0
RGB Lighting Power
PollardTheDragon Jan 7, 2025
4685f48
Nearest camera detection, beam effect for RGB_Lighting
PollardTheDragon Jan 7, 2025
f7b404b
Fixed learning AI Porgrams, Power Shunt Program
PollardTheDragon Jan 8, 2025
00e5ab0
Program install fixes, WebUI Program Install Menu Fixes
PollardTheDragon Jan 9, 2025
47e9802
Repair nanites
PollardTheDragon Jan 9, 2025
a92c73e
Universal Adapter
PollardTheDragon Jan 9, 2025
8473668
Door Override
PollardTheDragon Jan 10, 2025
5537d52
Nanofrost, Program Icons, Door Override Bug Fixes
PollardTheDragon Jan 11, 2025
3be17de
Sprites for AI machines
PollardTheDragon Jan 12, 2025
9edc57b
Bluespace Miner, Multimarket Analyzer, Light Replacer
PollardTheDragon Jan 12, 2025
4cffe1b
Fixes economy thing with bluespace miner
PollardTheDragon Jan 12, 2025
729fa86
Enhanced Door Controls, Nanosurgeons
PollardTheDragon Jan 14, 2025
1e0965e
Experimental Research Subsystem
PollardTheDragon Jan 16, 2025
fefa974
Removed excess from RND subsystem
PollardTheDragon Jan 16, 2025
e958a77
Adds Processing Node
XFirebirdX Jan 16, 2025
4ad2a76
Processing node changes and fixes
PollardTheDragon Jan 16, 2025
ae57da3
Processing nodes power states
PollardTheDragon Jan 16, 2025
61b6db9
Minor cleanup
PollardTheDragon Jan 16, 2025
acdd0ef
I've got a network node! And it makes heat!
PollardTheDragon Jan 17, 2025
64f7dab
Adds proc to nodes to change the assigned AI
PollardTheDragon Jan 17, 2025
c7c5359
Removed extra vars
PollardTheDragon Jan 17, 2025
cbde356
Icon fixes
PollardTheDragon Jan 17, 2025
baf6bcf
Adds overheat counter to delay overheat to prevent random atmos hotsp…
PollardTheDragon Jan 17, 2025
a307fb9
Merge branch 'master' into ai-more-than-a-door
PollardTheDragon Jan 17, 2025
deb0dfa
They changed my isAI check. Woe.
PollardTheDragon Jan 17, 2025
83d7348
Sealant, Holosigns, HONK, bugfixes, and stock part multipliers
PollardTheDragon Jan 18, 2025
3fde6dc
Enhanced Tracking Software
PollardTheDragon Jan 18, 2025
48de55e
Refunds for active programs
PollardTheDragon Jan 20, 2025
6e2320a
Remaining uninstall functionality
PollardTheDragon Jan 22, 2025
e76b818
AI RMC
PollardTheDragon Jan 22, 2025
d330c6a
Forgot a circuitboard
PollardTheDragon Jan 22, 2025
9e2aa5b
Fixes a small path issue
PollardTheDragon Jan 22, 2025
f1505cb
Global nodes list + node data for AI RMC TGUI
PollardTheDragon Jan 22, 2025
529b05f
TGUI Foundations
PollardTheDragon Jan 26, 2025
6722c57
Better check
PollardTheDragon Jan 29, 2025
fa05ffd
Better null check
PollardTheDragon Jan 29, 2025
7f1d5e1
Spacing
PollardTheDragon Jan 29, 2025
9a9ebe9
Better chat notification
PollardTheDragon Jan 29, 2025
2e420d8
A shitload of fixes
PollardTheDragon Jan 30, 2025
28c64fc
Camera beam helper proc
PollardTheDragon Jan 30, 2025
9fc596d
AI remote sound helper
PollardTheDragon Jan 30, 2025
d003b4a
Timer on nanofrost
PollardTheDragon Jan 30, 2025
6f266f3
ui.user
PollardTheDragon Jan 30, 2025
3309f8b
Merge remote-tracking branch 'upstream/master' into ai-more-than-a-door
PollardTheDragon Feb 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adds Processing Node
  • Loading branch information
XFirebirdX committed Jan 16, 2025
commit e958a7745f01badaa7d2ee4f98c4213c5cdb194f
56 changes: 56 additions & 0 deletions code/game/machinery/ai_resource.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/obj/machinery/processingnode
name = "Processing Node"
desc = "Test Description"
icon = 'icons/obj/machines/ai_machinery.dmi'
icon_state = "processor-off"
density = TRUE
anchored = TRUE
max_integrity = 100
idle_power_consumption = 5
active_power_consumption = 200

var/active = FALSE
var/mob/living/silicon/ai/assigned_ai = null

/obj/machinery/processingnode/Initialize(mapload)
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/processingnode(null)
component_parts += new /obj/item/stock_parts/capacitor(null, 2)
component_parts += new /obj/item/stack/sheet/mineral/gold(null, 10)
component_parts += new /obj/item/stack/sheet/mineral/silver(null, 10)
component_parts += new /obj/item/stack/sheet/mineral/diamond(null, 1)
component_parts += new /obj/item/stack/cable_coil(null, 5)
RefreshParts()

/obj/machinery/processingnode/attack_hand(user as mob)
to_chat(user, "<span class = 'notice'>You toggle the Processing Node from [active ? "On" : "Off"] to [active ? "Off" : "On"]</span>")
active = !active
if(active) // We're booting up
// Find the AI with lowest memory
for(var/mob/living/silicon/ai/new_ai in GLOB.ai_list)
if(!assigned_ai) //not found
assigned_ai = new_ai //search for new in global ai list
if(assigned_ai.program_picker.memory > new_ai.program_picker.memory)
assigned_ai = new_ai

if(!assigned_ai) // No eligible AI found, abort
active = FALSE
to_chat(user, "<span class = 'warning'>ERROR: No AI detected. Shutting down...</span>")
to_chat(user, "<span class = 'notice'>The Processing Node turns off.</span>")
else // We have an AI, up its memory
assigned_ai.program_picker.memory++

else // We're shutting down
// TODO rest of shutting down code
assigned_ai.program_picker.memory--
assigned_ai = null
to_chat(user, "Turning off")
update_icon(UPDATE_ICON_STATE)
if(assigned_ai)
// "destroyed" "do"
// assigned_ai.program_picker.memory--
// assigned_ai = null

/obj/machinery/processingnode/update_icon_state()
icon_state = "processor-[active ? "on" : "off"]"
14 changes: 14 additions & 0 deletions code/game/machinery/machine_frame.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1163,3 +1163,17 @@ to destroy them and players will be able to make replacements.
/obj/item/stock_parts/micro_laser = 1,
/obj/item/stack/cable_coil = 3,
/obj/item/stack/sheet/plasteel = 5)

/obj/item/circuitboard/processingnode
board_name = "Processing Node"
icon_state = "science"
build_path = /obj/machinery/processingnode
board_type = "machine"
origin_tech = "programming=4"
req_components = list(
/obj/item/stock_parts/capacitor = 2,
/obj/item/stack/sheet/mineral/gold = 10,
/obj/item/stack/sheet/mineral/silver = 10,
/obj/item/stack/sheet/mineral/diamond = 1,
/obj/item/stack/cable_coil = 5,
)
10 changes: 10 additions & 0 deletions code/modules/research/designs/machine_designs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -601,3 +601,13 @@
materials = list(MAT_GLASS = 1000)
build_path = /obj/item/circuitboard/merch
category = list("Misc. Machinery")

/datum/design/processingnode
name = "Machine Design (Processing Node)"
desc = "The circuit board for a processing node."
id = "processingnode"
req_tech = list("programming" = 5)
build_type = IMPRINTER
materials = list(MAT_GLASS = 1000, MAT_GOLD = 250)
build_path = /obj/machinery/processingnode
category = list("Misc. Machinery")
Binary file modified icons/obj/machines/ai_machinery.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions paradise.dme
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,7 @@
#include "code\game\jobs\job_objectives\virology.dm"
#include "code\game\machinery\adv_med.dm"
#include "code\game\machinery\ai_display.dm"
#include "code\game\machinery\ai_resource.dm"
#include "code\game\machinery\ai_slipper.dm"
#include "code\game\machinery\autolathe.dm"
#include "code\game\machinery\Beacon.dm"
Expand Down
Loading