
Code: Select all
diff -ur t-engine4-src-1.0.0beta18/game/engines/default/data/keybinds/actions.lua t-engine4-src-1.0.0beta18-restturns/game/engines/default/data/keybinds/actions.lua
--- t-engine4-src-1.0.0beta18/game/engines/default/data/keybinds/actions.lua 2010-10-12 08:08:51.000000000 -0400
+++ t-engine4-src-1.0.0beta18-restturns/game/engines/default/data/keybinds/actions.lua 2011-01-12 09:19:57.000000000 -0500
@@ -52,6 +52,13 @@
}
defineAction{
+ default = { },
+ type = "RESTTURNS",
+ group = "actions",
+ name = "Rest for a number of turns",
+}
+
+defineAction{
default = { "sym:115:true:false:false:false" },
type = "SAVE_GAME",
group = "actions",
diff -ur t-engine4-src-1.0.0beta18/game/modules/tome/class/Game.lua t-engine4-src-1.0.0beta18-restturns/game/modules/tome/class/Game.lua
--- t-engine4-src-1.0.0beta18/game/modules/tome/class/Game.lua 2010-12-30 19:11:39.000000000 -0500
+++ t-engine4-src-1.0.0beta18-restturns/game/modules/tome/class/Game.lua 2011-01-12 09:20:09.000000000 -0500
@@ -809,6 +809,20 @@
self.player:restInit()
end,
+ RESTTURNS = function()
+ local GetQuantity = require "engine.dialogs.GetQuantity"
+ local q = GetQuantity.new("Resting", "Rest for how long?", 0, 9999, function(qty)
+ if not qty or qty == 0 then
+ --- Placeholder, this should eventually rest till all skills, items, runes, infusion, etc... are ready
+ --- Maybe find further-est from fully recharged and rest that many ticks?
+ --- Dono enough about the code yet to do that XD
+ qty = 9999
+ end
+ self.player:restInit(qty-1)
+ end)
+ game:registerDialog(q)
+ end,
+
PICKUP_FLOOR = not_wild(function()
self.player:playerPickup()
end),