forked from cacklingfiend/lignumis
		
	Add compatibility with Planet Picker
This commit is contained in:
		
							parent
							
								
									59fda1cb7c
								
							
						
					
					
						commit
						dca8ae4ec8
					
				
					 9 changed files with 251 additions and 220 deletions
				
			
		|  | @ -84,7 +84,6 @@ If your modded lab is special and it should not support these science packs, use | ||||||
| - Add late-game recipe for oil from wood pulp | - Add late-game recipe for oil from wood pulp | ||||||
| - Replace usage of gold cable with basic circuits made of wood and gold cable, add option for progressive circuit recipes and add recipe prod research | - Replace usage of gold cable with basic circuits made of wood and gold cable, add option for progressive circuit recipes and add recipe prod research | ||||||
| - Compatibility with [On Wayward Seas](https://mods.factorio.com/mod/wayward-seas) | - Compatibility with [On Wayward Seas](https://mods.factorio.com/mod/wayward-seas) | ||||||
| - Compatibility with [Planet Picker](https://mods.factorio.com/mod/planet-picker) |  | ||||||
| - Compatibility with [Noble Metals](https://mods.factorio.com/mod/bzgold) once it's updated | - Compatibility with [Noble Metals](https://mods.factorio.com/mod/bzgold) once it's updated | ||||||
| 
 | 
 | ||||||
| ## Credits | ## Credits | ||||||
|  |  | ||||||
|  | @ -22,6 +22,7 @@ | ||||||
|         "?wood-military >= 2.3.3", |         "?wood-military >= 2.3.3", | ||||||
|         "?metal-and-stars", |         "?metal-and-stars", | ||||||
|         "?aai-industry", |         "?aai-industry", | ||||||
|  |         "?planet-picker", | ||||||
|         "!apm_power_ldinc", |         "!apm_power_ldinc", | ||||||
|         "!wood-logistics", |         "!wood-logistics", | ||||||
|         "!early-agriculture", |         "!early-agriculture", | ||||||
|  |  | ||||||
|  | @ -1,4 +1,5 @@ | ||||||
| require("hot-metals") | require("hot-metals") | ||||||
| require("wood-military") | require("wood-military") | ||||||
| require("metal-and-stars") | require("metal-and-stars") | ||||||
| require("alien-biomes") | require("alien-biomes") | ||||||
|  | require("planet-picker") | ||||||
							
								
								
									
										8
									
								
								lignumis/prototypes/compatibility/planet-picker.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								lignumis/prototypes/compatibility/planet-picker.lua
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,8 @@ | ||||||
|  | local Technology = require("__cf-lib__/data/Technology") | ||||||
|  | local Recipe = require("__cf-lib__/data/Recipe") | ||||||
|  | 
 | ||||||
|  | if not mods["planet-picker"] then return end | ||||||
|  | 
 | ||||||
|  | local technology = Technology:new("planet-discovery-lignumis") | ||||||
|  | technology:setPrerequisites({ "space-platform-thruster" }) | ||||||
|  | technology:addIngredients({ "logistic-science-pack", "chemical-science-pack", "space-science-pack" }) | ||||||
|  | @ -20,90 +20,6 @@ data:extend({ | ||||||
|             time = 10 |             time = 10 | ||||||
|         } |         } | ||||||
|     }, |     }, | ||||||
|     { |  | ||||||
|         type = "technology", |  | ||||||
|         name = "planet-discovery-nauvis", |  | ||||||
|         icons = util.technology_icon_constant_planet("__lignumis__/graphics/technology/nauvis.png"), |  | ||||||
|         icon_size = 256, |  | ||||||
|         essential = true, |  | ||||||
|         effects = { |  | ||||||
|             { |  | ||||||
|                 type = "unlock-space-location", |  | ||||||
|                 space_location = "nauvis", |  | ||||||
|                 use_icon_overlay_constant = true |  | ||||||
|             }, |  | ||||||
|             { |  | ||||||
|                 type = "unlock-space-platforms", |  | ||||||
|                 modifier = true, |  | ||||||
|                 hidden = true |  | ||||||
|             } |  | ||||||
|         }, |  | ||||||
|         prerequisites = { "provisional-rocketry" }, |  | ||||||
|         unit = { |  | ||||||
|             count = 100, |  | ||||||
|             ingredients = { |  | ||||||
|                 { "wood-science-pack",  1 }, |  | ||||||
|                 { "steam-science-pack", 1 } |  | ||||||
|             }, |  | ||||||
|             time = 30 |  | ||||||
|         } |  | ||||||
|     }, |  | ||||||
|     { |  | ||||||
|         type = "technology", |  | ||||||
|         name = "iron-processing", |  | ||||||
|         icon = "__base__/graphics/icons/iron-plate.png", |  | ||||||
|         icon_size = 64, |  | ||||||
|         essential = true, |  | ||||||
|         effects = { |  | ||||||
|             { |  | ||||||
|                 type = "unlock-recipe", |  | ||||||
|                 recipe = "iron-plate" |  | ||||||
|             }, |  | ||||||
|             { |  | ||||||
|                 type = "unlock-recipe", |  | ||||||
|                 recipe = "iron-chest" |  | ||||||
|             }, |  | ||||||
|             { |  | ||||||
|                 type = "unlock-recipe", |  | ||||||
|                 recipe = "iron-gear-wheel" |  | ||||||
|             } |  | ||||||
|         }, |  | ||||||
|         prerequisites = { "planet-discovery-nauvis" }, |  | ||||||
|         unit = { |  | ||||||
|             count = 50, |  | ||||||
|             ingredients = { |  | ||||||
|                 { "wood-science-pack",  1 }, |  | ||||||
|                 { "steam-science-pack", 1 } |  | ||||||
|             }, |  | ||||||
|             time = 15 |  | ||||||
|         } |  | ||||||
|     }, |  | ||||||
|     { |  | ||||||
|         type = "technology", |  | ||||||
|         name = "copper-processing", |  | ||||||
|         icon = "__base__/graphics/icons/copper-plate.png", |  | ||||||
|         icon_size = 64, |  | ||||||
|         essential = true, |  | ||||||
|         effects = { |  | ||||||
|             { |  | ||||||
|                 type = "unlock-recipe", |  | ||||||
|                 recipe = "copper-plate" |  | ||||||
|             }, |  | ||||||
|             { |  | ||||||
|                 type = "unlock-recipe", |  | ||||||
|                 recipe = "copper-cable" |  | ||||||
|             } |  | ||||||
|         }, |  | ||||||
|         prerequisites = { "planet-discovery-nauvis" }, |  | ||||||
|         unit = { |  | ||||||
|             count = 50, |  | ||||||
|             ingredients = { |  | ||||||
|                 { "wood-science-pack",  1 }, |  | ||||||
|                 { "steam-science-pack", 1 } |  | ||||||
|             }, |  | ||||||
|             time = 15 |  | ||||||
|         } |  | ||||||
|     }, |  | ||||||
|     { |     { | ||||||
|         type = "technology", |         type = "technology", | ||||||
|         name = "gold-fluid-handling", |         name = "gold-fluid-handling", | ||||||
|  | @ -166,3 +82,92 @@ data:extend({ | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| }) | }) | ||||||
|  | 
 | ||||||
|  | if not mods["planet-picker"] then | ||||||
|  |     data:extend({ | ||||||
|  |         { | ||||||
|  |             type = "technology", | ||||||
|  |             name = "planet-discovery-nauvis", | ||||||
|  |             icons = util.technology_icon_constant_planet("__lignumis__/graphics/technology/nauvis.png"), | ||||||
|  |             icon_size = 256, | ||||||
|  |             essential = true, | ||||||
|  |             effects = { | ||||||
|  |                 { | ||||||
|  |                     type = "unlock-space-location", | ||||||
|  |                     space_location = "nauvis", | ||||||
|  |                     use_icon_overlay_constant = true | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     type = "unlock-space-platforms", | ||||||
|  |                     modifier = true, | ||||||
|  |                     hidden = true | ||||||
|  |                 } | ||||||
|  |             }, | ||||||
|  |             prerequisites = { "provisional-rocketry" }, | ||||||
|  |             unit = { | ||||||
|  |                 count = 100, | ||||||
|  |                 ingredients = { | ||||||
|  |                     { "wood-science-pack",  1 }, | ||||||
|  |                     { "steam-science-pack", 1 } | ||||||
|  |                 }, | ||||||
|  |                 time = 30 | ||||||
|  |             } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |             type = "technology", | ||||||
|  |             name = "iron-processing", | ||||||
|  |             icon = "__base__/graphics/icons/iron-plate.png", | ||||||
|  |             icon_size = 64, | ||||||
|  |             essential = true, | ||||||
|  |             effects = { | ||||||
|  |                 { | ||||||
|  |                     type = "unlock-recipe", | ||||||
|  |                     recipe = "iron-plate" | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     type = "unlock-recipe", | ||||||
|  |                     recipe = "iron-chest" | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     type = "unlock-recipe", | ||||||
|  |                     recipe = "iron-gear-wheel" | ||||||
|  |                 } | ||||||
|  |             }, | ||||||
|  |             prerequisites = { "planet-discovery-nauvis" }, | ||||||
|  |             unit = { | ||||||
|  |                 count = 50, | ||||||
|  |                 ingredients = { | ||||||
|  |                     { "wood-science-pack",  1 }, | ||||||
|  |                     { "steam-science-pack", 1 } | ||||||
|  |                 }, | ||||||
|  |                 time = 15 | ||||||
|  |             } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |             type = "technology", | ||||||
|  |             name = "copper-processing", | ||||||
|  |             icon = "__base__/graphics/icons/copper-plate.png", | ||||||
|  |             icon_size = 64, | ||||||
|  |             essential = true, | ||||||
|  |             effects = { | ||||||
|  |                 { | ||||||
|  |                     type = "unlock-recipe", | ||||||
|  |                     recipe = "copper-plate" | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     type = "unlock-recipe", | ||||||
|  |                     recipe = "copper-cable" | ||||||
|  |                 } | ||||||
|  |             }, | ||||||
|  |             prerequisites = { "planet-discovery-nauvis" }, | ||||||
|  |             unit = { | ||||||
|  |                 count = 50, | ||||||
|  |                 ingredients = { | ||||||
|  |                     { "wood-science-pack",  1 }, | ||||||
|  |                     { "steam-science-pack", 1 } | ||||||
|  |                 }, | ||||||
|  |                 time = 15 | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |     }) | ||||||
|  | end | ||||||
|  |  | ||||||
|  | @ -115,12 +115,14 @@ table.insert(data.raw["assembling-machine"]["assembling-machine-3"].crafting_cat | ||||||
| 
 | 
 | ||||||
| -- Disable vanilla early game recipes | -- Disable vanilla early game recipes | ||||||
| 
 | 
 | ||||||
| data.raw.recipe["iron-plate"].enabled = false | if not mods["planet-picker"] then | ||||||
| data.raw.recipe["iron-gear-wheel"].enabled = false |     data.raw.recipe["iron-plate"].enabled = false | ||||||
| data.raw.recipe["iron-chest"].enabled = false |     data.raw.recipe["iron-gear-wheel"].enabled = false | ||||||
| data.raw.recipe["copper-plate"].enabled = false |     data.raw.recipe["iron-chest"].enabled = false | ||||||
| data.raw.recipe["copper-cable"].enabled = false |     data.raw.recipe["copper-plate"].enabled = false | ||||||
| data.raw.recipe["transport-belt"].enabled = false |     data.raw.recipe["copper-cable"].enabled = false | ||||||
|  |     data.raw.recipe["transport-belt"].enabled = false | ||||||
|  | end | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| -- Progressive recipes | -- Progressive recipes | ||||||
|  | @ -141,152 +143,154 @@ end | ||||||
| 
 | 
 | ||||||
| -- Adjust vanilla technologies | -- Adjust vanilla technologies | ||||||
| 
 | 
 | ||||||
| local automation_science_pack_technology = data.raw.technology["automation-science-pack"] | if not mods["planet-picker"] then | ||||||
| automation_science_pack_technology.prerequisites = { "planet-discovery-nauvis" } |     local automation_science_pack_technology = data.raw.technology["automation-science-pack"] | ||||||
| automation_science_pack_technology.research_trigger = nil |     automation_science_pack_technology.prerequisites = { "planet-discovery-nauvis" } | ||||||
| automation_science_pack_technology.unit = { |     automation_science_pack_technology.research_trigger = nil | ||||||
|     count = 100, |     automation_science_pack_technology.unit = { | ||||||
|     ingredients = { |         count = 100, | ||||||
|         { "wood-science-pack",  1 }, |         ingredients = { | ||||||
|         { "steam-science-pack", 1 } |             { "wood-science-pack",  1 }, | ||||||
|     }, |             { "steam-science-pack", 1 } | ||||||
|     time = 30 |         }, | ||||||
| } |         time = 30 | ||||||
|  |     } | ||||||
| 
 | 
 | ||||||
| local electronics_technology = data.raw.technology["electronics"] |     local electronics_technology = data.raw.technology["electronics"] | ||||||
| electronics_technology.prerequisites = { "copper-processing" } |     electronics_technology.prerequisites = { "copper-processing" } | ||||||
| electronics_technology.research_trigger = nil |     electronics_technology.research_trigger = nil | ||||||
| electronics_technology.unit = { |     electronics_technology.unit = { | ||||||
|     count = 50, |         count = 50, | ||||||
|     ingredients = { |         ingredients = { | ||||||
|         { "wood-science-pack",  1 }, |             { "wood-science-pack",  1 }, | ||||||
|         { "steam-science-pack", 1 } |             { "steam-science-pack", 1 } | ||||||
|     }, |         }, | ||||||
|     time = 15 |         time = 15 | ||||||
| } |     } | ||||||
| 
 | 
 | ||||||
| local steam_power_technology = data.raw.technology["steam-power"] |     local steam_power_technology = data.raw.technology["steam-power"] | ||||||
| steam_power_technology.prerequisites = { "iron-processing" } |     steam_power_technology.prerequisites = { "iron-processing" } | ||||||
| steam_power_technology.research_trigger = nil |     steam_power_technology.research_trigger = nil | ||||||
| steam_power_technology.unit = { |     steam_power_technology.unit = { | ||||||
|     count = 50, |         count = 50, | ||||||
|     ingredients = { |         ingredients = { | ||||||
|         { "wood-science-pack",  1 }, |             { "wood-science-pack",  1 }, | ||||||
|         { "steam-science-pack", 1 } |             { "steam-science-pack", 1 } | ||||||
|     }, |         }, | ||||||
|     time = 15 |         time = 15 | ||||||
| } |     } | ||||||
| 
 | 
 | ||||||
| local automation_technology = data.raw.technology["automation"] |     local automation_technology = data.raw.technology["automation"] | ||||||
| automation_technology.ignore_tech_cost_multiplier = false |     automation_technology.ignore_tech_cost_multiplier = false | ||||||
| 
 | 
 | ||||||
| local logistics_technology = data.raw.technology["logistics"] |     local logistics_technology = data.raw.technology["logistics"] | ||||||
| table.insert(logistics_technology.effects, { |     table.insert(logistics_technology.effects, { | ||||||
|     type = "unlock-recipe", |         type = "unlock-recipe", | ||||||
|     recipe = "transport-belt" |         recipe = "transport-belt" | ||||||
| }) |     }) | ||||||
| 
 | 
 | ||||||
| local landfill_technology = data.raw.technology["landfill"] |     local landfill_technology = data.raw.technology["landfill"] | ||||||
| landfill_technology.prerequisites = { "burner-automation" } |     landfill_technology.prerequisites = { "burner-automation" } | ||||||
| landfill_technology.unit = { |     landfill_technology.unit = { | ||||||
|     count = 50, |         count = 50, | ||||||
|     ingredients = { { "wood-science-pack", 1 } }, |         ingredients = { { "wood-science-pack", 1 } }, | ||||||
|     time = 15 |         time = 15 | ||||||
| } |     } | ||||||
| 
 | 
 | ||||||
| local robots_speed_technology_1 = data.raw.technology["worker-robots-speed-1"] |     local robots_speed_technology_1 = data.raw.technology["worker-robots-speed-1"] | ||||||
| robots_speed_technology_1.prerequisites = { "provisional-rocketry", "basic-construction-robotics-gold" } |     robots_speed_technology_1.prerequisites = { "provisional-rocketry", "basic-construction-robotics-gold" } | ||||||
| robots_speed_technology_1.unit = { |     robots_speed_technology_1.unit = { | ||||||
|     count = 100, |         count = 100, | ||||||
|     ingredients = { { "wood-science-pack", 1 }, { "steam-science-pack", 1 } }, |         ingredients = { { "wood-science-pack", 1 }, { "steam-science-pack", 1 } }, | ||||||
|     time = 15 |         time = 15 | ||||||
| } |     } | ||||||
| 
 | 
 | ||||||
| local robots_speed_technology_2 = data.raw.technology["worker-robots-speed-2"] |     local robots_speed_technology_2 = data.raw.technology["worker-robots-speed-2"] | ||||||
| robots_speed_technology_2.prerequisites = { |     robots_speed_technology_2.prerequisites = { | ||||||
|     "worker-robots-speed-1", |         "worker-robots-speed-1", | ||||||
|     "logistic-science-pack" |         "logistic-science-pack" | ||||||
| } |     } | ||||||
| robots_speed_technology_2.unit = { |     robots_speed_technology_2.unit = { | ||||||
|     count = 100, |         count = 100, | ||||||
|     ingredients = { { "automation-science-pack", 1 }, { "logistic-science-pack", 1 } }, |         ingredients = { { "automation-science-pack", 1 }, { "logistic-science-pack", 1 } }, | ||||||
|     time = 30 |         time = 30 | ||||||
| } |     } | ||||||
| 
 | 
 | ||||||
| local robots_speed_technology_3 = data.raw.technology["worker-robots-speed-3"] |     local robots_speed_technology_3 = data.raw.technology["worker-robots-speed-3"] | ||||||
| robots_speed_technology_3.prerequisites = { "worker-robots-speed-2", "chemical-science-pack" } |     robots_speed_technology_3.prerequisites = { "worker-robots-speed-2", "chemical-science-pack" } | ||||||
| robots_speed_technology_3.unit = { |     robots_speed_technology_3.unit = { | ||||||
|     count = 150, |         count = 150, | ||||||
|     ingredients = { { "automation-science-pack", 1 }, { "logistic-science-pack", 1 }, { "chemical-science-pack", 1 } }, |         ingredients = { { "automation-science-pack", 1 }, { "logistic-science-pack", 1 }, { "chemical-science-pack", 1 } }, | ||||||
|     time = 30 |         time = 30 | ||||||
| } |     } | ||||||
| 
 | 
 | ||||||
| local robots_speed_technology_4 = data.raw.technology["worker-robots-speed-4"] |     local robots_speed_technology_4 = data.raw.technology["worker-robots-speed-4"] | ||||||
| robots_speed_technology_4.prerequisites = { "worker-robots-speed-3", "utility-science-pack" } |     robots_speed_technology_4.prerequisites = { "worker-robots-speed-3", "utility-science-pack" } | ||||||
| robots_speed_technology_4.unit.ingredients = { |     robots_speed_technology_4.unit.ingredients = { | ||||||
|     { "automation-science-pack", 1 }, |         { "automation-science-pack", 1 }, | ||||||
|     { "logistic-science-pack",   1 }, |         { "logistic-science-pack",   1 }, | ||||||
|     { "chemical-science-pack",   1 }, |         { "chemical-science-pack",   1 }, | ||||||
|     { "utility-science-pack",    1 } |         { "utility-science-pack",    1 } | ||||||
| } |     } | ||||||
| 
 | 
 | ||||||
| local physical_damage_technology_1 = data.raw.technology["physical-projectile-damage-1"] |     local physical_damage_technology_1 = data.raw.technology["physical-projectile-damage-1"] | ||||||
| physical_damage_technology_1.prerequisites = { "basic-gun-turret" } |     physical_damage_technology_1.prerequisites = { "basic-gun-turret" } | ||||||
| physical_damage_technology_1.unit.ingredients = { { "wood-science-pack", 1 } } |     physical_damage_technology_1.unit.ingredients = { { "wood-science-pack", 1 } } | ||||||
| table.insert(physical_damage_technology_1.effects, { |     table.insert(physical_damage_technology_1.effects, { | ||||||
|     type = "turret-attack", |         type = "turret-attack", | ||||||
|     turret_id = "basic-gun-turret", |         turret_id = "basic-gun-turret", | ||||||
|     modifier = 0.2 |         modifier = 0.2 | ||||||
| }) |     }) | ||||||
| 
 | 
 | ||||||
| local weapon_speed_technology_1 = data.raw.technology["weapon-shooting-speed-1"] |     local weapon_speed_technology_1 = data.raw.technology["weapon-shooting-speed-1"] | ||||||
| weapon_speed_technology_1.prerequisites = table.deepcopy(physical_damage_technology_1.prerequisites) |     weapon_speed_technology_1.prerequisites = table.deepcopy(physical_damage_technology_1.prerequisites) | ||||||
| weapon_speed_technology_1.unit.ingredients = table.deepcopy(physical_damage_technology_1.unit.ingredients) |     weapon_speed_technology_1.unit.ingredients = table.deepcopy(physical_damage_technology_1.unit.ingredients) | ||||||
| 
 | 
 | ||||||
| local physical_damage_technology_2 = data.raw.technology["physical-projectile-damage-2"] |     local physical_damage_technology_2 = data.raw.technology["physical-projectile-damage-2"] | ||||||
| physical_damage_technology_2.prerequisites = { "physical-projectile-damage-1", "steam-science-pack" } |     physical_damage_technology_2.prerequisites = { "physical-projectile-damage-1", "steam-science-pack" } | ||||||
| physical_damage_technology_2.unit.ingredients = { { "wood-science-pack", 1 }, { "steam-science-pack", 1 } } |     physical_damage_technology_2.unit.ingredients = { { "wood-science-pack", 1 }, { "steam-science-pack", 1 } } | ||||||
| table.insert(physical_damage_technology_2.effects, { |     table.insert(physical_damage_technology_2.effects, { | ||||||
|     type = "turret-attack", |         type = "turret-attack", | ||||||
|     turret_id = "basic-gun-turret", |         turret_id = "basic-gun-turret", | ||||||
|     modifier = 0.2 |         modifier = 0.2 | ||||||
| }) |     }) | ||||||
| 
 | 
 | ||||||
| local weapon_speed_technology_2 = data.raw.technology["weapon-shooting-speed-2"] |     local weapon_speed_technology_2 = data.raw.technology["weapon-shooting-speed-2"] | ||||||
| weapon_speed_technology_2.prerequisites = { "weapon-shooting-speed-1", "steam-science-pack" } |     weapon_speed_technology_2.prerequisites = { "weapon-shooting-speed-1", "steam-science-pack" } | ||||||
| weapon_speed_technology_2.unit.ingredients = table.deepcopy(physical_damage_technology_2.unit.ingredients) |     weapon_speed_technology_2.unit.ingredients = table.deepcopy(physical_damage_technology_2.unit.ingredients) | ||||||
| 
 | 
 | ||||||
| local physical_damage_technology_3 = data.raw.technology["physical-projectile-damage-3"] |     local physical_damage_technology_3 = data.raw.technology["physical-projectile-damage-3"] | ||||||
| physical_damage_technology_3.prerequisites = { "physical-projectile-damage-2", "logistic-science-pack" } |     physical_damage_technology_3.prerequisites = { "physical-projectile-damage-2", "logistic-science-pack" } | ||||||
| physical_damage_technology_3.unit.ingredients = { { "automation-science-pack", 1 }, { "logistic-science-pack", 1 } } |     physical_damage_technology_3.unit.ingredients = { { "automation-science-pack", 1 }, { "logistic-science-pack", 1 } } | ||||||
| table.insert(physical_damage_technology_3.effects, { |     table.insert(physical_damage_technology_3.effects, { | ||||||
|     type = "turret-attack", |         type = "turret-attack", | ||||||
|     turret_id = "basic-gun-turret", |         turret_id = "basic-gun-turret", | ||||||
|     modifier = 0.3 |         modifier = 0.3 | ||||||
| }) |     }) | ||||||
| 
 | 
 | ||||||
| local weapon_speed_technology_3 = data.raw.technology["weapon-shooting-speed-3"] |     local weapon_speed_technology_3 = data.raw.technology["weapon-shooting-speed-3"] | ||||||
| weapon_speed_technology_3.prerequisites = { "weapon-shooting-speed-2", "logistic-science-pack" } |     weapon_speed_technology_3.prerequisites = { "weapon-shooting-speed-2", "logistic-science-pack" } | ||||||
| weapon_speed_technology_3.unit.ingredients = table.deepcopy(physical_damage_technology_3.unit.ingredients) |     weapon_speed_technology_3.unit.ingredients = table.deepcopy(physical_damage_technology_3.unit.ingredients) | ||||||
| 
 | 
 | ||||||
| local physical_damage_technology_4 = data.raw.technology["physical-projectile-damage-4"] |     local physical_damage_technology_4 = data.raw.technology["physical-projectile-damage-4"] | ||||||
| physical_damage_technology_4.prerequisites = { "physical-projectile-damage-3", "military-science-pack" } |     physical_damage_technology_4.prerequisites = { "physical-projectile-damage-3", "military-science-pack" } | ||||||
| table.insert(physical_damage_technology_4.effects, { |     table.insert(physical_damage_technology_4.effects, { | ||||||
|     type = "turret-attack", |         type = "turret-attack", | ||||||
|     turret_id = "basic-gun-turret", |         turret_id = "basic-gun-turret", | ||||||
|     modifier = 0.3 |         modifier = 0.3 | ||||||
| }) |     }) | ||||||
| 
 | 
 | ||||||
| local weapon_speed_technology_4 = data.raw.technology["weapon-shooting-speed-4"] |     local weapon_speed_technology_4 = data.raw.technology["weapon-shooting-speed-4"] | ||||||
| weapon_speed_technology_4.prerequisites = { "weapon-shooting-speed-3", "military-science-pack" } |     weapon_speed_technology_4.prerequisites = { "weapon-shooting-speed-3", "military-science-pack" } | ||||||
| 
 | 
 | ||||||
| local production_science_pack_technology = Technology:new("production-science-pack") |     local production_science_pack_technology = Technology:new("production-science-pack") | ||||||
| production_science_pack_technology:replacePrerequisite("advanced-material-processing-2", "space-platform-thruster") |     production_science_pack_technology:replacePrerequisite("advanced-material-processing-2", "space-platform-thruster") | ||||||
| production_science_pack_technology:addIngredients({ "wood-science-pack", "steam-science-pack", "space-science-pack" }) |     production_science_pack_technology:addIngredients({ "wood-science-pack", "steam-science-pack", "space-science-pack" }) | ||||||
| 
 | 
 | ||||||
| local utility_science_pack_technology = Technology:new("utility-science-pack") |     local utility_science_pack_technology = Technology:new("utility-science-pack") | ||||||
| utility_science_pack_technology:setPrerequisites({ "space-platform-thruster" }) |     utility_science_pack_technology:setPrerequisites({ "space-platform-thruster" }) | ||||||
| utility_science_pack_technology:addIngredients({ "wood-science-pack", "steam-science-pack", "space-science-pack" }) |     utility_science_pack_technology:addIngredients({ "wood-science-pack", "steam-science-pack", "space-science-pack" }) | ||||||
|  | end | ||||||
| 
 | 
 | ||||||
| if not mods["planet-muluna"] then -- Muluna does the same | if not mods["planet-muluna"] then -- Muluna does the same | ||||||
|     Technology:new("logistic-robotics"):addRecipe("requester-chest") |     Technology:new("logistic-robotics"):addRecipe("requester-chest") | ||||||
|  |  | ||||||
|  | @ -62,6 +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 | ||||||
| 
 | 
 | ||||||
|     init_intro() |     init_intro() | ||||||
|     init_space_locations() |     init_space_locations() | ||||||
|  |  | ||||||
|  | @ -37,6 +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 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) | ||||||
|  | @ -63,7 +64,9 @@ local function init_freeplay(event) | ||||||
|         table.deepcopy(storage.crashed_ship_parts)) |         table.deepcopy(storage.crashed_ship_parts)) | ||||||
|     util.remove_safe(player, storage.crashed_ship_items) |     util.remove_safe(player, storage.crashed_ship_items) | ||||||
|     util.remove_safe(player, storage.crashed_debris_items) |     util.remove_safe(player, storage.crashed_debris_items) | ||||||
|     player.character.get_main_inventory().sort_and_merge() |     if player.character then | ||||||
|  |         player.character.get_main_inventory().sort_and_merge() | ||||||
|  |     end | ||||||
| 
 | 
 | ||||||
|     storage.crash_site_cutscene_active = true |     storage.crash_site_cutscene_active = true | ||||||
|     crash_site.create_cutscene(player, { -5, -4 }) |     crash_site.create_cutscene(player, { -5, -4 }) | ||||||
|  |  | ||||||
|  | @ -30,4 +30,13 @@ end | ||||||
| if mods["wood-military"] then | if mods["wood-military"] then | ||||||
|     data.raw["bool-setting"]["lignumis-ammo-progression"].forced_value = false |     data.raw["bool-setting"]["lignumis-ammo-progression"].forced_value = false | ||||||
|     data.raw["bool-setting"]["lignumis-ammo-progression"].hidden = true |     data.raw["bool-setting"]["lignumis-ammo-progression"].hidden = true | ||||||
|  | end | ||||||
|  | 
 | ||||||
|  | if mods["planet-picker"] then | ||||||
|  |     data.raw["bool-setting"]["lignumis-belt-progression"].forced_value = false | ||||||
|  |     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"].hidden = true | ||||||
|  |     data.raw["bool-setting"]["lignumis-ammo-progression"].forced_value = false | ||||||
|  |     data.raw["bool-setting"]["lignumis-ammo-progression"].hidden = true | ||||||
| end | end | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Simon Brodtmann
						Simon Brodtmann