screepers / posis Goto Github PK
View Code? Open in Web Editor NEWPortable Operating System Interface for Screeps
License: MIT License
Portable Operating System Interface for Screeps
License: MIT License
Currently there is no way to use 0 MOVE part creeps along with POSIS due to the lack of ability to specify an exact spawn point, or at least request access to one of the spawns. Depending on execution order, it is possible to never gain access to the desired spawn structure, since the spawn extension keeps taking it for queued creeps.
The best solution I see is to add an optional spawnId
field to the spawnCreep
options along with a conditionally optional directions
array for specifying which direction the stationary creep should be spawned by. The implementation would be required to spawn these creeps from these exact spawns and directions when spawning this creeps. An error would be thrown if directions
is supplied without a spawnId
.
I can create the PR myself, but I figured I would open an issue for discussion first.
For example: (ignore the actual properties)
spawnCreep(opts: { pos: RoomPosition, bodyOptions: BodyPartConstant[][], memory?: any, priority: number });
Benefits:
(undefined, undefined, "stuff")
to skip some optional argumentsIs there any particular reason why .startProcess()
has to return a container object instead of just the Id? If the launching process needs the actual process, it could call .getProcessById()
using the returned Id instead of forcing the container object creation on every call of .startProcess()
https://github.com/screepers/POSIS/blob/master/src/core/IPosisKernel.d.ts#L2
First one is ideal, second one is slightly less so, etc.
Host doesn't have to honor it, but convention is that sort order represents client preferences.
We should consider adding a function to cancel a previously ordered Creep.
This can be useful when the situation changed in an unpredictable way (e.g. a room is getting invaded or an "attack" order has been cancelled).
Proposed declaration:
/**
* Cancel a previously ordered Creep (`spawnCreep`).
* Returns `true` if it was cancelled successfully.
*/
cancelCreep(id: string): boolean;
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.