Eradicator's L.I.B.R.A.R.Y.


A function library and modular high-level modding framework with a focus on runtime scripting.

2 years ago
1.1
4.10K

Changelog

Version: 4.2.6
Date: 2021-09-10
  Function:
    - Color added player colors from utility-constants.
  Bugfixes:
    - Fixed Player.try_swap_character inventory transfer error when 
      source inventory was smaller than target inventory.
Version: 4.2.5
Date: 2021-09-10
  Functions:
    - Breaking change! Renamed Set.from_values to Set.of_values.
    - Breaking change! Renamed Set.from_keys to Set.of_keys.
    - Added PluginManagerLite.manage_version
    - Added Tool.cross_require
    - Added Table.popmetatable
    - Added Data.Sprite.brute_scale
    - Added Entity.destroy
    - Added Player.try_swap_character
    - New module Surface
    - Added Surface.destroy_entities_filtered
  Plugins:
    - Fixed on_ticked_action failing to raise events for actions
      enqueued in inverse temporal order.
Version: 4.2.4
Date: 2021-09-01
  Functions:
    - Breaking change! Changed parameter order for Setting.make table-style
      default value from {def, min, max} to {min, def, max}.
  Plugins:
    - Babelfish: Translated fully for de, en, ja.
    - Babelfish: Cleaned up code and documentation.
Version: 4.2.3
Date: 2021-08-30
  Functions:
    - Added mod-setting to easily change logging level of all Log.Logger instance.
      Adapted EventManagerLite to allow logging outside of dev-mode.
    - Added dev-mode only per-mod logging level setting to selectively silence mods.
      List of supported mods is hardcoded until further notice.
  Utility Mods:
    - Universal Locale: Fixed auto-generated description headers sometimes
      had the wrong order.
Version: 4.2.2
Date: 2021-08-26
  Functions:
    - Breaking change! Renamed Math.limit_range to Math.limit.
    - Added cache clearing function for single-argument Memoize.
    - Added PluginManagerLite.get_savedata_default
    - Added some documentation to the still mostly undocumented Log module.
    - Added Locale.normalise
    - Added Locale.nlstring_size
    - Added Locale.nlstring_to_string
    - Added Locale.nlstring_is_equal
  Plugins:
    - Babelfish: Increased upload speed measurement precision.
    - Babelfish: Refractored prototype implementation, reduced code complexity.
  Bugfixes:
    - Fixed PluginManagerLite.manage_savedata overwriting default savedata
      with nil when called more than once.
  Utility Mods:
    - Universal Locale: Fixed that auto-generated descriptions were sometimes
      not fully formatted.
Version: 4.2.1
Date: 2021-08-19
  Functions:
    - Improved Error module messages. Messages now includes the name of the mod
      that was running while the error occured, instead of only the name of the
      mod that contains the erroring file (cross-mod-require). During startup
      messages no longer include rich text tags. During runtime messages
      now include instructions on how to copy the message text.
  Deprecated:
    - Removed redundant Data.Icon.SimpleIconTable. Use Data.Sprite.format_icon.
  Plugins:
    - Moved dummy-items from core directly into erlib.
  Utility Mods:
    - Universal Locale: Mod setting tooltip hint icons now come in different
      colors depending on the content of the tooltip.
Version: 4.2.0
Date: 2021-08-18
  Functions:
    - Breaking change! Array.deduplicate now takes a new parameter "f_ident"
      to facilitate deduplicating complex arrays.
    - Breaking change! Iter.ntuples no longer accepts tables containing
      non-tables at depths lower than n-1 to improve performance.
    - Breaking change! Removed redundant Table.sort. Use Array.sort instead.
    - Breaking change! Removed all undocumented metatable attachment and 
      inheritance from Table, Array and Set modules.
    - Made metatable inheritance for Set.*(A,B) operations a third parameter.
      Defaults to true to keep previous behavior.
  Deprecated:
    - Long deprecated old EventManager has been completely removed.
      Did some small updates to the documentation of EventManagerLite.
Version: 4.1.24
Date: 2021-08-15
  Functions:
    - Added Array.fisher_yates_shuffle
    - Added cache clearing function for multi-argument Memoize.
  Bugfixes:
    - Removed hardcoded alpha from Color() logistic colors.
Version: 4.1.23
Date: 2021-08-14
  Functions:
    - on_user_panic now filters out useless events without player_index.
    - Properly implemented Meta.Memoize for multi-argument functions.
