Spring.GetTerrainTypeData

Spring.GetTerrainTypeData

Requests for features in the spring code.

Moderator: Moderators

Post Reply
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Spring.GetTerrainTypeData

Post by Google_Frog »

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.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Spring.GetTerrainTypeData

Post by Argh »

You can read it from the map's file. You only need GetGroundInfo for realtime operations.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Spring.GetTerrainTypeData

Post by jK »

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.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Spring.GetTerrainTypeData

Post by Google_Frog »

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.
I remember SirMaverick looking at it and telling me that it wasn't possible. Anyway I will have a look later.
SirMaverick
Posts: 834
Joined: 19 May 2009, 21:10

Re: Spring.GetTerrainTypeData

Post by SirMaverick »

Google_Frog wrote:
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.
I remember SirMaverick looking at it and telling me that it wasn't possible. Anyway I will have a look later.
I only told you that there is no other Lua function than GetGroundInfo to read the typemap.
Post Reply

Return to “Feature Requests”