Jump to content

global function getText()


Skallagrim

Recommended Posts

Here and there I find the global function getText(), but I could not find it defind in the lua files. Is it a java function?

example:

farming_vegetableconf.props[getText("Farming_Carrots")].waterLvlMax = 65;

What does this function do?

Seems at first like a function that could, for example, depending on a choosen language return a text in a different language, is this right?

If yes, then there seem to be default strings for names of textures, too?

 

If this is true, is it possible to access/modify this list?

Link to comment
Share on other sites

Thanks very much, thats good to know.

I confused a .16 lua folder with a .17 lua folder and got totally supprised by the "getText()". I use a modified farming script based on .16 and could not remember to have ever encounterd this function.

In my confusion I miss read this code

IsoObject.new(plant.gridSquare, "tileThuztorFarming1_smashed", getText("Farming_Destroyed") .. " " .. plant.typeOfSeed);

and mixed up the name of the tile with the texture name of the tile, which made me even more confused.

But I think I have sorted it out now, thanks again.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...