forked from mtcontrib/pipeworks
		
	don't write pipeworks config file anymore. if a user needs one, they can
create it themselves :-)
This commit is contained in:
		
							
								
								
									
										17
									
								
								init.lua
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								init.lua
									
									
									
									
									
								
							@@ -17,22 +17,7 @@ pipeworks.modpath = minetest.get_modpath("pipeworks")
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
dofile(pipeworks.modpath.."/default_settings.txt")
 | 
					dofile(pipeworks.modpath.."/default_settings.txt")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if io.open(pipeworks.worldpath.."/pipeworks_settings.txt","r") == nil then
 | 
					if io.open(pipeworks.worldpath.."/pipeworks_settings.txt","r") ~= nil then
 | 
				
			||||||
 | 
					 | 
				
			||||||
	io.input(pipeworks.modpath.."/default_settings.txt")
 | 
					 | 
				
			||||||
	io.output(pipeworks.worldpath.."/pipeworks_settings.txt")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	local size = 2^13      -- good buffer size (8K)
 | 
					 | 
				
			||||||
	while true do
 | 
					 | 
				
			||||||
		local block = io.read(size)
 | 
					 | 
				
			||||||
		if not block then
 | 
					 | 
				
			||||||
			io.close()
 | 
					 | 
				
			||||||
			break
 | 
					 | 
				
			||||||
		end
 | 
					 | 
				
			||||||
		io.write(block)
 | 
					 | 
				
			||||||
	end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
else
 | 
					 | 
				
			||||||
	dofile(pipeworks.worldpath.."/pipeworks_settings.txt")
 | 
						dofile(pipeworks.worldpath.."/pipeworks_settings.txt")
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user