Skip to content
Snippets Groups Projects
Commit 656f4064 authored by dg's avatar dg
Browse files

fix

git-svn-id: http://svn.net-core.org/repos/t-engine4@3608 51575b47-30f0-44d4-a5cc-537603b46e54
parent eac600df
No related branches found
No related tags found
No related merge requests found
......@@ -91,13 +91,19 @@ function _M:generate()
self.key:addBinds{
ACCEPT = function() self:onUse() end,
MOVE_UP = function()
if self.sel and self.list[self.sel] then self.list[self.sel].focus_decay = self.focus_decay_max end
self.sel = util.boundWrap(self.sel - 1, 1, self.max) self.scroll = util.scroll(self.sel, self.scroll, self.max_display)
self.sel_j = util.boundWrap(self.sel_j - 1, 1, self.max) self.scroll = util.scroll(self.sel_j, self.scroll, self.nb_h)
self:onSelect()
end,
MOVE_DOWN = function()
if self.sel and self.list[self.sel] then self.list[self.sel].focus_decay = self.focus_decay_max end
self.sel = util.boundWrap(self.sel + 1, 1, self.max) self.scroll = util.scroll(self.sel, self.scroll, self.max_display)
self.sel_j = util.boundWrap(self.sel_j + 1, 1, self.max) self.scroll = util.scroll(self.sel_j, self.scroll, self.nb_h)
self:onSelect()
end,
MOVE_RIGHT = function()
self.sel_i = util.boundWrap(self.sel_i + 1, 1, self.nb_w)
self:onSelect()
end,
MOVE_LEFT = function()
self.sel_i = util.boundWrap(self.sel_i - 1, 1, self.nb_w)
self:onSelect()
end,
}
......@@ -105,27 +111,23 @@ function _M:generate()
[{"_UP","ctrl"}] = function() self.key:triggerVirtual("MOVE_UP") end,
[{"_DOWN","ctrl"}] = function() self.key:triggerVirtual("MOVE_DOWN") end,
_HOME = function()
if self.sel and self.list[self.sel] then self.list[self.sel].focus_decay = self.focus_decay_max end
self.sel = 1
self.scroll = util.scroll(self.sel, self.scroll, self.max_display)
self.sel_j = 1
self.scroll = util.scroll(self.sel_j, self.scroll, self.nb_h)
self:onSelect()
end,
_END = function()
if self.sel and self.list[self.sel] then self.list[self.sel].focus_decay = self.focus_decay_max end
self.sel = self.max
self.scroll = util.scroll(self.sel, self.scroll, self.max_display)
self.sel_j = self.max
self.scroll = util.scroll(self.sel_j, self.scroll, self.nb_h)
self:onSelect()
end,
_PAGEUP = function()
if self.sel and self.list[self.sel] then self.list[self.sel].focus_decay = self.focus_decay_max end
self.sel = util.bound(self.sel - self.max_display, 1, self.max)
self.scroll = util.scroll(self.sel, self.scroll, self.max_display)
self.sel_j = util.bound(self.sel_j - self.nb_h, 1, self.max)
self.scroll = util.scroll(self.sel_j, self.scroll, self.nb_h)
self:onSelect()
end,
_PAGEDOWN = function()
if self.sel and self.list[self.sel] then self.list[self.sel].focus_decay = self.focus_decay_max end
self.sel = util.bound(self.sel + self.max_display, 1, self.max)
self.scroll = util.scroll(self.sel, self.scroll, self.max_display)
self.sel_j = util.bound(self.sel_j + self.nb_h, 1, self.max)
self.scroll = util.scroll(self.sel_j, self.scroll, self.nb_h)
self:onSelect()
end,
}
......
......@@ -1240,7 +1240,7 @@ function _M:createRandomZone(zbase)
reload_lists = false,
generator = {
map = layout.gen(data),
actor = { class = "engine.generator.actor.Random", nb_npc = nb_npc, guardian = boss_id },
actor = { class = "engine.generator.actor.Random", nb_npc = nb_npc, guardian = boss_id, abord_no_guardian=true },
trap = { class = "engine.generator.trap.Random", nb_trap = nb_trap, },
object = { class = "engine.generator.object.Random", nb_object = nb_object, },
},
......
game/modules/tome/data/gfx/shockbolt/npc/undead_shadow_shadow.png

2.65 KiB

game/modules/tome/data/gfx/shockbolt/npc/undead_skeleton_cowboy.png

10.2 KiB

......@@ -132,7 +132,7 @@ function _M:init(title, actor, order, at_end, quickbirth, w, h)
}
self:setupUI()
-- self:toggleDisplay(self.c_tile, profile.)
if not profile.auth or not tonumber(profile.auth.donated) or tonumber(profile.auth.donated) <= 1 then self:toggleDisplay(self.c_tile, false) end
if self.descriptors_by_type.difficulty == "Tutorial" then
self:raceUse(self.all_races[1], 1)
......@@ -162,6 +162,7 @@ function _M:atEnd(v)
self:checkNew(function()
local ps = self.actor:getParticlesList()
for i, p in ipairs(ps) do self.actor:removeParticles(p) end
self.actor:defineDisplayCallback()
game:unregisterDialog(self)
self:apply()
......@@ -733,6 +734,12 @@ function _M:setTile(f, w, h)
end
function _M:selectTileNoDonations()
Dialog:simpleLongPopup("Custom tiles",
[[Custom Tiles have been added as a thank you to everyone that's donated to ToME.
If you'd like to use this (purely cosmetic) feature you should consider donating.
While this is a free game that I am doing for fun, if it can help feeding my family a bit I certainly will not complain.
]], 400)
end
function _M:selectTile()
......@@ -908,6 +915,7 @@ function _M:selectTile()
"npc/skeleton_archer.png",
"npc/skeleton_mage.png",
"npc/skeleton_warrior.png",
"npc/undead_skeleton_cowboy.png",
"npc/the_master.png",
"npc/vampire_lord.png",
"npc/vampire.png",
......
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