forked from cacklingfiend/lignumis
		
	Adjust vanilla technologies
This commit is contained in:
		
							parent
							
								
									1d8b2625e0
								
							
						
					
					
						commit
						c6e1079ca0
					
				
					 7 changed files with 43 additions and 3 deletions
				
			
		|  | @ -20,7 +20,6 @@ The following mods can be a great addition for this mod: | |||
| 
 | ||||
| Sorted by priority | ||||
| 
 | ||||
| - Adjust vanilla technologies | ||||
| - Add end-game stuff | ||||
| - Add burner radar | ||||
| - Balance resources | ||||
|  | @ -40,6 +39,7 @@ Unsorted | |||
| - Compatibility with [Noble Metals](https://mods.factorio.com/mod/bzgold) once it's updated | ||||
| - Optimize images | ||||
| - Add noise to non-Lignumis entities brought in later | ||||
| - Add deep core mining | ||||
| 
 | ||||
| ## Credits | ||||
| 
 | ||||
|  |  | |||
|  | @ -8,6 +8,7 @@ Date: 07.01.2025 | |||
|     - Balance technology "Basic construction robotics (copper)" | ||||
|     - Balance "noise" pollution | ||||
|     - Move 2 damage research levels to Lignumis | ||||
|     - Adjust vanilla technologies | ||||
| --------------------------------------------------------------------------------------------------- | ||||
| Version: 0.0.4 | ||||
| Date: 06.01.2025 | ||||
|  |  | |||
|  | @ -1 +1,2 @@ | |||
| require("prototypes/content/updates") | ||||
| require("prototypes/integrations/updates") | ||||
|  | @ -1,3 +1,12 @@ | |||
| Lignumis = { | ||||
|     science_blacklist = { | ||||
|         "deep-miner", | ||||
|         "logistic-system", | ||||
|         "space-platform-thruster", | ||||
|         "kovarex-enrichment-process" | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| require("__cf-lib__/util") | ||||
| 
 | ||||
| require("prototypes/content/data") | ||||
|  |  | |||
							
								
								
									
										1
									
								
								lignumis/prototypes/integrations/updates.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								lignumis/prototypes/integrations/updates.lua
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1 @@ | |||
| require("vanilla-updates") | ||||
							
								
								
									
										18
									
								
								lignumis/prototypes/integrations/vanilla-updates.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								lignumis/prototypes/integrations/vanilla-updates.lua
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,18 @@ | |||
| -- Add wood and steam science packs as ingredients to technologies that require Nauvis science packs. | ||||
| -- It skips technologies that are available before coming back to Lignumis. | ||||
| 
 | ||||
| for _, technology in pairs(data.raw.technology) do | ||||
|     if technology.unit and technology.unit.ingredients and not table.contains(Lignumis.science_blacklist, technology.name) then | ||||
|         local ingredients = technology.unit.ingredients | ||||
|         local noMatches = table.filter(ingredients, function(ingredient) | ||||
|             return table.contains({ "wood-science-pack", "steam-science-pack" }, ingredient[1]) | ||||
|         end) | ||||
|         local yesMatches = table.filter(ingredients, function(ingredient) | ||||
|             return table.contains({ "utility-science-pack", "production-science-pack", "space-science-pack" }, ingredient[1]) | ||||
|         end) | ||||
|         if #noMatches == 0 and #yesMatches > 0 then | ||||
|             table.insert(technology.unit.ingredients, { "wood-science-pack", 1 }) | ||||
|             table.insert(technology.unit.ingredients, { "steam-science-pack", 1 }) | ||||
|         end | ||||
|     end | ||||
| end | ||||
|  | @ -1,3 +1,5 @@ | |||
| local Technology = require("__cf-lib__/data/Technology") | ||||
| 
 | ||||
| -- Burner mining drill | ||||
| 
 | ||||
| local drill = data.raw["mining-drill"]["burner-mining-drill"] | ||||
|  | @ -252,6 +254,14 @@ table.insert(physical_damage_technology_4.effects, { | |||
| local weapon_speed_technology_4 = data.raw.technology["weapon-shooting-speed-4"] | ||||
| weapon_speed_technology_4.prerequisites = { "weapon-shooting-speed-3", "military-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:addIngredients({ "wood-science-pack", "steam-science-pack" }) | ||||
| 
 | ||||
| local utility_science_pack_technology = Technology:new("utility-science-pack") | ||||
| utility_science_pack_technology:setPrerequisites({ "space-platform-thruster" }) | ||||
| utility_science_pack_technology:addIngredients({ "wood-science-pack", "steam-science-pack" }) | ||||
| 
 | ||||
| 
 | ||||
| -- Equipment | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Simon Brodtmann
						Simon Brodtmann