File Introduction

Eradicator's Library or "ErLib" is a pure-lua library for Factorio that can also survive in non-factorio environments.

Architecture:

+ ErLib is fully self contained inside it's subfolder.
+ ErLib knows which mod it is loaded from and when.
+ ErLib uses local files if remote files can't be found. (not per-file)
+ ErLib is built to be scenario compatible. Though some features
  like the default linked hotkeys can not be used in that mode.
+ The Core is completely passive by default.
+ Normal modules on require return a function that when called returns
  *up to* three objects: ModuleTable, StrictWrapper, uLocale.
+ Test modules return exactly two objects: TestFunction, PhaseTable
+ Except for Core no module ever changes _ENV.
  And even Core only does so on request.
+ All modules are stand-alone. (requirements will be auto-loaded)

Features:

+ ErLib can be used in a non-factorio environment for testing. Obviously
  factorio features don't work in that mode (they will throw errors).
+ ErLib has several advanced features like the EventManager,
  PluginManager, HotkeyManager and more that automate common tasks
  at a much higher level than other factorio libraries do.

Todo:

+ More control flow logging
+ Port and document all old modules
+ Core loads all modules outside of Core Function so the output can
  dynamically be rebuilt.
+ Add global flags (devmode, strictmode, etc)
+ use Sha2.lua instead of Sha256.lua?
+ Remove unused functions from LibDeflate

Future:

+ Runtime dis/enable of STRICT_MODE

Info:

  • Copyright: Eradicators Library, lossycrypt, 2017-2021
  • License: CC Attribution-NoDerivatives 4.0 International
  • Author: lossycrypt (factorio: eradicator)

Information about this Library

DevelopmentStatus How stable an Erlib module is.
Compatibility In what context an Erlib module can be safely require()'ed.


Information about this Library

DevelopmentStatus

How stable an Erlib module is.

This is intended as an indicator for mod developers who are unsure if they have to expect sudden api changes.

  • Work in progress: The module is new or undergoing refractoring. Major api changes will happen frequently and unannouncedly.

  • Polishing: All current module methods are feature complete but may still need performance optimizations. New methods might be added. Some tweaks to old methods might also happen.

  • Experimental: The module is feature-frozen, only bugfixes are expected. Minor changes are unlikely, but if they happen they will be announced via the changelog. The latest date of change will be documented. This is the best time to give feedback.

  • Stable: The module has been unchanged and without bug-reports for at least 4 weeks. Bugfixes or optimizations may result in a status downgrade to Experimental.

Compatibility

In what context an Erlib module can be safely require()'ed.

  • Pure Lua: These modules contain generic lua methods that do not depend on factorio in any way. They can be used in any Factorio loading stage or even in your local non-Factorio lua installation. Some methods do however have special Factorio compatibility built-in. For example Table.dcopy does not copy factorio LuaObjects even though they are lua tables.

  • Factorio Startup: Factorio settings or data stages. Aka before the main menu shows. Methods intended for settings stage will cause errors in data stage and vice versa, but require'ing the module as such is safe in both stages.

  • Factorio Runtime: Factorio control stage. Aka after a map has been created or loaded or joined.

generated by LDoc 1.4.6 Last updated 2021-09-10 19:51:19