Patch for resting until all abilities are cooled down

All development conversation and discussion takes place here

Moderator: Moderator

Post Reply
Message
Author
CheapyPipe
Wayist
Posts: 20
Joined: Thu Jun 17, 2010 1:25 am

Patch for resting until all abilities are cooled down

#1 Post by CheapyPipe »

Hi all,

I've been playing the ToME4 beta for a week or so, and the one thing I wanted was the ability to rest until all my abilities were usable again. Today I finally dove into the labyrinthine code and added the functionality in. I did this on Linux, so the instructions are going to be for Linux. Sorry everyone else!

The linked-to patch can be applied by going into the game/ directory of the source package and running the following command:

Code: Select all

patch -p1 < cooldown.txt
The way to use the new feature is to hit ctrl-r. I did this to have some similarity with the rest command. Much like the rest command, you'll stop cooling down if a monster is spotted.

If you guys would like to incorporate this into the main codebase, I'd be happy to go through the formalities about releasing copyright, and also change the patch to be higher quality (more comments, etc). I'm not actually certain what most of the flags do when you define an action, so in game/data/keybinds/actions.lua, I copied the syntax of ctrl-q, but switched the key used to be r.

Somewhat amusingly, I wrote the whole patch under the impression that the codebase was in Ruby. It wasn't until I typed in that actions.lua URL above that it clicked. No wonder my google searches weren't all that helpful!

Since apparently file attachments aren't allowed, here's a pastebin link to it:
http://pastebin.org/336899

Post Reply