I need to get the technologies that the player has researched, the wiki sais that game.player.force.gettechnologies is a method, but I tested in the game, and it isnt inside the game.player.force table doesnt have any field called gettechnologies D:
Help?
game.player.force.gettechnologies??
Re: game.player.force.gettechnologies??
This is working:
Maybe that will help
Code: Select all
if game.player.force.technologies["iron-working"].researched then
game.player.print("researched")
else
game.player.print(" not researched")
end
Re: game.player.force.gettechnologies??
Oh, I need to update the wiki, sorry for that.
Edit: Updated (same with recipes)
Edit: Updated (same with recipes)
Re: game.player.force.gettechnologies??
Also, is there any way to "hide" technologies until something is made in the code? Not just the recipe, the tech.
Re: game.player.force.gettechnologies??
Do you want to hide it or just disable it?
First: I have no idea.
Second: You can disable the tech in the onInit-event:
And enable it later in the code like this:
First: I have no idea.
Second: You can disable the tech in the onInit-event:
Code: Select all
game.player.force.technologies["iron-working"].setenabled(false)
Code: Select all
game.player.force.technologies["iron-working"].setenabled(true)
Re: game.player.force.gettechnologies??
dissable it, but I also may want it to be hidden.
Re: game.player.force.gettechnologies??
Oh wait. It is hidden when you do it like I said
Re: game.player.force.gettechnologies??
It is not visible in the technology list, but it is not completely invisible.
It is still visible as continuation of technology when you look at details.
It is still visible as continuation of technology when you look at details.