All Projects → screepers → Screeps Snippets

screepers / Screeps Snippets

This repository is for saving pinned snippets from the screeps slack for posterity

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Screeps Snippets

Google Apps Script Awesome List
The usual list of links to interesting resources for Google Apps Script
Stars: ✭ 814 (+1885.37%)
Mutual labels:  snippets
Snipsnap
The ultimate snippets collection for VS Code
Stars: ✭ 840 (+1948.78%)
Mutual labels:  snippets
Lab
Lab wraps Git or Hub, making it simple to clone, fork, and interact with repositories on GitLab
Stars: ✭ 911 (+2121.95%)
Mutual labels:  snippets
Vuejs Snippets
Collection of Vuejs 2.0+ snippets
Stars: ✭ 17 (-58.54%)
Mutual labels:  snippets
Vscode Unity Code Snippets
All snippets for Unity3D development
Stars: ✭ 26 (-36.59%)
Mutual labels:  snippets
Gisto
Gisto is a Cross-platform snippets management desktop application that allows you and/or your team share code snippets fast and easily. Based on GitHub Gists Infrastructure which means you can use all your existing snippets by connecting your GitHub account! Gisto started as an attempt to fulfill the lack of a syntax highlighted and cloud synchronized code snippet solution. You may thing of Gisto as Evernote for code.
Stars: ✭ 853 (+1980.49%)
Mutual labels:  snippets
Snippetstore
🎉 A snippet management app for developers 🚀
Stars: ✭ 762 (+1758.54%)
Mutual labels:  snippets
Vscode Quasar Snippets
vscode snippets for quasar-framework
Stars: ✭ 33 (-19.51%)
Mutual labels:  snippets
Pawn Sublime Language
Pawn language settings for Sublime Text 3. Copied from C++ but with Pawn language and SA:MP specific modifications.
Stars: ✭ 26 (-36.59%)
Mutual labels:  snippets
30 Seconds Of Java
Curated collection of useful little Java functions that you can understand quickly
Stars: ✭ 872 (+2026.83%)
Mutual labels:  snippets
Vs Freemarker
FreeMarker language colorization extension for Visual Studio Code
Stars: ✭ 17 (-58.54%)
Mutual labels:  snippets
Vscode Badges
Snippets to quickly insert Shield.io badges into HTML, Markdown, reStructuredText or Textile documents
Stars: ✭ 19 (-53.66%)
Mutual labels:  snippets
Vscode Smarty
Smarty syntax highlight extension for Visual Studio Code
Stars: ✭ 10 (-75.61%)
Mutual labels:  snippets
Elixir Tips
The Killer Elixir Tips and Tricks...from the experience...
Stars: ✭ 833 (+1931.71%)
Mutual labels:  snippets
Xcodecodesnippets
Code snippets for Xcode.
Stars: ✭ 27 (-34.15%)
Mutual labels:  snippets
Polacode
📸 Polaroid for your code
Stars: ✭ 6,511 (+15780.49%)
Mutual labels:  snippets
Atom Modular Snippets
:atom: A modular solution to snippets in @Atom.
Stars: ✭ 8 (-80.49%)
Mutual labels:  snippets
Hayaku
Fuzzy abbreviations, support for preprocessors (Sass, Less, Stylus) and a lot of other features in easily configurable set of tools for writing CSS faster
Stars: ✭ 973 (+2273.17%)
Mutual labels:  snippets
Awesome Web Components
🤖 Awesome web components and snippets for every Front-End Developer
Stars: ✭ 28 (-31.71%)
Mutual labels:  snippets
Language Dot
Dot (Graphviz) package for Atom
Stars: ✭ 11 (-73.17%)
Mutual labels:  snippets

screeps-snippets

This repository is for saving pinned snippets from the #client-abuse, #help, #logging, #share-thy-code slack channels and any other important slack snippets from elsewhere for posterity.

If you want to contribute, please PR your additions.

The folder structure is broken into 6 primary categories:

  • client-abuse
  • classes
  • globals
  • logging
  • misc
  • prototypes

