Prevent getting Stuck on Nauvis
This commit is contained in:
		
							parent
							
								
									675136ee06
								
							
						
					
					
						commit
						e6a0f20feb
					
				
					 4 changed files with 23 additions and 42 deletions
				
			
		| 
						 | 
					@ -150,6 +150,7 @@ wood-logistics=Slow but automatic transportation of goods.
 | 
				
			||||||
tree-seeding=[entity=burner-agricultural-tower] allows planting seeds into seedable soil. Planted seeds grow into trees that can be harvested.\n[entity=tree-plant] can grow on grass and dirt. [entity=gold-stromatolite] can grow on [tile=natural-gold-soil].
 | 
					tree-seeding=[entity=burner-agricultural-tower] allows planting seeds into seedable soil. Planted seeds grow into trees that can be harvested.\n[entity=tree-plant] can grow on grass and dirt. [entity=gold-stromatolite] can grow on [tile=natural-gold-soil].
 | 
				
			||||||
active-noise-cancelling=Helps handling noise.
 | 
					active-noise-cancelling=Helps handling noise.
 | 
				
			||||||
quality-assembler=High-end assembler to craft only the finest quality machines using a special resource only found on Lignumis.
 | 
					quality-assembler=High-end assembler to craft only the finest quality machines using a special resource only found on Lignumis.
 | 
				
			||||||
 | 
					automation-science-pack=Leave Lignumis to enable advanced technology research.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[modifier-description]
 | 
					[modifier-description]
 | 
				
			||||||
basic-gun-turret-attack-bonus=Basic gun turret damage: +__1__
 | 
					basic-gun-turret-attack-bonus=Basic gun turret damage: +__1__
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -134,13 +134,9 @@ if not mods["planet-picker"] then
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            prerequisites = { "planet-discovery-nauvis" },
 | 
					            prerequisites = { "planet-discovery-nauvis" },
 | 
				
			||||||
            unit = {
 | 
					            research_trigger = {
 | 
				
			||||||
                count = 50,
 | 
					                type = "mine-entity",
 | 
				
			||||||
                ingredients = {
 | 
					                entity = "iron-ore"
 | 
				
			||||||
                    { "wood-science-pack",  1 },
 | 
					 | 
				
			||||||
                    { "steam-science-pack", 1 }
 | 
					 | 
				
			||||||
                },
 | 
					 | 
				
			||||||
                time = 15
 | 
					 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
| 
						 | 
					@ -160,13 +156,9 @@ if not mods["planet-picker"] then
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            prerequisites = { "planet-discovery-nauvis" },
 | 
					            prerequisites = { "planet-discovery-nauvis" },
 | 
				
			||||||
            unit = {
 | 
					            research_trigger = {
 | 
				
			||||||
                count = 50,
 | 
					                type = "mine-entity",
 | 
				
			||||||
                ingredients = {
 | 
					                entity = "copper-ore"
 | 
				
			||||||
                    { "wood-science-pack",  1 },
 | 
					 | 
				
			||||||
                    { "steam-science-pack", 1 }
 | 
					 | 
				
			||||||
                },
 | 
					 | 
				
			||||||
                time = 15
 | 
					 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -145,40 +145,20 @@ end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if not mods["planet-picker"] then
 | 
					if not mods["planet-picker"] 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.prerequisites = { "planet-discovery-nauvis" }
 | 
					    automation_science_pack_technology.enabled = false
 | 
				
			||||||
 | 
					    automation_science_pack_technology.visible_when_disabled = true
 | 
				
			||||||
    automation_science_pack_technology.research_trigger = nil
 | 
					    automation_science_pack_technology.research_trigger = nil
 | 
				
			||||||
    automation_science_pack_technology.unit = {
 | 
					    automation_science_pack_technology.unit = {
 | 
				
			||||||
        count = 100,
 | 
					        count = 1,
 | 
				
			||||||
        ingredients = {
 | 
					        ingredients = {},
 | 
				
			||||||
            { "wood-science-pack",  1 },
 | 
					        time = 1
 | 
				
			||||||
            { "steam-science-pack", 1 }
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        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.unit = {
 | 
					 | 
				
			||||||
        count = 50,
 | 
					 | 
				
			||||||
        ingredients = {
 | 
					 | 
				
			||||||
            { "wood-science-pack",  1 },
 | 
					 | 
				
			||||||
            { "steam-science-pack", 1 }
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        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.unit = {
 | 
					 | 
				
			||||||
        count = 50,
 | 
					 | 
				
			||||||
        ingredients = {
 | 
					 | 
				
			||||||
            { "wood-science-pack",  1 },
 | 
					 | 
				
			||||||
            { "steam-science-pack", 1 }
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        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
 | 
				
			||||||
| 
						 | 
					@ -217,7 +197,7 @@ if not mods["planet-picker"] then
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    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 = { "robotics", "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 } },
 | 
				
			||||||
| 
						 | 
					@ -260,7 +240,7 @@ if not mods["planet-picker"] then
 | 
				
			||||||
    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 = { "military-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",
 | 
				
			||||||
| 
						 | 
					@ -269,7 +249,7 @@ if not mods["planet-picker"] then
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    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 = { "military-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"]
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -91,6 +91,14 @@ Init.events[defines.events.on_player_changed_surface] = function(event)
 | 
				
			||||||
    if player and player.surface.name == "nauvis" then
 | 
					    if player and player.surface.name == "nauvis" then
 | 
				
			||||||
        storage.nauvis_visited = true
 | 
					        storage.nauvis_visited = true
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if player and player.surface.name ~= "lignumis" and player.force then
 | 
				
			||||||
 | 
					        local automation = player.force.technologies["automation-science-pack"]
 | 
				
			||||||
 | 
					        if not automation.researched then
 | 
				
			||||||
 | 
					            automation.enabled = true
 | 
				
			||||||
 | 
					            automation.researched = true
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue