There actually is a filter option for that, while it does mention the lodash.filter method, IIRC, its cached and faster. https://docs.screeps.com/api/#Game.market.getAllOrders
Posts made by ags131
RE: High CPU usage of Game.market.getAllOrders()
RE: StructureSpawn causing "circular structure" error on JSON.stringify()
I don't like the idea of having to pay extra CPU, even if its a small amount, for a feature I won't need or use, an option to disable the 'feature' would be nice. The cost would be much larger if you store many keys in Memory vs if you had few keys. I would likely end up implementing my own parsing just to avoid it.
RE: allow third party software to not spam the in-game console
I'm also curious why the PR was rejected, citing it being an internal property gives us no context or reason on why it couldn't be exposed other than it that it wasn't the intended purpose. I'm not objecting to the PR being closed, in the end, you the devs decide whether stuff gets merged in. We would just like to hear reasons and possibly be able to discuss why they shouldn't be accepted so we can better understand the direction to go with future PRs.
I'm occasionally consulted before some PRs, and usually try to considered a few things before answering, such as what pros and cons are there to them? For this one its fairly simple:
- It doesn't break compatibility with anything else either as far as I can tell. It doesn't seem to have any effects other than not submitting a result when processed
- It wouldn't effect the current client at all,
hiddenwould be optional and default to
false, thus requiring nothing be updated.
- It gives API users the option of suppressing the empty results in the console, which means people making their own control panels and such can have macros or buttons to trigger console commands without spamming the console with usually empty results.
- None, other than requiring what is likely a one line update to your internal backend
RE: IVM - PTR - Error, could not find an object with ID
Since PTR is still on an older version, it may still have the bug where
Tombstone.creep.toString()throws the error too, if you are using
console.logor something on
Tombstone.creepthat can trigger this (This is already fixed in later versions)
RE: Possible solution for multi language support?
I've actually had a system like this working at one point, except it was using TCP rather than stdio, it would be a massive project to properly sandbox it, likely requiring containers for each user, which would be difficult to manage automatically. As @artch mentioned, CodingGaming is a completely different setup, they do a onetime container for each run, and unlike screeps, its not time sensitive so doesn't have to respond as quickly.