Each category is further divided into various languages

  • JavaScript
  • TypeScript
  • Kotlin (only some categories)

Other languages are welcome (e.g. kotalin) if people want to share their code. Simply throw the file in a new language folder in the primary category.

For pull requests, we use GitConsensus to allow the community to vote whether to merge or not. Currently, any PR with 6+ votes and 75% of votes being upvotes will be merged 10 days after the final action on the PR. Quick merges occur immediately after 18 upvotes. See the repo's .gitconsensus.yaml for all the current rules.

Index of all current snippets

classes

folder name author Description
JS bitSet.js warinternal bit set class
JS class.RoomVisualCache_module.js semperrabbit RoomVisual cache
JS creepsSingingSongs.js Lucifer creeps singing songs
JS Es6LRUMapWithSizeAndTtl.js warinternal A cache that can exhibit both least recently used (LRU) and max time to live (TTL) eviction policies.
JS WorldPosition.js warinternal Uniform screeps world position with E0S0 as origin.

client-abuse

folder name author Description
JS inject_script_tag.js semperrabbit injects script tag
JS LoAN_tampermonkey_inject_for_any_client.js semperrabbit will attempt to load the LoAN tampermonkey code each global reset.
JS run_window.onTick()_inside_the_client_per_tick.js semperrabbit run window.onTick() inside the client per tick
JS saveAlliancesInMemory.js semperrabbit Inject alliance data into Memory.alliances
JS util.inject.Birthday.js semperrabbit shows room object birth dates based on their id
JS util.inject.RoomTracker.js semperrabbit Allows for the retrieval of rooms currently being viewed in the client from in-game code
JS util.inject.RoomViewNotifier.js semperrabbit adds currently viewed room to memory
JS util.inject.TEMPLATE.js semperrabbit template for injections

globals

folder name author Description
JS adjust_CPU_limit_based_on_bucket_levels.js semperrabbit Adjust your CPU limit per tick based on current and target bucket levels
JS boostComponentsObject.js shibdib boost components
JS calculateTickTimeInGame.js Kamots Provides global.tickTime as seconds
JS command to clear in-game console.js GimmeCookies Clear the in-game console
JS determineFileFunctionLineWithinCode.js knightshade determine file, function, line within code
JS Global functions etc. example.js maxion example on how to use global
JS hasRespawned.js semperrabbit check if you just respawned
JS optimizedIsActive.js tigga a better OwnedStructure.isActive()
JS resourceColors.js engineeryo hex color codes for minerals, energy and power
JS respawn assist to clear memory and flags.js semperrabbit clears memory and flags
JS Reverse lookup tables for errors, colors, and resources.js warinternal reverse lookup tables for errors colors and resources
JS setTimeout_setInterval.js semperrabbit setTimeout() / setInterval() from JS, but it uses screeps ticks instead of ms
JS to get memory size.js tyr get memory size
JS voiceConsole.js stybbe say() but for real
JS tool.marketCalculator.js BoosterKevin help make decision about producing commodity documentation
Cached dynamic properties.js warinternal cached properties
Entity Message Bus.js warinternal receive messages on room object
Memory segment emulation.js dissi segment emulator
queueAction() system.js Helam queue actions
upkeep_costs.js warinternal constants for upkeep of decaying structures

logging

folder name author Description
- - - -

misc

