Commit 8d6bc60f0be1f592020dbbaff11b63abadb9cced
1 parent
adcbd294
New Game option will show the module list if there are incompatible modules found
Showing
3 changed files
with
11 additions
and
7 deletions
... | ... | @@ -62,7 +62,7 @@ function _M:init() |
62 | 62 | end |
63 | 63 | |
64 | 64 | function _M:on_register() |
65 | - if #self.list == 1 then | |
65 | + if #self.list == 1 and not self.has_incompatible then | |
66 | 66 | game:unregisterDialog(self) |
67 | 67 | self.list[1]:fct() |
68 | 68 | end |
... | ... | @@ -75,8 +75,9 @@ function _M:select(item) |
75 | 75 | end |
76 | 76 | |
77 | 77 | function _M:generateList() |
78 | - local list = Module:listModules(self.c_compat.checked) | |
78 | + local list = Module:listModules(true) | |
79 | 79 | self.list = {} |
80 | + self.has_incompatible = false | |
80 | 81 | for i = 1, #list do |
81 | 82 | for j, mod in ipairs(list[i].versions) do |
82 | 83 | if not self.c_switch.checked and j > 1 then break end |
... | ... | @@ -105,7 +106,10 @@ function _M:generateList() |
105 | 106 | tstr:merge(mod.description:toTString()) |
106 | 107 | mod.zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=tstr} |
107 | 108 | |
108 | - table.insert(self.list, mod) | |
109 | + if self.c_compat.checked or not mod.incompatible then | |
110 | + table.insert(self.list, mod) | |
111 | + end | |
112 | + if mod.incompatible then self.has_incompatible = true end | |
109 | 113 | end |
110 | 114 | end |
111 | 115 | end | ... | ... |
... | ... | @@ -22,8 +22,8 @@ long_name = "Example Module for T-Engine4" |
22 | 22 | short_name = "example" |
23 | 23 | author = { "DarkGod", "darkgod@te4.org" } |
24 | 24 | homepage = "http://te4.org/modules:example" |
25 | -version = {1,1,0} | |
26 | -engine = {1,1,0,"te4"} | |
25 | +version = {1,1,2} | |
26 | +engine = {1,1,2,"te4"} | |
27 | 27 | description = [[ |
28 | 28 | This is *NOT* a game, just an example/template to make your own using the T-Engine4. |
29 | 29 | ]] | ... | ... |
... | ... | @@ -22,8 +22,8 @@ long_name = "Realtime Example Module for T-Engine4" |
22 | 22 | short_name = "example_realtime" |
23 | 23 | author = { "DarkGod", "darkgod@te4.org" } |
24 | 24 | homepage = "http://te4.org/modules:example" |
25 | -version = {1,0,6} | |
26 | -engine = {1,0,6,"te4"} | |
25 | +version = {1,1,2} | |
26 | +engine = {1,1,2,"te4"} | |
27 | 27 | description = [[ |
28 | 28 | This is *NOT* a game, just an example/template to make your own using the T-Engine4. |
29 | 29 | ]] | ... | ... |
-
Please register or login to post a comment