forked from cacklingfiend/lignumis
		
	Add compatibility for "Any planet start"
This commit is contained in:
		
							parent
							
								
									b23b363702
								
							
						
					
					
						commit
						9b95d0ab80
					
				
					 7 changed files with 10 additions and 9 deletions
				
			
		|  | @ -15,7 +15,9 @@ Lignumis = { | ||||||
|         "logistic-system", |         "logistic-system", | ||||||
|         "space-platform-thruster", |         "space-platform-thruster", | ||||||
|         "kovarex-enrichment-process", |         "kovarex-enrichment-process", | ||||||
|         "astroponics" |         "astroponics", | ||||||
|  |         "planet-discovery-nauvis", | ||||||
|  |         "planet-discovery-lignumis" | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     -- Add wood and steam science packs to all labs' inputs except these |     -- Add wood and steam science packs to all labs' inputs except these | ||||||
|  |  | ||||||
|  | @ -1,7 +1,6 @@ | ||||||
| local Technology = require("__cf-lib__/data/Technology") | local Technology = require("__cf-lib__/data/Technology") | ||||||
| local Recipe = require("__cf-lib__/data/Recipe") |  | ||||||
| 
 | 
 | ||||||
| if not mods["planet-picker"] then return end | if not mods["planet-picker"] and not mods["any-planet-start"] then return end | ||||||
| 
 | 
 | ||||||
| local technology = Technology:new("planet-discovery-lignumis") | local technology = Technology:new("planet-discovery-lignumis") | ||||||
| technology:setPrerequisites({ "space-platform-thruster" }) | technology:setPrerequisites({ "space-platform-thruster" }) | ||||||
|  |  | ||||||
|  | @ -83,7 +83,7 @@ data:extend({ | ||||||
|     } |     } | ||||||
| }) | }) | ||||||
| 
 | 
 | ||||||
| if not mods["planet-picker"] then | if not mods["planet-picker"] and not mods["any-planet-start"] then | ||||||
|     data:extend({ |     data:extend({ | ||||||
|         { |         { | ||||||
|             type = "technology", |             type = "technology", | ||||||
|  |  | ||||||
|  | @ -129,7 +129,7 @@ table.insert(data.raw["assembling-machine"]["assembling-machine-3"].crafting_cat | ||||||
| 
 | 
 | ||||||
| -- Disable vanilla early game recipes | -- Disable vanilla early game recipes | ||||||
| 
 | 
 | ||||||
| if not mods["planet-picker"] then | if not mods["planet-picker"] and not mods["any-planet-start"] then | ||||||
|     data.raw.recipe["iron-plate"].enabled = false |     data.raw.recipe["iron-plate"].enabled = false | ||||||
|     data.raw.recipe["iron-gear-wheel"].enabled = false |     data.raw.recipe["iron-gear-wheel"].enabled = false | ||||||
|     data.raw.recipe["iron-chest"].enabled = false |     data.raw.recipe["iron-chest"].enabled = false | ||||||
|  | @ -157,7 +157,7 @@ end | ||||||
| 
 | 
 | ||||||
| -- Adjust vanilla technologies | -- Adjust vanilla technologies | ||||||
| 
 | 
 | ||||||
| if not mods["planet-picker"] then | if not mods["planet-picker"] and not mods["any-planet-start"] then | ||||||
|     local automation_science_pack_technology = data.raw.technology["automation-science-pack"] |     local automation_science_pack_technology = data.raw.technology["automation-science-pack"] | ||||||
|     automation_science_pack_technology.enabled = false |     automation_science_pack_technology.enabled = false | ||||||
|     automation_science_pack_technology.visible_when_disabled = true |     automation_science_pack_technology.visible_when_disabled = true | ||||||
|  |  | ||||||
|  | @ -62,7 +62,7 @@ end | ||||||
| 
 | 
 | ||||||
| InitNew.on_init = function() | InitNew.on_init = function() | ||||||
|     if game.tick > 0 then return end |     if game.tick > 0 then return end | ||||||
|     if script.active_mods["planet-picker"] then return end |     if script.active_mods["planet-picker"] or script.active_mods["any-planet-start"] then return end | ||||||
| 
 | 
 | ||||||
|     init_intro() |     init_intro() | ||||||
|     init_space_locations() |     init_space_locations() | ||||||
|  |  | ||||||
|  | @ -37,7 +37,7 @@ end | ||||||
| 
 | 
 | ||||||
| -- Initialize the freeplay scenario | -- Initialize the freeplay scenario | ||||||
| local function init_freeplay(event) | local function init_freeplay(event) | ||||||
|     if script.active_mods["planet-picker"] then return end |     if script.active_mods["planet-picker"] or script.active_mods["any-planet-start"] then return end | ||||||
|     if storage.crashed_ship_lignumis then return end |     if storage.crashed_ship_lignumis then return end | ||||||
| 
 | 
 | ||||||
|     local player = game.get_player(event.player_index) |     local player = game.get_player(event.player_index) | ||||||
|  |  | ||||||
|  | @ -53,7 +53,7 @@ if mods["wood-military"] then | ||||||
|     data.raw["bool-setting"]["lignumis-ammo-progression"].hidden = true |     data.raw["bool-setting"]["lignumis-ammo-progression"].hidden = true | ||||||
| end | end | ||||||
| 
 | 
 | ||||||
| if mods["planet-picker"] then | if mods["planet-picker"] or mods["any-planet-start"] then | ||||||
|     data.raw["bool-setting"]["lignumis-belt-progression"].forced_value = false |     data.raw["bool-setting"]["lignumis-belt-progression"].forced_value = false | ||||||
|     data.raw["bool-setting"]["lignumis-belt-progression"].hidden = true |     data.raw["bool-setting"]["lignumis-belt-progression"].hidden = true | ||||||
|     data.raw["bool-setting"]["lignumis-inserter-progression"].forced_value = false |     data.raw["bool-setting"]["lignumis-inserter-progression"].forced_value = false | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Simon Brodtmann
						Simon Brodtmann