Change ItemPrototype.tier to be of type int

Post Reply
User avatar
Therenas
Factorio Staff
Factorio Staff
Posts: 232
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Change ItemPrototype.tier to be of type int

Post by Therenas »

This is probably a bit nitpicky, but I would feel better if the .tier attribute on ItemPrototypes was an interger and not a float. It seems like that would make more sense and reduce the surface for error, especially across mods. Unless there is a reason for it to be a float that I'm not aware of.

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

Re: Change ItemPrototype.tier to be of type int

Post by Bilka »

What is the use case of this change?
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
Therenas
Factorio Staff
Factorio Staff
Posts: 232
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Re: Change ItemPrototype.tier to be of type int

Post by Therenas »

Makes me not have to worry about some mod setting a tier of 0.001256 and having to have code to deal with it. Makes it simpler if I can assume that that number will always be an int. Just a small quality of life improvement, and it makes the modding interface cleaner I guess.

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

Re: Change ItemPrototype.tier to be of type int

Post by Bilka »

Okay, changed for the next version.
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 “Implemented mod requests”