Commits

Anonymous committed aeeb1bb

added check love versione (0.6.2) in requirements

Comments (0)

Files changed (1)

states/requirements.lua

 
 
 function Gamestate.requirements:check_requirements()
+  --love._version
+  --love._version_string
+  --love._version_codename
+	if love._version ~= 62 then
+		self.errors = "This game is designed for LÖVE 0.6.2"
+		self.errors = self.errors.."\nYour version is " .. love._version_string .. " ("..love._version_codename..")"
+		self.errors = self.errors.."\nthere could be problems..."
+		return false
+  end
 	self.errors = ""
 	return true
 end
 function Gamestate.requirements:draw()
   love.graphics.setColor(255, 255, 255, 255)
   love.graphics.setFont(self.font)
-  love.graphics.print("Astertris", 20, 60, -0.3)
-  love.graphics.printf(self.errors, 100, 300, 600, 'center')
+  love.graphics.print("LoveWars", 20, 60, -0.3)
+  love.graphics.setColor(255, 0, 0, 255)
+  love.graphics.printf(self.errors, 100, 200, 600, 'center')
+  love.graphics.printf("press Y to continue at your own risk", 100, 500, 600, 'center')
 end
+
+function Gamestate.requirements:keypressed(key, unicode)
+	if key == "y" or key=="return" then
+    Gamestate.switch(Gamestate.intro)
+  end
+end