RedMew
RedMew copied to clipboard
Factorio 2.0 update
Updated code to Factorio 2.0 API
Relevant changes
- [2.0] Updated
.luackeckr
with new classes, defines, and methods.game
may be a bit out-of-date due to the very long list of methods it still holds - [2.0] Type of LuaObjects is now "userdata" instead of "table". Removed __self from the LuaObjects. Intended way of checking if an object is a lua object is to check type is userdata.
- [2.0] Added new controller type (remote), which is to build space platforms, so it allows ghost building but not any physical manipulation. Added
LuaPlayer::physical_surface, physical_surface_index, physical_vehicle and physical_position
read. AccessingLuaPlayer::position
will return player's remote position, if available. Need to keep an eye on.position
checks. Suggest to useLuaPlayer::character::position
for future works to disambiguate any doubt about wanting to access player's "virtual" position or "physical" position. - [2.0] Changed logistic networks to use
LuaLogisticPoint
. Added utillogistic_point_util.lua
- [2.0] Changed
on_cutscene_waypoint_reached
event's parameter "waypoint_index" to not be zero indexed. Need to test the ported Cutscene module. - [2.0] Added LuaRenderObject. All LuaRendering methods for manipulating object selected by id were moved to LuaRenderObject.
- [2.0]
LuaBootstrap::raise_event()
's andLuaBootstrap::on_event()
's "event" now also accepts event names as string as alternative to their numerical IDs. - [2.0] Removed the "flying-text" entity type. Use
LuaPlayer::create_local_flying_text
orLuaRendering::draw_text
instead.utila.game.lua
has been updated to replace all instances of it. - [space-age] Removed satellite item & recipe.
- [space-age] Quality may break many inventory/item manipulations with additional param
.quality
added to old LuaItemStack. It's generally safe to use ItemStacks in vanilla, asquality = normal
will be set as default.