Version: 4.1.22
Date: 2021-08-12
  Functions:
    - Added Player.get_selected_entity
    - Added Entity.is_real_car
    - Added EventManagerLite.ManagedLuaBootstrap.events
    - Added Gui.constructioneer
  Bugfixes:
    - Fixed: Color was returning a reference to the internal table for named colors.
Version: 4.1.21
Date: 2021-07-28
  Bugfixes:
    - PluginManagerLite errored when savedata management was enabled but
      no plugin actually used it.
Version: 4.1.20
Date: 2021-07-21
  Functions:
    - Added Locale.compress which replaces Locale.merge
    - Added EventManagerLite.object_name
    - Added remotes.events for easy cross-mod event sharing.
    - Added Array.deduplicate + Tests.
    - Added __len support to Cache.AutoCache
  Bugfixes:
    - Fixed Prototype.get_absolute_order for item sub/group.
    - Babelfish: Fixed network rate control for non-default game speeds.
    - Babelfish: Fixed another "malformed pattern" error in lua-find-mode.
    - Babelfish: Fixed error with empty string translation (so-long-and-thanks-for-all-the-fish achievement description).
  Plugins:
    - Integrated erlib_configure_plugin into erlib_enable_plugin.
    - Babelfish: Added 3 icons for mods to use.
    - Babelfish: Added on_babelfish_translation_state_changed event.
    - Babelfish: Updated demo to include event demonstration and type selection.
    - Babelfish: Made babelfish-demo a seperate plugin.
Version: 4.1.19
Date: 2021-07-15
  Plugins:
    - Babelfish: Added translate_prototype_name
    - Babelfish: Added on_user_panic compatibility.
    - Babelfish: Cleaned up the documentation a bit.
    - Babelfish: Added mod-usable localised message for translation failure.
  Internal:
    - Babelfish: Store full translation instead of pre-processed result.
    - Babelfish: Prepared for potential future Utf8 improvements.
Version: 4.1.18
Date: 2021-07-14
  Functions:
    - Added Lock.is_locked
    - Renamed Lock.RemoveLock to Lock.remove_lock
    - Renamed Lock.AutoLock to Lock.auto_lock
  Bugfixes:
    - Fixed Babelfish failed to create setting in dev mode.
  Internal:
    - Standardized and cleaned up plugin init logic.
Version: 4.1.17
Date: 2021-07-13
  Functions:
    - New module Prototype
    - Added Prototype.get_absolute_order
Version: 4.1.16
Date: 2021-07-12
  Bugfixes:
    - Fixed something. Forgot what it was. ^_^"
Version: 4.1.15
Date: 2021-07-10
  Functions:
    - Added Gui.set_slider_auto_tooltip
    - Added Gui.find_child
    - Added Gui.get_ancestors
    - Added Entity.get_item_contents
    - Added Locale.format_hotkey_tooltip
  Bugfixes:
    - Fixed missing area in on_player_changed_chunk when changing surfaces.
  Plugins:
    - Added gui-auto-styler
Version: 4.1.14
Date: 2021-07-05
  Functions:
    - Added automatic adjustement of minable.result to Data.Inscribe forking.
Version: 4.1.13
Date: 2021-06-14
  Functions:
    - Player.notify position not defaults to cursor position.
  Plugins:
    - Babelfish: Added virtual_signal support.
Version: 4.1.12
Date: 2021-06-08
  Functions:
    - Renamed Iter.filter_pairs to Iter.fpairs
    - Added Iter.fpairs2
    - Added Data.Recipe.copy_unlock_condition
    - Added Data.Prototype.get
    - Added Data.Prototype.get_enabled
    - Added Data.Prototype.set_enabled
    - New module Wube for documenting vanilla data-stage functions.
    - Added Wube.make_universal_circuit_connectors
    - Added TickedAction to EventManagerLite
    - Added removal of uninstalled plugin's savedata to PluginManagerLite.
    - Table.get and Table.sget no longer attach the Table metatable to the return value.
    - Player.get_player no longer accepts LuaPlayer objects as input (breaking change).
    - Player.get_player now uses lua-side caching to be very fast.
    - Added Player.get_event_player
    - Added Tool.try_require
  Deprecated:
    - Old EventManager has been officially replaced with EventManagerLite.
    - Old PluginManager have been completely removed.
  Utility Mods:
    - Universal Locale: Removed info icon from map-gen-preset-description.
  Plugins:
    - Added on_entity_created, on_player_changed_chunk and on_user_panic.
