diff --git a/bootstrap/boot.lua b/bootstrap/boot.lua index d6f51d256b5a2a0d4bf156eb98716973ed5d6b47..1eded180291449a68c97cb91917e91ee54ed43dd 100644 --- a/bootstrap/boot.lua +++ b/bootstrap/boot.lua @@ -19,9 +19,19 @@ if __SELFEXE then print("SelfExe gave us app directory of:", dir) fs.mount(dir..fs.getPathSeparator().."game"..fs.getPathSeparator().."thirdparty", "/", true) fs.mount(dir..fs.getPathSeparator().."game", "/", true) + if fs.exists("/engine.teae") and fs.exists("/thirdparty.teae") then + fs.mount(dir..fs.getPathSeparator().."game/engine.teae", "/", true) + fs.mount(dir..fs.getPathSeparator().."game/thirdparty.teae", "/", true) + print("Using engine.teae") + end else fs.mount("game"..fs.getPathSeparator().."thirdparty", "/", true) fs.mount("game", "/", true) + if fs.exists("/engine.teae") and fs.exists("/thirdparty.teae") then + fs.mount(dir..fs.getPathSeparator().."game/engine.teae", "/", true) + fs.mount(dir..fs.getPathSeparator().."game/thirdparty.teae", "/", true) + print("Using engine.teae") + end end -- We need it no more, lets forget about it just it case some malovelant script tried something silly diff --git a/game/engine/Map.lua b/game/engine/Map.lua index 636e69674cd21d75ac29c750276222964a662249..a27ec4bca930932cfb5eb73b69162542d5a74fcd 100644 --- a/game/engine/Map.lua +++ b/game/engine/Map.lua @@ -553,7 +553,7 @@ function _M:applyESP(x, y, v) end end ---- Check all entities of the grid for a property +--- Check all entities of the grid for a property until it finds one/returns one -- @param x position -- @param y position -- @param what property to check @@ -567,6 +567,19 @@ function _M:checkAllEntities(x, y, what, ...) end end +--- Check all entities of the grid for a property, discarding the results +-- @param x position +-- @param y position +-- @param what property to check +function _M:checkAllEntitiesNoStop(x, y, what, ...) + if x < 0 or x >= self.w or y < 0 or y >= self.h then return end + if self.map[x + y * self.w] then + for _, e in pairs(self.map[x + y * self.w]) do + e:check(what, x, y, ...) + end + end +end + --- Check specified entity position of the grid for a property -- @param x position -- @param y position diff --git a/game/engine/init.lua b/game/engine/init.lua index e9dda1835cc3a3e643fec9182175c51ea86cd795..65ecc955c06040e2a44641b89bff156360530e67 100644 --- a/game/engine/init.lua +++ b/game/engine/init.lua @@ -34,7 +34,7 @@ require "engine.PlayerProfile" engine.Tiles.prefix = "/data/gfx/" -- Engine Version -engine.version = {1,0,0} +engine.version = {0,9,10} -- Setup the user directory engine.homepath = fs.getUserPath()..fs.getPathSeparator()..fs.getHomePath()..fs.getPathSeparator().."4.0" diff --git a/game/modules/example/init.lua b/game/modules/example/init.lua index a2c541f3a311fc936d5e81479efc1c766d009583..bfa3720fccc9676186583b7c8b6204d1fa89c4d6 100644 --- a/game/modules/example/init.lua +++ b/game/modules/example/init.lua @@ -23,7 +23,7 @@ short_name = "example" author = { "DarkGod", "darkgod@te4.org" } homepage = "http://te4.org/modules:example" version = {1,0,0} -engine = {1,0,0} +engine = {0,9,10} description = [[ This is *NOT* a game, just an example/template to make your own using the T-Engine4. ]] diff --git a/game/modules/tome/init.lua b/game/modules/tome/init.lua index 34f2f97ba578dd07a8a4605803e677824fc894ea..0f1f4aa894ad5a3f87797e88e28eb112e4c653f3 100644 --- a/game/modules/tome/init.lua +++ b/game/modules/tome/init.lua @@ -23,7 +23,7 @@ short_name = "tome" author = { "DarkGod", "darkgod@te4.org" } homepage = "http://tome.te4.org/" version = {4,0,0} -engine = {1,0,0} +engine = {0,9,10} description = [[ Morgoth is banned to the Void, Sauron has been vanquished, the #ff0000#One Ring#ffffff# destroyed. The nations of Men, Dwarves, Elves and Hobbits are freed from the tyranny of the Rings. diff --git a/game/special/mainmenu/class/Game.lua b/game/special/mainmenu/class/Game.lua index d189ece70ef72483e98dcb88398d3c294794878b..994e39ca90ebc27a4c95e3ecbb1d5be1808013dc 100644 --- a/game/special/mainmenu/class/Game.lua +++ b/game/special/mainmenu/class/Game.lua @@ -49,6 +49,7 @@ function _M:run() self:selectStepMain() self:checkLogged() + self:engineVersion() -- Ok everything is good to go, activate the game in the engine! self:setCurrent() @@ -60,12 +61,16 @@ end function _M:checkLogged() if profile.auth then - self.s_log = core.display.drawStringNewSurface(self.profile_font, "Online Profile: "..profile.auth.name.."[http://te4.org/players/"..profile.auth.page.."]", 255, 255, 0) + self.s_log = core.display.drawStringBlendedNewSurface(self.profile_font, "Online Profile: "..profile.auth.name.."[http://te4.org/players/"..profile.auth.page.."]", 255, 255, 0) else self.s_log = nil end end +function _M:engineVersion() + self.s_version = core.display.drawStringBlendedNewSurface(self.profile_font, ("T-Engine4 version: %d.%d.%d"):format(engine.version[1], engine.version[2], engine.version[3]), 185, 225, 0) +end + function _M:tick() return true end @@ -82,6 +87,8 @@ function _M:display() local w, h = self.s_log:getSize() self.s_log:toScreen(self.w - w, self.h - h) end + local w, h = self.s_version:getSize() + self.s_version:toScreen(0, self.h - h) if self.step.do_tooltip then self.tooltip:display()