Way to get major and minor version in mod?

Place to get help with not working mods / modding interface.
Post Reply
Honktown
Smart Inserter
Smart Inserter
Posts: 1025
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Way to get major and minor version in mod?

Post by Honktown »

Basically I want to prepare for a new function being available, by saying if version <18.x use function A, version >18.x+.01 use function B. I could write an on_nth_tick check if the pcall returns an error or something, but that's a going to be more complicated than using the game version.
I have mods! I guess!
Link

Bilka
Factorio Staff
Factorio Staff
Posts: 3130
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Way to get major and minor version in mod?

Post by Bilka »

I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Honktown
Smart Inserter
Smart Inserter
Posts: 1025
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: Way to get major and minor version in mod?

Post by Honktown »

Awesome, thanks.
I have mods! I guess!
Link

Post Reply

Return to “Modding help”