Commit 41f937fb6dbfd723af58540358c4ca132670d85a

Authored by DarkGod
1 parent 8ceac3cc

allow speed to be specified for a whole tree

... ... @@ -31,19 +31,19 @@ function _M:init(font, size)
31 31 end
32 32
33 33 function _M:say(time, txt, ...)
34   - return self:sayEasing(time, nil, txt, ...)
  34 + return self:easing(time, nil, txt, ...)
35 35 end
36 36
37   -function _M:sayEasing(time, easing, txt, ...)
38   - self:saySimple(time, easing, txt, ...)
  37 +function _M:easing(time, easing, txt, ...)
  38 + self:easingSimple(time, easing, txt, ...)
39 39 game.logPlayer(game.player, "%s", txt:toString())
40 40 end
41 41
42 42 function _M:saySimple(time, txt, ...)
43   - return self:sayEasingSimple(time, nil, txt, ...)
  43 + return self:easingSimple(time, nil, txt, ...)
44 44 end
45 45
46   -function _M:sayEasingSimple(time, easing, txt, ...)
  46 +function _M:easingSimple(time, easing, txt, ...)
47 47 txt = txt:format(...)
48 48 self.max_time = time or 60
49 49 self.list, self.max_lines, self.max_w = self.font:draw(txt:toString(), math.floor(game.w * 0.8), 255, 255, 255)
... ...
... ... @@ -18,7 +18,7 @@
18 18 -- darkgod@te4.org
19 19
20 20 local print = print
21   -if config.settings.cheat then print = function() end end
  21 +if not config.settings.cheat then print = function() end end
22 22
23 23 -- The basic stuff used to damage a grid
24 24 setDefaultProjector(function(src, x, y, type, dam, tmp, no_martyr)
... ...
... ... @@ -22,14 +22,16 @@ local Entity = require "engine.Entity"
22 22
23 23 local oldNewTalent = Talents.newTalent
24 24 Talents.newTalent = function(self, t)
25   - assert(engine.interface.ActorTalents.talents_types_def[t.type[1]], "No talent category "..tostring(t.type[1]).." for talent "..t.name)
26   - if engine.interface.ActorTalents.talents_types_def[t.type[1]].generic then t.generic = true end
27   - if engine.interface.ActorTalents.talents_types_def[t.type[1]].no_silence then t.no_silence = true end
28   - if engine.interface.ActorTalents.talents_types_def[t.type[1]].is_spell then t.is_spell = true end
29   - if engine.interface.ActorTalents.talents_types_def[t.type[1]].is_mind then t.is_mind = true end
30   - if engine.interface.ActorTalents.talents_types_def[t.type[1]].is_nature then t.is_nature = true end
31   - if engine.interface.ActorTalents.talents_types_def[t.type[1]].is_unarmed then t.is_unarmed = true end
32   - if engine.interface.ActorTalents.talents_types_def[t.type[1]].autolearn_mindslayer then t.autolearn_mindslayer = true end
  25 + local tt = engine.interface.ActorTalents.talents_types_def[t.type[1]]
  26 + assert(tt, "No talent category "..tostring(t.type[1]).." for talent "..t.name)
  27 + if tt.generic then t.generic = true end
  28 + if tt.no_silence then t.no_silence = true end
  29 + if tt.is_spell then t.is_spell = true end
  30 + if tt.is_mind then t.is_mind = true end
  31 + if tt.is_nature then t.is_nature = true end
  32 + if tt.is_unarmed then t.is_unarmed = true end
  33 + if tt.autolearn_mindslayer then t.autolearn_mindslayer = true end
  34 + if tt.speed and not t.speed then t.speed = tt.speed end
33 35
34 36 if t.tactical then
35 37 local tacts = {}
... ...