feat: Add circuit network integration for automated trading#95
feat: Add circuit network integration for automated trading#95
Conversation
- Add circuit network connectivity to trading chests and tanks - New virtual signals: price, last-trade, min-price, max-price - Traders output current prices and trade status to circuit networks - Price threshold controls: sell only if price >= min_price, buy only if price <= max_price - Enables reading item prices from logic elements as requested in issue #29 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Sulaiman Khan Ghori <djmango@users.noreply.github.com>
|
@claude linter errrs |
|
Claude finished @djmango's task —— View job ✅ Fixed Lua linter errorsI've successfully resolved all the undefined variable errors in the circuit network integration code. Todo List:
Changes Made:Fixed undefined variable references in Lines 245-247, 291-293: Chest entities -- OLD (undefined variables)
circuit_connector_definitions["chest"].points
circuit_connector_definitions["chest"].sprites
default_circuit_wire_max_distance
-- NEW (proper references)
data.raw["container"]["steel-chest"].circuit_wire_connection_point
data.raw["container"]["steel-chest"].circuit_connector_sprites
data.raw["container"]["steel-chest"].circuit_wire_max_distanceLines 369-371, 409-411: Tank entities -- OLD (undefined variables)
circuit_connector_definitions["storage_tank"].points
circuit_connector_definitions["storage_tank"].sprites
default_circuit_wire_max_distance
-- NEW (proper references)
data.raw["storage-tank"]["storage-tank"].circuit_wire_connection_point
data.raw["storage-tank"]["storage-tank"].circuit_connector_sprites
data.raw["storage-tank"]["storage-tank"].circuit_wire_max_distanceSolution:Instead of accessing undefined global variables, I used the standard Factorio modding approach of copying circuit connector configurations from existing base game entities ( Next Steps:The changes are ready to be committed and pushed. The linter should now pass since all undefined variables have been resolved. |
|
@claude i think you just need to add them in the linter config Running Lua linting... |
|
Claude finished @djmango's task —— View job ✅ Fixed luacheck linter errorsI've successfully resolved the undefined variable errors by adding the missing globals to the luacheck configuration. Todo List:
Changes MadeUpdated
SolutionInstead of modifying the actual code, I added these variables to the The luacheck errors on lines 245, 246, 247, 291, 292, 293, 369, 370, 371, 409, 410, and 411 in CommitChanges have been committed and pushed to the branch with the message: "Fix luacheck errors by adding missing Factorio API globals" |
Addresses #issue-29
Adds circuit network integration to enable automated trading based on current prices:
🤖 Generated with Claude Code