Version: 4.1.11
Date: 2021-06-07
  Functions:
    - Fixed Vector() imported bounding boxes had wrong offset.
    - Fully implemented Color module.
    - Added Setting.make
    - Added Remote.try_call
    - Added Player.toggle_shortcut
    - Added Data.Sprite.format_icon
  Utility Mods:
    - Added profiler-fork. My fork of Boodals's and justarandomgeek's profiler.
      Thank you both very much.
    - Profiler: Updated info.json to Factorio version 1.1.
    - Profiler: Fixed that assert() intercept did not return the input value.
    - Universal Locale: Fixed mod setting default value injection into wrong language.
  Bugfixes:
    - EventManager on_entity_created didn't correctly handle script_raised_*.
Version: 4.1.10
Date: 2021-06-04
  Plugins:
    - Babelfish: Fixed soft-update of old dictionary after mod changes.
    - Babelfish: Unlocalised descriptions are now treated as empty strings.
  Functions:
    - Cache.AutoCache now works with ipairs().
Version: 4.1.9
Date: 2021-06-04
  Utility Mods:
    - Universal Locale: Improved mod setting default value injection for non-numbers.
    - Universal Locale: Added automatic mod setting description info icon injection.
    - Universal Locale: Added automatic left trimming for [[string blocks]].
  Functions:
    - Replaced Array.unsorted_remove_key with Array.shuffle_pop
      and fixed that the final key was never removed. (Breaking change.)
    - Added Gui.move
  Plugins:
    - Babelfish: Improved translation CPU performance by 400%+.
    - Babelfish: Improved network rate control.
    - Babelfish: Implemented request packaging for better network efficiency.
    - Babelfish: Implemented request pre-calculation to prevent lag-spikes.
Version: 4.1.8
Date: 2021-05-27
  Internal:
    - EventManagerLite: Made handler order permanent and linked.
  Utility Mods:
    - Added enable-tests trigger mod and updated flag.DO_TESTS accordingly.
  Plugins:
    - Babelfish: Fixed language code detection disabled too early.
    - Babelfish: Made search types configurable. (Breaking change.)
  Functions:
    - New function Table.sort
  Bugfixes:
    - EventManagerLite: On_event now auto-corrects seperate on_init / on_config
      registrations.
Version: 4.1.7
Date: 2021-05-26
  Internal:
    - Hardcoded PluginManagerLite event order to prevent incorrect usage.
  Functions:
    - Replaced Table.has_value with Table.find
    - Added 'erlib:managed-events' PIG support to EventManagerLite.
Version: 4.1.6
Date: 2021-05-25
  Functions:
    - Added Iter.sriapi
  Plugins:
    - Babelfish: Network rate control is more accurate now.
    - Babelfish: Added can_find, get_player_language_code and get_translation_percentages.
    - Babelfish: Fuzzy find mode no longer depends on lua pattern matching.
    - Babelfish: Fuzzy and plain find modes should now work better with unicode.
  Internal:
    - EventManagerLite: Unified add/remove for all handler types.
Version: 4.1.5
Date: 2021-05-24
  Plugins:
    - Babelfish: Remote interface added. All code cleaned up and fully documented.
Version: 4.1.4
Date: 2021-05-23
  Plugins:
    - Babelfish: Prototype complete with indicator and search command.
Version: 4.1.3
Date: 2021-05-22
  Functions:
    - Added Remote.get_interface
    - Added Player.get_player
    - New module Setting
    - Added Verificate.isType.WhiteSpaceString
    - New module Locale
  Utility Mods:
    - Moved all utility trigger mods into the library mod so other people can use them.
    - Completely overhauled Universal Locale. It now outputs a native directory
      structure that can be directly copied into the mod dir.
  Internal:
    - Updated all library related locales to use uLocale.
Version: 4.1.2
Date: 2021-05-21
  Functions:
    - Added <true> and <false> boolean type compatibility to Verificate.verify.
    - Added Iter.ntuples + tests.
    - Added Iter.dpairs, an ntuples based deep iterator. (No tests yet.)
    - Removed Iter.deep_pairs.
    - New module EventManagerLite. A rewriten-from-scratch manager that
      reimplements LuaBootstrap in lua.
    - New module PluginManagerLite.
Version: 4.1.1
Date: 2021-04-x
  Internal:
    - Updated list of input names to 1.1.32 for Types documentation
      and Verificate.isType.InputName.
    - Added Vector.to_length, #-operator aka __len metamethod.
    - Added Vector.to_manhatten_distance
  Bugfixes:
    - Fixed Vector.copy did not set the metatable.
