Lua libraries for use by other mods and submods that are parts of a larger mod.
Version: 1.1.4
Date: 2026-04-14
Features:
- Added perel.set_tag, insert_tag, and get_tag for entity ghost tags. Reserved inside a subtable to prevent interference from other mods.
- Added perel.fire_event with special handling and basic data sanitization
- Added perel.remove_invalid to recursively remove invalid LuaObject references from tables
Changes:
- Combined circuit network events and electric network events in the same file, deduplicating a lot of code
- Added more data verification to prevent future issues
- Stored certain references in tables instead of fetching every time
Bugfixes:
- Fixed a crash when wire_connection_target_cache was not initialized
- Fixed circuit_network_split not firing for manual wire removal
- Fixed a crash when building a wire after a robot builds the ghost the wire is already connected to. Resolves https://github.com/protocol-1903/perel/issues/12
Version: 1.1.3
Date: 2026-04-06
Bugfixes:
- Fixed a crash when indexing nonexistant fluidboxes
- Fixed that connections would be removed when building a ghost that has wires attached. Resolves https://github.com/protocol-1903/perel/issues/11
Version: 1.1.2
Date: 2026-04-04
Changes:
- Added power parsing and calculation functions, ported from Nonstandard Beacons
Version: 1.1.1
Date: 2026-04-04
Bugfixes:
- Fixed perel.find_build_action failing for entity ghosts
Version: 1.1.0
Date: 2026-04-04
Features:
- Added electric network events, exactly the same as circuit network events
- Added edge case support for circuit network events when an electric pole is shift clicked to remove connections
- Added general use utility functions for scripts
- Added functions to find the most recent ocurrance of an entity in a LuaUndoRedoStack
- Added a function to get fluidbox connected neighbours of an entity
- Added a function to get a bitmask from pipe connections
Changes:
- Added optional handling for events specific to each event
- All events will be enabled when LUA Event Trace is loaded
- [BREAKING] multi-target events (circuit network merged, circuit network created, circuit network split, circuit network destroyed) will be fired as a single event instead of individual events. See documentation for details
- [BREAKING] electric poles being destroyed will no longer fire on_pre_circuit_network_split because i cannot replicate the vanilla connection logic, related to bugfix mentioned below
- Optimized circuit network event firing to decrease API calls and fewer loop traversals
Bugfixes:
- Fixed that removing an electric pole would fire on_circuit_network_split even if the wires merged after it was removed due to vanilla behaviour
Version: 1.0.6
Date: 2026-01-12
Changes:
- Does not default to generating circuit connectors unless required. Should help increase performance as more things are done
Bugfixes:
- Fixed a crash when circuit connecters were invalid. Resolves https://github.com/protocol-1903/perel/issues/9
Version: 1.0.5
Date: 2025-12-04
Changes:
- Added perel.enabled_events and perel.event_categories for easy checking of which events have been registered to listen to
- Updated validification for event firing
- Added support for universal event registration for testing and development purposes
Bugfixes:
- Fixed a crash when placing a wall
Version: 1.0.4
Date: 2025-11-23
Changes:
- Made the perel framework global
- Generalized post event subtick handler
- Split cirucit network handlers into it's own file
- Merged event firing into handlers
- Cache valid wire connection targets
Bugfixes:
- Fixed a crash when wire_destination is not valid
Version: 1.0.3
Date: 2025-11-19
Changes:
- Removed log spam
Version: 1.0.2
Date: 2025-11-19
Features:
- Proper support for most nonstandard methods of interaction [platforms/robots/players/scripts(opt-in)/blueprints]
Changes:
- Switched to an internal event manager for easier management later on
- Switch to a ScriptInventory to trigger subtick events
Bugfixes:
- Prevent a VERY STRONG memory leak
- Fixed event.name being a string of the event name instead of the integer registration identifier
- Fixed on_pre_circuit_network_destroyed and on_pre_circuit_network_split not firing
Version: 1.0.1
Date: 2025-08-21
Changes:
- Added prefired variations of the circuit network events
Version: 1.0.0
Date: 2025-08-21
Features:
- Initial release