forked from cacklingfiend/lignumis
		
	You can't leave Lignumis before researching Nauvis discovery
This commit is contained in:
		
							parent
							
								
									dca8ae4ec8
								
							
						
					
					
						commit
						675136ee06
					
				
					 2 changed files with 10 additions and 4 deletions
				
			
		|  | @ -185,5 +185,6 @@ quality-catalyst=Quality catalyst | ||||||
| [lignumis] | [lignumis] | ||||||
| start-new-game=Lignumis is meant to be played in a fresh game as it extends the early game before Nauvis. | start-new-game=Lignumis is meant to be played in a fresh game as it extends the early game before Nauvis. | ||||||
| provisional-rocket-silo-button=Escape to Nauvis | provisional-rocket-silo-button=Escape to Nauvis | ||||||
| provisional-rocket-silo-button-tooltip=Your personal inventory must be empty! | provisional-rocket-silo-button-tooltip-inventory=Your personal inventory must be empty! | ||||||
|  | provisional-rocket-silo-button-tooltip-nauvis=You don't know yet where to go! | ||||||
| provisional-rocket-silo-description=Fill the rocket inventory and launch the rocket to escape to Nauvis.\nBe sure to take material to jumpstart your iron, copper and wood production. | provisional-rocket-silo-description=Fill the rocket inventory and launch the rocket to escape to Nauvis.\nBe sure to take material to jumpstart your iron, copper and wood production. | ||||||
|  |  | ||||||
|  | @ -15,11 +15,16 @@ local function build_gui(player, rocket_silo) | ||||||
|     local launch_button = { type = "button", name = "provisional-rocket-silo-launch-button", caption = { "lignumis.provisional-rocket-silo-button" } } |     local launch_button = { type = "button", name = "provisional-rocket-silo-launch-button", caption = { "lignumis.provisional-rocket-silo-button" } } | ||||||
| 
 | 
 | ||||||
|     local inventory = player.get_main_inventory() |     local inventory = player.get_main_inventory() | ||||||
|     launch_button.enabled = inventory.is_empty() |     local is_inventory_empty = inventory.is_empty() | ||||||
|     if not launch_button.enabled then |     local is_nauvis_researched = player.force.technologies["planet-discovery-nauvis"].researched | ||||||
|         launch_button.tooltip = { "lignumis.provisional-rocket-silo-button-tooltip" } |     launch_button.enabled = is_inventory_empty and is_nauvis_researched | ||||||
|  |     if not is_inventory_empty then | ||||||
|  |         launch_button.tooltip = { "lignumis.provisional-rocket-silo-button-tooltip-inventory" } | ||||||
|  |     elseif not is_nauvis_researched then | ||||||
|  |         launch_button.tooltip = { "lignumis.provisional-rocket-silo-button-tooltip-nauvis" } | ||||||
|     end |     end | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|     storage.rocket_silo_guis = storage.rocket_silo_guis or {} |     storage.rocket_silo_guis = storage.rocket_silo_guis or {} | ||||||
|     storage.rocket_silo_guis[player.index] = { |     storage.rocket_silo_guis[player.index] = { | ||||||
|         fake_silo = rocket_silo, |         fake_silo = rocket_silo, | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Simon Brodtmann
						Simon Brodtmann