idmillington / undum

A client-side framework for narrative hypertext interactive fiction.
https://idmillington.github.com/undum
MIT License
336 stars 80 forks source link

Undum option: repeatable actions #29

Closed Oreolek closed 6 years ago

Oreolek commented 10 years ago

A repeatable action is an action which can be called more than once.

But what if a game has no repeatable actions? Every link in the game still has to bear "once" class. So I've implemented a switch for Undum. Just call:

system.options.repeatable_links = false

in your undum.game.init function and get rid of all "once" classes! It completely turns off repeatable actions.

I don't think the option name is really the best choice but I definitely need this feature.

idmillington commented 10 years ago

I'm not sure on the name, yes, but the idea seems reasonable. I favour something like

system.options.all_actions_once = true
Oreolek commented 10 years ago

Okay, I've updated the branch with the new syntax from another pull request. I didn't touch the names though.