Expose gravity information at runtime

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
PFQNiet
Filter Inserter
Filter Inserter
Posts: 291
Joined: Sat Sep 05, 2020 7:48 pm
Contact:

Expose gravity information at runtime

Post by PFQNiet »

I'm trying to make a "flight time calculator" tool, and that is a function of:

- Thrust
- Platform weight
- Platform width
- Distance
- Gravity at origin and target

Thrust can be tricky since that's adjustable with throttling but I'll worry about that later. The big thing missing is the gravity values, as these are only defined on the prototype stage and not exposed on LuaSpaceLocationPrototype.

I would be very grateful to have this information, because when I hardcode it for testing purposes I get flawless results.
braxbro
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Sun Jan 01, 2023 2:54 am
Contact:

Re: Expose gravity information at runtime

Post by braxbro »

For now as a workaround you can rip those values in final-fixes and put it in a ModData object, but I do agree - no reason not to have that exposed as a prototype member in runtime.
User avatar
protocol_1903
Filter Inserter
Filter Inserter
Posts: 470
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: Expose gravity information at runtime

Post by protocol_1903 »

+1
Py and PyBlock developer, wielder of LUA in arbitrary ways. I make mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
Post Reply

Return to “Modding interface requests”