forked from luanti-org/minetest_game
		
	Furnace: Fix "output full" infotext
This commit is contained in:
		
				
					committed by
					
						 SmallJoker
						SmallJoker
					
				
			
			
				
	
			
			
			
						parent
						
							2063fcd075
						
					
				
				
					commit
					e5ebb36cd5
				
			| @@ -107,6 +107,7 @@ local function furnace_node_timer(pos, elapsed) | |||||||
|  |  | ||||||
| 	local inv = meta:get_inventory() | 	local inv = meta:get_inventory() | ||||||
| 	local srclist, fuellist | 	local srclist, fuellist | ||||||
|  | 	local dst_full = false | ||||||
|  |  | ||||||
| 	local cookable, cooked | 	local cookable, cooked | ||||||
| 	local fuel | 	local fuel | ||||||
| @@ -146,6 +147,8 @@ local function furnace_node_timer(pos, elapsed) | |||||||
| 						inv:set_stack("src", 1, aftercooked.items[1]) | 						inv:set_stack("src", 1, aftercooked.items[1]) | ||||||
| 						src_time = src_time - cooked.time | 						src_time = src_time - cooked.time | ||||||
| 						update = true | 						update = true | ||||||
|  | 					else | ||||||
|  | 						dst_full = true | ||||||
| 					end | 					end | ||||||
| 				else | 				else | ||||||
| 					-- Item could not be cooked: probably missing fuel | 					-- Item could not be cooked: probably missing fuel | ||||||
| @@ -195,7 +198,7 @@ local function furnace_node_timer(pos, elapsed) | |||||||
| 	local item_percent = 0 | 	local item_percent = 0 | ||||||
| 	if cookable then | 	if cookable then | ||||||
| 		item_percent = math.floor(src_time / cooked.time * 100) | 		item_percent = math.floor(src_time / cooked.time * 100) | ||||||
| 		if item_percent > 100 then | 		if dst_full then | ||||||
| 			item_state = "100% (output full)" | 			item_state = "100% (output full)" | ||||||
| 		else | 		else | ||||||
| 			item_state = item_percent .. "%" | 			item_state = item_percent .. "%" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user