forked from mtcontrib/pipeworks
		
	Compare commits
	
		
			9 Commits
		
	
	
		
			70b521c721
			...
			2021-01-30
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					8322f256c5 | ||
| 
						 | 
					ba7eb19317 | ||
| 
						 | 
					065c953eba | ||
| 
						 | 
					9a63d17e4a | ||
| 
						 | 
					d814357ddf | ||
| 
						 | 
					c2fe5fe956 | ||
| 
						 | 
					9dbaa5f4f6 | ||
| 
						 | 
					d93396600f | ||
| 
						 | 
					c966a8a57d | 
@@ -67,11 +67,8 @@ local function run_autocrafter(pos, elapsed)
 | 
			
		||||
	local inventory = meta:get_inventory()
 | 
			
		||||
	local craft = get_craft(pos, inventory)
 | 
			
		||||
	local output_item = craft.output.item
 | 
			
		||||
	-- NALC: existence de limitgroup ?
 | 
			
		||||
	local limitcraft = minetest.get_item_group(output_item:get_name(), "limitcraft") or 0
 | 
			
		||||
	-- only use crafts that have an actual result
 | 
			
		||||
	-- NALC: ou si l'item n'est pas dans le group limitcraft
 | 
			
		||||
	if output_item:is_empty() or limitcraft > 0 then
 | 
			
		||||
	if output_item:is_empty() then
 | 
			
		||||
		meta:set_string("infotext", S("unconfigured Autocrafter: unknown recipe"))
 | 
			
		||||
		return false
 | 
			
		||||
	end
 | 
			
		||||
 
 | 
			
		||||
@@ -86,10 +86,9 @@ function pipeworks.table_contains(tbl, element)
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
function pipeworks.table_extend(tbl, tbl2)
 | 
			
		||||
	local index = #tbl + 1
 | 
			
		||||
	for _, elt in ipairs(tbl2) do
 | 
			
		||||
		tbl[index] = elt
 | 
			
		||||
		index = index + 1
 | 
			
		||||
	local oldlength = #tbl
 | 
			
		||||
	for i = 1,#tbl2 do
 | 
			
		||||
		tbl[oldlength + i] = tbl2[i]
 | 
			
		||||
	end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										6
									
								
								init.lua
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								init.lua
									
									
									
									
									
								
							@@ -71,8 +71,8 @@ function pipeworks.may_configure(pos, player)
 | 
			
		||||
	local meta = minetest.get_meta(pos)
 | 
			
		||||
	local owner = meta:get_string("owner")
 | 
			
		||||
 | 
			
		||||
	if owner ~= "" then -- wielders and filters
 | 
			
		||||
		return owner == name
 | 
			
		||||
	if owner ~= "" and owner == name then -- wielders and filters
 | 
			
		||||
		return true
 | 
			
		||||
	end
 | 
			
		||||
	return not minetest.is_protected(pos, name)
 | 
			
		||||
end
 | 
			
		||||
@@ -150,4 +150,4 @@ end
 | 
			
		||||
 | 
			
		||||
minetest.register_alias("pipeworks:pipe", "pipeworks:pipe_110000_empty")
 | 
			
		||||
 | 
			
		||||
print("Pipeworks loaded!")
 | 
			
		||||
minetest.log("info", "Pipeworks loaded!")
 | 
			
		||||
 
 | 
			
		||||
@@ -340,6 +340,8 @@ local move_entities_globalstep_part2 = function(dtime)
 | 
			
		||||
			entity._velocity = master_entity:get_velocity()
 | 
			
		||||
			entity._acceleration = master_entity:get_acceleration()
 | 
			
		||||
		else
 | 
			
		||||
			entity._velocity = entity._velocity or vector.new(0,0,0)
 | 
			
		||||
			entity._acceleration = entity._acceleration or vector.new(0,0,0)
 | 
			
		||||
			entity._pos = vector.add(vector.add(
 | 
			
		||||
				entity._pos,
 | 
			
		||||
				vector.multiply(entity._velocity, dtime)),
 | 
			
		||||
 
 | 
			
		||||
@@ -378,7 +378,7 @@ if pipeworks.enable_node_breaker then
 | 
			
		||||
	minetest.register_craft({
 | 
			
		||||
		output = "pipeworks:nodebreaker_off",
 | 
			
		||||
		recipe = {
 | 
			
		||||
			{ "pipeworks:gear", "pipeworks:gear",   "pipeworks:gear"    },
 | 
			
		||||
			{ "basic_materials:gear_steel", "basic_materials:gear_steel",   "basic_materials:gear_steel"    },
 | 
			
		||||
			{ "default:stone", "mesecons:piston",   "default:stone" },
 | 
			
		||||
			{ "group:wood",    "mesecons:mesecon",  "group:wood" },
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user