mirror of
				https://github.com/ynerant/Level-Editor.git
				synced 2025-11-03 07:38:45 +01:00 
			
		
		
		
	Fix Java 8
This commit is contained in:
		@@ -11,6 +11,7 @@ import javax.imageio.ImageIO
 | 
				
			|||||||
import net.liftweb.json._
 | 
					import net.liftweb.json._
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import scala.collection.mutable.ListBuffer
 | 
					import scala.collection.mutable.ListBuffer
 | 
				
			||||||
 | 
					import scala.io.Source
 | 
				
			||||||
 | 
					
 | 
				
			||||||
object SpriteRegister {
 | 
					object SpriteRegister {
 | 
				
			||||||
	private var nameToCoords = Map(): Map[String, List[List[Int]]]
 | 
						private var nameToCoords = Map(): Map[String, List[List[Int]]]
 | 
				
			||||||
@@ -77,7 +78,7 @@ object SpriteRegister {
 | 
				
			|||||||
			try {
 | 
								try {
 | 
				
			||||||
				val f = new File(assetsDir.getAbsolutePath + "/" + asset + "/textures/sprites")
 | 
									val f = new File(assetsDir.getAbsolutePath + "/" + asset + "/textures/sprites")
 | 
				
			||||||
				assert(f.isDirectory || f.mkdirs)
 | 
									assert(f.isDirectory || f.mkdirs)
 | 
				
			||||||
				val json = Files.readString(new File(f, "sprites.json").toPath)
 | 
									val json = Source.fromFile(new File(f, "sprites.json")).mkString
 | 
				
			||||||
				implicit val formats: DefaultFormats.type = DefaultFormats
 | 
									implicit val formats: DefaultFormats.type = DefaultFormats
 | 
				
			||||||
				nameToCoords = parse(json).extract[Map[String, List[List[Int]]]]
 | 
									nameToCoords = parse(json).extract[Map[String, List[List[Int]]]]
 | 
				
			||||||
				nameToCoords.keySet.foreach(key => {
 | 
									nameToCoords.keySet.foreach(key => {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user