![screeps code screeps code](https://i.imgur.com/jfbnHD6.png)
is-creep-boosted-count - how many body parts are boosted.optional param of RESOURCE_* constant for if the creep is boosted with the given boost. is-creep-boosted - is the creep boosted.creep-count-bodypart - how many of the body part does the creep have.creep-has-bodypart - does the given creep have the given body part.Changes will have to be made to the general configuration and can be applied and commited for every package afterwards. Mrm allows us to both generate new files or edit them in place. When changes have to be made to every package (such as in this commit), it doesn't help at all and the tedious changes have to be made manually. The current setup uses yeoman to create new files, which works fine for this exact use case. get-tower-repair-effect - calling get-tower-effect using TOWER_POWER_REPAIR.get-tower-heal-effect - calling get-tower-effect using TOWER_POWER_HEAL.get-tower-attack-effect - calling get-tower-effect using TOWER_POWER_ATTACK.Optionally create the following modules as well: This is mostly useful for usage along with TOWER_POWER_ATTACK, TOWER_POWER_HEAL or TOWER_POWER_REPAIR.
![screeps code screeps code](https://www.gamingonlinux.com/uploads/articles/article_media/4700298781565347621gol1.jpg)
![screeps code screeps code](https://static.wikia.nocookie.net/screeps/images/d/d7/Create_a_snippet.png)
#Screeps code install#
#Screeps code code#
In order to create consistent code it's a good idea to setup a code style check to the workflow. It would then be usable by players to do testing in their own AI and us in open-screeps packages. A copy of functions that dont use storage e.g.I'm repeating myself in a few packages with my stubbings which isn't really necessary. In npm the license currently links to which results in a 404 error. Licenseįorkers resir014 Arcath m-rsmn fun-alex-alex2006hw open-screeps's Issues Incorrect link to license TypeScript for statically typed JavaScriptĬheck out our Contributing Guidelines.Lerna for managing the monorepo and cross-dependencies.Never the less each module has a readme file with a description of it's purpose and a short example. You can check the src/ directory for a list of created modules, the directory names are usually very good indicators of what the containing code does. This projects aims to provide a lot of single purpose modules to simplify and extend the provided game API and improve the way you write your code. UsageĬreating a functional and feature rich bot for screeps can be a tedious and time consuming process. The disclaimer will get removed once I've established a workflow and published the packages to npm. This is still heavily work in progress while I extract modules from my code and get used to different tools.
#Screeps code how to#
I'm now attempting to restructure my code and splitting it into reusable modules for everyone to enjoy, teaching myself how to work with unit tests and a monorepo in the progress. This repository is a collection of useful snippets and methods that I came up with when programming for the game screeps. Reusable and tested building blocks for every screeps code base