Search found 17 matches

by SunBlade
Fri Apr 11, 2025 5:49 am
Forum: Won't fix.
Topic: [2.0.44] sort_and_merge breaks ammo inventories
Replies: 3
Views: 426

Re: [2.0.44] sort_and_merge breaks ammo inventories

i did some testing. as boskid mentioned above, some entities already have sorting turned off. to be more specific: if a prototype.type can potentially have a main or trash inventory, only then is sorting allowed. that means: crafting machines, beacons, reactors and the sorts can not be sorted with ...
by SunBlade
Wed Apr 09, 2025 12:07 pm
Forum: Won't fix.
Topic: [2.0.44] sort_and_merge breaks ammo inventories
Replies: 3
Views: 426

Re: [2.0.44] sort_and_merge breaks ammo inventories

Due to all optimization that went into inventory sort, if it would be now required to query each item if it can go to every stack that would degrade into O(N^2) affecting character main inventory sorting just because ammo could have extra rules.
using merge sort or timsort your raw sorting ...
by SunBlade
Wed Apr 09, 2025 5:05 am
Forum: Won't fix.
Topic: [2.0.44] sort_and_merge breaks ammo inventories
Replies: 3
Views: 426

[2.0.44] sort_and_merge breaks ammo inventories

Issue
when using LuaInventory::sort_and_merge on an ammo inventory, ammunition gets possibly sorted away from their intended weapons. the gui does not allow that.
here an example with the player character and a tank.
this:
ammo_normal.png
becomes this:
ammo_broken.png



How to reproduce ...
by SunBlade
Sat Apr 05, 2025 9:25 am
Forum: Not a bug
Topic: [2.0.43] inconsistencies between LuaRecord <-> LuaItemStack
Replies: 4
Views: 411

Re: [2.0.43] inconsistencies between LuaRecord <-> LuaItemStack

... they’re different ...
yes, i assumed as much, putting two different lua wrapper over the same class would not make much sense. i also assume that internally LuaRecord and LuaItemStack have no subclasses. from my perspective LuaItemStack looks like a class only referencing other objects and ...
by SunBlade
Fri Apr 04, 2025 11:25 pm
Forum: Not a bug
Topic: [2.0.43] inconsistencies between LuaRecord <-> LuaItemStack
Replies: 4
Views: 411

Re: [2.0.43] inconsistencies between LuaRecord <-> LuaItemStack

... very different internally ...
So, if i understand this correctly you have two entirely separate systems, which do essentially the same? If your endpoints have at least some commonality between both systems, wouldn't it make more sense to spent a few more resources into merging both systems ...
by SunBlade
Fri Apr 04, 2025 7:19 pm
Forum: Not a bug
Topic: [2.0.43] inconsistencies between LuaRecord <-> LuaItemStack
Replies: 4
Views: 411

[2.0.43] inconsistencies between LuaRecord <-> LuaItemStack

Issues
while creating my mod i ran into some inconsistencies.
LuaRecord and LuaItemStack expose mostly the same modding interface, but there are some jarring differences.

LuaRecord

'name' field is missing. Should be prototype name.
'type' field gives prototype name. Should be prototype type ...
by SunBlade
Wed Mar 26, 2025 3:51 pm
Forum: Modding interface requests
Topic: player.opened and events.on_gui_opened do not work for planner
Replies: 2
Views: 396

Re: [2.0.42] player.opened and events.on_gui_opened do not work for planner

... currently does not support the blueprint library in any way.
ah, that explains why the event system also never produces a LuaRecord.

but why stays player.opened 'nil' even for LuaItemStack?
because it can be converted to a LuaRecord?

i hope you guys spread some more love to the planners ...
by SunBlade
Tue Mar 25, 2025 9:23 pm
Forum: Modding interface requests
Topic: player.opened and events.on_gui_opened do not work for planner
Replies: 2
Views: 396

player.opened and events.on_gui_opened do not work for planner

Issues

events.on_gui_opened and events.on_gui_closed do not supply the opened/closed planner record
player.opened is set to 'nil' if a planner item or planner record is opened.
player.opened can not be used to open planner records.


How to reproduce

put the supplied 'control.lua' and ...
by SunBlade
Tue Mar 25, 2025 3:24 pm
Forum: Resolved Problems and Bugs
Topic: [boskid][2.0.42] upgrade planner get_mapper() produces invalid output for set_mapper()
Replies: 4
Views: 1322

