forked from cacklingfiend/lignumis
		
	Add compatibility for "Any planet start" (Fulgora)
This commit is contained in:
		
							parent
							
								
									c5d94ec0b9
								
							
						
					
					
						commit
						8ca02c341c
					
				
					 1 changed files with 41 additions and 25 deletions
				
			
		|  | @ -2,32 +2,48 @@ local Technology = require("__cf-lib__/data/Technology") | ||||||
| 
 | 
 | ||||||
| if not mods["any-planet-start"] then return end | if not mods["any-planet-start"] then return end | ||||||
| 
 | 
 | ||||||
| if settings.startup["aps-planet"].value == "vulcanus" then | local target_planet = settings.startup["aps-planet"].value | ||||||
|     Technology:new("planet-discovery-vulcanus") | 
 | ||||||
|         :assign({ | if target_planet == "none" or target_planet == "nauvis" then return end | ||||||
|             enabled = true, | 
 | ||||||
|             hidden = false, | -- Switch planet discovery technology to the new planet | ||||||
|             unit = { | Technology:new("planet-discovery-" .. target_planet) | ||||||
|                 count = 100, |     :assign({ | ||||||
|                 ingredients = { |         enabled = true, | ||||||
|                     { "wood-science-pack",  1 }, |         hidden = false, | ||||||
|                     { "steam-science-pack", 1 } |         unit = { | ||||||
|                 }, |             count = 100, | ||||||
|                 time = 30 |             ingredients = { | ||||||
|             } |                 { "wood-science-pack",  1 }, | ||||||
|         }) |                 { "steam-science-pack", 1 } | ||||||
|         :addPrerequisite("provisional-rocketry") |             }, | ||||||
|     Technology:new("copper-processing"):replacePrerequisite("planet-discovery-nauvis", "planet-discovery-vulcanus") |             time = 30 | ||||||
|     Technology:new("iron-processing"):replacePrerequisite("planet-discovery-nauvis", "planet-discovery-vulcanus") |         } | ||||||
|  |     }) | ||||||
|  |     :addPrerequisite("provisional-rocketry") | ||||||
|  | Technology:new("iron-processing"):replacePrerequisite("planet-discovery-nauvis", "planet-discovery-" .. target_planet) | ||||||
|  | Technology:new("copper-processing"):replacePrerequisite("planet-discovery-nauvis", "planet-discovery-" .. target_planet) | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | -- Vulcanus | ||||||
|  | if target_planet == "vulcanus" then | ||||||
|     Technology:new("automation"):addPrerequisite("iron-processing") |     Technology:new("automation"):addPrerequisite("iron-processing") | ||||||
|     Technology:new("steel-processing"):addPrerequisite("iron-processing") |     Technology:new("steel-processing"):addPrerequisite("iron-processing") | ||||||
|     Technology:new("tungsten-carbide"):addPrerequisite("planet-discovery-vulcanus") |     Technology:new("tungsten-carbide"):addPrerequisite("planet-discovery-vulcanus") | ||||||
| 
 |     Technology:new("iron-processing").prototype.research_trigger.entity = "big-volcanic-rock" | ||||||
|     Technology:new("iron-processing") |     Technology:new("copper-processing").prototype.research_trigger.entity = "big-volcanic-rock" | ||||||
|         :addPrerequisite("planet-discovery-vulcanus") |  | ||||||
|         .prototype.research_trigger.entity = "big-volcanic-rock" |  | ||||||
| 
 |  | ||||||
|     Technology:new("copper-processing") |  | ||||||
|         :addPrerequisite("planet-discovery-vulcanus") |  | ||||||
|         .prototype.research_trigger.entity = "big-volcanic-rock" |  | ||||||
| end | end | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | -- Fulgora | ||||||
|  | if target_planet == "fulgora" then | ||||||
|  |     Technology:new("recycling"):addPrerequisite("planet-discovery-fulgora") | ||||||
|  |     Technology:new("iron-processing").prototype.research_trigger.entity = "scrap" | ||||||
|  |     Technology:new("copper-processing").prototype.research_trigger.entity = "scrap" | ||||||
|  | 
 | ||||||
|  |     if mods["fulgora-coralmium-agriculture"] then | ||||||
|  |         Technology:new("coralmium-recycling") | ||||||
|  |             :addPrerequisite("recycling") | ||||||
|  |             :removeRecipe("agricultural-tower") | ||||||
|  |     end | ||||||
|  | end | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Simon Brodtmann
						Simon Brodtmann