mirror of
https://github.com/Xevion/project-cybersyn.git
synced 2025-12-08 10:08:08 -06:00
1.2.8 (#28)
Version: 1.2.8
Date: 2022-1-5
Features:
- Improved placeholder cybernetic combinator art
- Added a wagon control setting to bar unfiltered slots in adjacent cargo wagons
- Added a setting and keybind for toggling on or off the central planner
Changes:
- Sped up the rate at which copy-paste by blueprint will be noticed
Bugfixes:
- Fixed a bug with combinators sometimes failing to connect with train stops
- Fixed wagon control combinators outputting wagon contents after inserters have already taken out items
- Fixed a rare crash on world migration
Scripting:
- Added missing return values to some interface functions
- Migrated to non-deprecated flib modules
This commit is contained in:
30
.vscode/flib/reverse-defines.lua
vendored
Normal file
30
.vscode/flib/reverse-defines.lua
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
--- Defines reverse lookup table.
|
||||
---
|
||||
--- NOTE: Type intellisense simply does not work for this module, and there is no easy way to fix
|
||||
--- it. Use of this module is discouraged.
|
||||
---
|
||||
--- # Example
|
||||
---
|
||||
--- ```lua
|
||||
--- event.on_built_entity(function(e)
|
||||
--- local player = game.get_player(e.player_index)
|
||||
--- local controller_name = reverse_defines.controllers[player.controller_type]
|
||||
--- end)
|
||||
--- ```
|
||||
local flib_reverse_defines = {}
|
||||
|
||||
local function build_reverse_defines(lookup_table, base_table)
|
||||
lookup_table = lookup_table or {}
|
||||
for k, v in pairs(base_table) do
|
||||
if type(v) == "table" then
|
||||
lookup_table[k] = {}
|
||||
build_reverse_defines(lookup_table[k], v)
|
||||
else
|
||||
lookup_table[v] = k
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
build_reverse_defines(flib_reverse_defines, defines)
|
||||
|
||||
return flib_reverse_defines
|
||||
Reference in New Issue
Block a user