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,8 +2,12 @@ local Technology = require("__cf-lib__/data/Technology") | |||
| 
 | ||||
| if not mods["any-planet-start"] then return end | ||||
| 
 | ||||
| if settings.startup["aps-planet"].value == "vulcanus" then | ||||
|     Technology:new("planet-discovery-vulcanus") | ||||
| local target_planet = settings.startup["aps-planet"].value | ||||
| 
 | ||||
| if target_planet == "none" or target_planet == "nauvis" then return end | ||||
| 
 | ||||
| -- Switch planet discovery technology to the new planet | ||||
| Technology:new("planet-discovery-" .. target_planet) | ||||
|     :assign({ | ||||
|         enabled = true, | ||||
|         hidden = false, | ||||
|  | @ -17,17 +21,29 @@ if settings.startup["aps-planet"].value == "vulcanus" then | |||
|         } | ||||
|     }) | ||||
|     :addPrerequisite("provisional-rocketry") | ||||
|     Technology:new("copper-processing"):replacePrerequisite("planet-discovery-nauvis", "planet-discovery-vulcanus") | ||||
|     Technology:new("iron-processing"):replacePrerequisite("planet-discovery-nauvis", "planet-discovery-vulcanus") | ||||
| 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("steel-processing"):addPrerequisite("iron-processing") | ||||
|     Technology:new("tungsten-carbide"):addPrerequisite("planet-discovery-vulcanus") | ||||
| 
 | ||||
|     Technology:new("iron-processing") | ||||
|         :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" | ||||
|     Technology:new("iron-processing").prototype.research_trigger.entity = "big-volcanic-rock" | ||||
|     Technology:new("copper-processing").prototype.research_trigger.entity = "big-volcanic-rock" | ||||
| 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