screepsmods / screepsmod-market Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
I've added them to the market.yml but they don't appear on the market list
This mod appears to be adding orders but none of them show up in the game. Is there something else that needs to be done? Any tips on how to debug this?
Also, I'm a bit confused about whether this mod is needed or not. There's a builtin recreateNpcOrders cron job which runs and also creates orders, but without this mod the credits indicator never shows in the client and the market pages are not accessible?
Bug situation:
There are orders that do not work (Game.market.deal
returns OK
, but the resources/credits never exchange). I tested some of these broken IDs one by one, making sure that the terminal had enough energy, there were enough credits, and no other deals were going on that tick.
What I think happened:
I had changed market.yml
to sell only 200,000 of each resource instead of 1,000,000 of each resource (and also used admin-utils
to wipe and re-spawn NPC Terminals), and the broken orders are all the old 1,000,000 ones, which still show in the in-client market UI and are returned by Game.market.getAllOrders().
Again, Game.market.deal
on these orders returns OK
but does not successfully complete.
I think the bug stems from the mod code not removing orders if the original terminals don't exist anymore, or some other variation of a dangling/orphan issue.
How I figured it out:
I added a blacklist
array to my code that order IDs were added to after attempting them, and suddenly all my rooms were trading again after a few ticks (they swam through all the fake/busted orders). I have it temporarily fixed by filtering for orders <= 200000 amount, since all the 1000000 orders are the broken ones.
Cheers,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.