Skip to content
Snippets Groups Projects
Commit 8d6bc60f authored by DarkGod's avatar DarkGod
Browse files

New Game option will show the module list if there are incompatible modules found

parent adcbd294
No related branches found
Tags tome-1.1.2
No related merge requests found
......@@ -62,7 +62,7 @@ function _M:init()
end
function _M:on_register()
if #self.list == 1 then
if #self.list == 1 and not self.has_incompatible then
game:unregisterDialog(self)
self.list[1]:fct()
end
......@@ -75,8 +75,9 @@ function _M:select(item)
end
function _M:generateList()
local list = Module:listModules(self.c_compat.checked)
local list = Module:listModules(true)
self.list = {}
self.has_incompatible = false
for i = 1, #list do
for j, mod in ipairs(list[i].versions) do
if not self.c_switch.checked and j > 1 then break end
......@@ -105,7 +106,10 @@ function _M:generateList()
tstr:merge(mod.description:toTString())
mod.zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=tstr}
table.insert(self.list, mod)
if self.c_compat.checked or not mod.incompatible then
table.insert(self.list, mod)
end
if mod.incompatible then self.has_incompatible = true end
end
end
end
......
......@@ -22,8 +22,8 @@ long_name = "Example Module for T-Engine4"
short_name = "example"
author = { "DarkGod", "darkgod@te4.org" }
homepage = "http://te4.org/modules:example"
version = {1,1,0}
engine = {1,1,0,"te4"}
version = {1,1,2}
engine = {1,1,2,"te4"}
description = [[
This is *NOT* a game, just an example/template to make your own using the T-Engine4.
]]
......
......@@ -22,8 +22,8 @@ long_name = "Realtime Example Module for T-Engine4"
short_name = "example_realtime"
author = { "DarkGod", "darkgod@te4.org" }
homepage = "http://te4.org/modules:example"
version = {1,0,6}
engine = {1,0,6,"te4"}
version = {1,1,2}
engine = {1,1,2,"te4"}
description = [[
This is *NOT* a game, just an example/template to make your own using the T-Engine4.
]]
......
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