New example on Mods page

User avatar
PennyJim
Fast Inserter
Fast Inserter
Posts: 172
Joined: Wed Jan 18, 2023 3:49 am
Contact:

New example on Mods page

Post by PennyJim »

I know LuaHelpers is one of those objects that you could easily miss it being available in data stage. The only link I'm aware of is on the index page, and, in my experience, you're usually skipping it entirely when you feel more comfortable with the api.

So I suggest we add a snippet to Mods to use compare_versions to showcase that it's an option.

I'm thinking something like this

Code: Select all

-- allows using features only available past a certain version
-- while still being compatible with older versions, useful for experimental releases
if helpers.compare_version(mods["base"], "2.0.56") >= 0 then
  use_new_features()
end
User avatar
MrSmoothieHuman
Fast Inserter
Fast Inserter
Posts: 179
Joined: Sat Aug 05, 2023 1:20 am
Contact:

Re: New example on Mods page

Post by MrSmoothieHuman »

+1, as someone who just missed its existence
coder? i hardly know her!
User avatar
protocol_1903
Filter Inserter
Filter Inserter
Posts: 510
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: New example on Mods page

Post by protocol_1903 »

+1
pY and pYblock developer, wielder of fluid networks and subtick events in arbitrary ways. I make mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903

Buy me a coffee
Bilka
Factorio Staff
Factorio Staff
Posts: 3773
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: New example on Mods page

Post by Bilka »

Thanks for the ready made example, added for 2.1.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Post Reply

Return to “Resolved Requests”