Re: [boskid][2.0.42] upgrade planner get_mapper() produces invalid output for set_mapper()

sry, i forgot to mention that there is an easy way to view all of the get_mapper() output.


to get a nicely formatted array of all the mappings into the log and console window, you can us this command:
/c local bp = game.player.get_main_inventory().find_item_stack{name="upgrade-planner"}
local arr ...
by SunBlade
Tue Mar 25, 2025 2:16 pm
Forum: Resolved Problems and Bugs
Topic: [boskid][2.0.42] upgrade planner get_mapper() produces invalid output for set_mapper()
Replies: 4
Views: 1322

Re: [boskid][2.0.42] upgrade planner get_mapper() produces invalid output for set_mapper()

Thanks for the fast work.
you may want to also test the upgrade planner in the characters inventory using this command:
/c local bp = game.player.get_main_inventory().find_item_stack{name="upgrade-planner"} for n = 1,bp.mapper_count do for _,t in pairs{"from","to"} do bp.set_mapper(n,t,table ...
by SunBlade
Tue Mar 25, 2025 12:35 am
Forum: Resolved Problems and Bugs
Topic: [boskid][2.0.42] upgrade planner get_mapper() produces invalid output for set_mapper()
Replies: 4
Views: 1322

[boskid][2.0.42] upgrade planner get_mapper() produces invalid output for set_mapper()

Issue

when iterating items of an upgrade planner get_mapper() produces output not acceptable by set_mapper() most of the time.
get_mapper() always returns a table, even if the entry is empty.
type is always set, even if the entry is empty.
module_limit is always set, even on unsupported ...
by SunBlade
Mon Mar 24, 2025 11:53 pm
Forum: Resolved Problems and Bugs
Topic: [boskid][2.0.42] mismatches when exporting->importing upgrade planner
Replies: 3
Views: 1350

[boskid][2.0.42] mismatches when exporting->importing upgrade planner

Issue

when importing an exported upgrade planner, the import is not an exact copy.
fuel entries are missing.
module slots checkmark is always unset, even if visually set.
module slots modules are displaced.


How to reproduce

load the supplied example save.
export any of the upgrade ...
by SunBlade
Mon Mar 24, 2025 1:56 am
Forum: Resolved Problems and Bugs
Topic: [boskid][2.0.42] deconstruction planners entity_filters does not clear excess when overwritten
Replies: 3
Views: 1297

[boskid][2.0.42] deconstruction planners entity_filters does not clear excess when overwritten

Issue

assigning a new table to the entity_filters property of a deconstruction planner does not replace ALL filter entries.
while a sparse table clears unassigned indices below its highest index, filter entries above its highest index will not be cleared.


How to reproduce

local bp ...
by SunBlade
Sun Mar 23, 2025 11:37 pm
Forum: Resolved Problems and Bugs
Topic: [boskid][2.0.42] crash when writing deconstruction filters via script
Replies: 1
Views: 1156

[boskid][2.0.42] crash when writing deconstruction filters via script

issue:
scripts writing deconstruction planner filter slots may crash the game.

required conditions:
assigning a new table to the entity_filters property of a deconstruction planner. both planner types (items in an inventory and records in a shelf) are affected.
the new table contains an entry ...
by SunBlade
Wed Nov 20, 2024 8:04 pm
Forum: Ideas and Suggestions
Topic: [modding] Blueprint stamp down event
Replies: 0
Views: 244

[modding] Blueprint stamp down event

TL;DR
Please add an event which gets fired when the Player stamps down a Blueprint.

What?
Most mods use very convoluted ways to give their modded entities special behaviours/configurations.
It would be nice to have a way to detect if the Player wants to change the behaviour/configuration of our ...
by SunBlade
Sat Oct 10, 2020 11:52 am
Forum: News
Topic: Friday Facts #361 - Train stop limit, Tips and tricks
Replies: 163
Views: 108122

Re: Friday Facts #361 - Train stop limit, Tips and tricks

things which i think are important for the Tips & Tricks:
Gameplay CCW Rotation (Shift+R) Ghost Placement (Shift+Click) Disable Personal Roboport How to customise the Quick Shortcuts List copy/paste entity config Circuit Network A Reminder that a Signal will never be 0 (Zero) (hopefully gets fixed ...

Go to advanced search