folder name author Description
JS actually commented evil tower code.js daboross lodash chain tower code
JS bunkerLayoutsHumanReadable.js sparr readable bunker layouts sample
JS Calculate Cost of a Mine.js Gankdalf mining cost calculations
JS Check if room is a source keeper room.js issacar check if room is a source keeper room
JS colors.js dissi visualize percentage with colors
JS get room type without visibility(but regex^^).js enrico get room type without visibility
JS Global Tracking.js ags131 track global age
JS how to delete the memory of dead creeps (in memoriam!).js artritus remove memory of dead creeps
JS Memory Cache.js postcrafter memory hack
JS minCutWallRampartsPlacement.js saruss calculate minCut in a room
JS Minimal Starting AI.js WolfWings example bot starting point
JS module.exports example.js maxion example on how to use module.exports
JS moveTo version supporting raw PathFinder arguments, and a moveByPath which directly reads serialized strings.js daboross see name
JS OwnedStructure Memory.js warinternal structure memory
JS powerCreepChatter.js kittytack power creeps saying things
JS protocolBufferStorage.js daboross metadata storage
JS pushdownAutomataStateMachine.js warinternal PDA implementation
JS Remote mining generator.js domnomnom generates a remote mine setup
JS Reset Memory to default.js Doctor Zuber clears memory
JS roomDescribe.js engineeryo get room type from room name
JS screeps_astar.js tedivm a* adapted to screeps
JS simple benchmarks.js warinternal Simple benchmark test with sanity check
JS Simplified grid class.js warinternal simple grid class
JS sos_lib_crypto.js tedivm crypto library for screeps
JS String encryption.js warinternal vernam chiper implementation
JS Uint8ArrayConversion.js daboross encoding and decoding strings to uint8 arrays for storage
JS Unicode directional arrows.js warinternal hex codes for unicode arrows for all directions
JS WorldPosition uniform global coordinate system.js warinternal Uniform screeps world position with E0S0 as origin.
TS Creep intent tracker.ts unfleshedone intent tracker implementation
TS moving.average.ts unsleshedone moving average implementation
TS Typescript roomScan.ts crzytrane room scanner?
migrate room to sim.md semperrabbit how to migrate room to sim
screeps body calculator.md nitroevil link to creep calculator
KT DistanceTransform Vipo Algoritm for finding open areas in rooms
KT MinCut.kt Vipo Code for calculating the minCut in a room
KT VipoOS Vipo Example of a tiny OS solution for Screeps, written in Kotlin

prototypes

folder name author Description
JS/Creep Creep action error handler.js warinternal log creep action error codes
JS/Creep Creep.getOffExit.js engineeryo move creep of room exits
JS/Creep Freshly minted getActiveBodyparts accounting for boosts!.js daboross see name
JS/Creep Idle_Suspend for creeps.js proximo idle creeps for a certain amount of ticks
JS/Creep prototype.Creep.moveToStandByPos.js semperrabbit park creeps in their parking spots
JS/Creep untitled_activeBodyparts.js proximo optimized Creep.getActiveBodyparts()
JS/Creep util.fun.singing.js semperrabbit creeps singing
JS/Room prototype.Room.structures.js semperrabbit extends Room prototype with structures, also caching them
JS/Room Room.mineral.js Helam extends Room prototype with a mineral property including caching
JS/RoomObject Generalized target locking (with examples).js warinternal target locking for actors with memory
JS/RoomObject lookForNear.js warinternal extends RoomObject with .lookForNear()
JS/RoomObject lookNear.js warinternal extends RoomObject with .lookNear()
JS/RoomObject roomObjectSay.js mototroller say() on RoomObject
JS/RoomPosition findFirstInRange implementation for RoomPosition.js proximo findFirstInRange() for RoomPosition
JS/RoomPosition prototype.RoomPosition.toString_fromString.js semperrabbit better string functions for RoomPosition
JS/RoomVisual RawVisual Structures.js ags131 RoomVisuals for all structures
JS/Source Memory for Source (or other objects).js w4rl0ck adds memory to Source object
JS/StructureLink modified link.transferEnergy to prevent redundant multiple sends to the same target.js helam optimized StructureLink.transferEnergy()
DefineProperty Tutorial.js helam see name
functionMiddleware.js warinternal Loops over only functions on the prototype and passes them to a callback function
Monkey Patching Tutorial.js helam see name
JS/Creep excuseMe.js Robalian A set of functions that makes creeps tell other creeps to get out of the way using creep memory
TS excuseMe.ts Robalian A set of functions that makes creeps tell other creeps to get out of the way using creep memory
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].