Version: 4.1.0
Date: 2021-04-23
  Functions:
    - Added Table.pop
    - Added is_whitelist to Table.clear + Test. Does not affect previous usage.
    - Added Math.floor and Math.ceil
    - Added Vector.draw for debugging.
    - Added Vector.to_strict_direction.
  Internal:
    - Updated to factorio base version 1.1.
    - Added code decorations to Vector to make it fully parsable by LDoc.
Version: 4.0.19
Date: 2020-11-02
  Internal:
    - Final version for factorio base version 1.0.
  Modules:
    - New module Remote
    - New class Remote.PackedInterfaceGroup
    - New module Data
    - Introduced per-module development status indicator.
    - Added EventManager on_entity_created wrapped custom event
    - Added EventManager on_player_changed_chunk wrapped custom event
  Functions:
    - New function Filter.table_value
    - New function Filter.chain
    - New function Data.SimpleCustomInput
    - New function Data.SimpleLinkedInput
    - Added key reassignment to Array.map copy-mode.
    - Added InputName to Verificate.isType
    - Added automatic Or-Type generation to Verificate.isType
Version: 4.0.18
Date: 2020-10-21
  Internal:
    - Added factorio object class awareness to Hydra
    - New function Array.insert_array
    - New function Array.flatten
    - New module EventManager
    - New remote shared_event_uids
  Bugfixes:
    - Fixes Stacktrace not working with long file paths.
    - Stacktrace directory paths now always include a trailing / slash.
Version: 4.0.17
Date: 2020-10-06
  Internal:
    - New module Math
    - New module Verificate
    - New function Iter.combinations + Tests
    - New function Iter.permutations + Tests
    - New function Iter.subsets + Tests
Version: 4.0.16
Date: 2020-10-03
  Internal:
    - New module Compare
    - New module Table
    - New test Table.*
Version: 4.0.15
Date: 2020-09-29
  Internal:
    - New module Set
    - New module Class
    - New module Array
    - New test Array.*
    - New function Iter.array_pairs
Version: 4.0.14
Date: 2020-09-23
  Internal:
    - New function Iter.sync_tuples
    - New function Iter.filter_pairs
    - New test Assumptions
    - New module Version
    - New test Version.*
Version: 4.0.13
Date: 2020-09-23
  Internal:
    - New module Cache
    - New module Lock
Version: 4.0.12
Date: 2020-09-22
  Internal:
    - New function String.f
    - New module Compose
    - New module Time
    - New module Tool
    - New module Memoize
    - New module Closurize
Version: 4.0.11
Date: 2020-09-19
  Internal:
    - Lambda module is complete.
    - New module String
Version: 4.0.9
Date: 2020-09-18
  Features:
    - Added assets/empty.ogg
  Internal:
    - Invented "shared" boot-strapper
    - Overhauled Core
    - Added basic integrated testing
    - Replaced old sha256 with more compatible one and added Test
    - Added (at least some) tests for each Coding sub-module.
    - Coding is functionally complete.
    - Added Debug.get_upvalue_tree() draft
Version: 4.0.7
Date: 2020-09-16
  Internal:
    - Added Zip with LibDeflate
Version: 4.0.6
Date: 2020-09-16
  Internal:
    - Added showref to Serpent.
    - Renamed Serpent to Hydra to avoid future confusion.
    - Renamed Debug to Stacktrace.
    - Improved Error message serialization.
    - Fixed wrong Stacktrace level due to tail-call.
Version: 4.0.5
Date: 2020-09-15
  Internal:
    - Added Error module.
Version: 4.0.4
Date: 2020-09-15
  Internal:
    - Fixed Debug module. Levels now behave as expected.
Version: 4.0.1
Date: 2020-09-12
  Internal:
    - Include official api doc in release for proper offline linking.
    - Creation of github repository and documentation page.
  Documentation:
    - Finished documenting Debug.
Version: 4.0.0
Date: 2020-09-12
  Internal:
    - Start of complete rebuild.
    - Setup automatic documentation configuration.
Version: 3.1.0
Date: 2020-03-10
  Internal:
    - Added the Vector module to handle all future position and area needs.
Version: 3.0.0
Date: 2020-03-10
  Internal:
    - Split into seperate mod to make it easier to update when future factorio versions start breaking stuff again.
Version: 0.0.1
Date: 0000-00-00
  Roadmap:
    - Make pure lua parts of the library seperately loadable.
    - Make the library loadable in a "static" manner where it does not configure itself.
    - Add auto-config function to set up the full library once inside a mod. Including dev-flags.
    - Include proper locale in flag mods? or is in erlib enough