forked from cacklingfiend/lignumis
		
	Only regular Nauvis trees are buffed
This commit is contained in:
		
							parent
							
								
									5a1418fdfb
								
							
						
					
					
						commit
						360caa12d6
					
				
					 2 changed files with 19 additions and 1 deletions
				
			
		|  | @ -1,4 +1,9 @@ | |||
| --------------------------------------------------------------------------------------------------- | ||||
| Version: 1.0.6 | ||||
| Date: 02.02.2025 | ||||
|   Bug Fixes: | ||||
|     - Only regular Nauvis trees are buffed | ||||
| --------------------------------------------------------------------------------------------------- | ||||
| Version: 1.0.5 | ||||
| Date: 27.01.2025 | ||||
|   Changes: | ||||
|  |  | |||
|  | @ -74,9 +74,22 @@ wood_processing.ingredients[1].amount = 1 | |||
| wood_processing.icon = data.raw.item["tree-seed"].icon | ||||
| 
 | ||||
| for _, tree in pairs(data.raw.tree) do | ||||
|     local function isWoodResult(result) | ||||
|         return result.name == "wood" | ||||
|     end | ||||
|     local minable = tree.minable | ||||
|     local woodResults = minable.results and table.filter(minable.results, isWoodResult) | ||||
|     local isRegularTree = (minable.result == "wood" and minable.count == 4) or (#minable.results == 1 and #woodResults == 1 and woodResults[1].amount == 4) | ||||
|     if not isRegularTree then goto continue end | ||||
|     tree.minable.result = nil | ||||
|     tree.minable.count = nil | ||||
|     tree.minable.results = { { type = "item", name = "wood", amount_min = 2, amount_max = 10 } } | ||||
|     local woodResult = { type = "item", name = "wood", amount = nil, amount_min = 2, amount_max = 10 } | ||||
|     if #woodResults > 0 then | ||||
|         table.assign(woodResults[1], woodResult) | ||||
|     else | ||||
|         minable.results = { woodResult } | ||||
|     end | ||||
|     ::continue:: | ||||
| end | ||||
| 
 | ||||
| local tree_plant = data.raw.plant["tree-plant"] | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Simon Brodtmann
						Simon Brodtmann