Skip to content
Snippets Groups Projects
Commit 37fa3296 authored by dg's avatar dg
Browse files

Added Map:checkAllEntitiesNoStop() taht will iterate over all entities no...

Added Map:checkAllEntitiesNoStop() taht will iterate over all entities no matter if a result is found
Changed engine version to 0.9.10 (from 1.0.0), your module will not display anymore in the list until you change your init.lua accordingly


git-svn-id: http://svn.net-core.org/repos/t-engine4@1053 51575b47-30f0-44d4-a5cc-537603b46e54
parent 26dcb117
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......
......@@ -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"
......
......@@ -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.
]]
......
......@@ -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.
......
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment