A function that takes a terrain type ID and outputs all the speedboost info and hardness would be very useful.
Spring.GetGroundInfo(number x, number z) means the entire has to be searched, it's messy.
Spring.GetTerrainTypeData
Moderator: Moderators
Re: Spring.GetTerrainTypeData
You can read it from the map's file. You only need GetGroundInfo for realtime operations.
Re: Spring.GetTerrainTypeData
Yeah, I already told you that you just need to VFS.Include the same file the engine does (forgot which one but I assume it's something like MapOptions.lua) and you will get a full list.
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: Spring.GetTerrainTypeData
I remember SirMaverick looking at it and telling me that it wasn't possible. Anyway I will have a look later.jK wrote:Yeah, I already told you that you just need to VFS.Include the same file the engine does (forgot which one but I assume it's something like MapOptions.lua) and you will get a full list.
-
- Posts: 834
- Joined: 19 May 2009, 21:10
Re: Spring.GetTerrainTypeData
I only told you that there is no other Lua function than GetGroundInfo to read the typemap.Google_Frog wrote:I remember SirMaverick looking at it and telling me that it wasn't possible. Anyway I will have a look later.jK wrote:Yeah, I already told you that you just need to VFS.Include the same file the engine does (forgot which one but I assume it's something like MapOptions.lua) and you will get a full list.