ActiveFormspecs is a framework that abstracts the builtin formspec API of Minetest.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Leslie Krause 9754ea74a4 Build 06 9 months ago
README.txt Build 05 10 months ago
description.txt Build 02 11 months ago
init.lua Build 05 10 months ago
mod.conf Build 02 11 months ago
samples.lua Build 06 9 months ago

README.txt

ActiveFormspecs Mod v2.4
By Leslie E. Krause

ActiveFormspecs is a self-contained API that provides secure session tracking, session-
based state tables, and localized event handling of formspecs for individual mods as
well as entire subgames in Minetest. It evolved out of a recurring need for secure "node
formspecs" on my server, yet avoiding the burden of "reinventing the wheel" with every
new project.

ActiveFormspecs is intended to be compatible with all versions of Minetest 0.4.14+.

https://forum.minetest.net/viewtopic.php?f=9&t=19303

Revision History
----------------------

Version 1.0a (15-Dec-2016)
- initial version within default mod

Version 1.1b (16-Dec-2016)
- added better comments

Version 1.2b (18-Dec-2016)
- renamed public methods

Version 1.3b (04-Jan-2017)
- fixed logic of quit event to require valid session

Version 1.4b (26-Jul-2017)
- added method to update formspec and maintain session

Version 2.0 (24-Dec-2017)
- separated all routines into new mod for public release

Version 2.1 (08-Jan-2018)
- various code refactoring and better comments
- introduced password hashing of form names
- improved sanity checks during form submission
- fully reworked parsing of hidden elements
- ensured hidden elements are always stripped
- gave hidden elements default-state behavior
- localized old node registration functions
- included player object within form table
- added signal handling on formspec termination
- added support for callbacks in node overrides

Version 2.2 (19-Jan-2018)
- introduced player-name arguments for all API calls
- added signal for programmatic formspec closure
- ensured callbacks are notified of session resets
- renamed some local variables to improve clarity

Version 2.3 (28-Jan-2018)
- corrected erroneous value of formspec exit signal
- removed two experimental form session methods
- included timestamp and origin within form table
- added form session validation on destroy and update
- introduced form timers with start and stop methods
- created routine to notify callbacks of timeout
- added support for internal statistical tracking
- added chat command to view form session summary

Version 2.4 (12-Feb-2018)
- various code refactoring and better comments
- full rewrite of timer queue for higher precision

Installation
----------------------

1) Unzip the archive into the mods directory of your subgame
2) Rename the formspecs-master directory to "formspecs"
3) Add "formspecs" to the depends.txt file of mods using the ActiveFormspecs API.

Source Code License
----------------------

The MIT License (MIT)

Copyright (c) 2016-2017, Leslie E. Krause

Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

For more details:
https://opensource.org/licenses/MIT