SmallJoker / simple_protection

Minetest fixed-grid quadratic area protection mod with graphical area "minimap"
11 stars 6 forks source link

Use mod storage #16

Closed tacotexmex closed 7 years ago

tacotexmex commented 7 years ago

Instead of writing to file, get_mod_storage may be used.

SmallJoker commented 7 years ago

The ModStorage is a rather new feature in Minetest. Added in February 2017, i.e. 0.4.16-stable contains it. As far I can see it's just a plain JSON file with fancy functions around, so no great improvement to the current methods instead of having them as 1 or 2-liners but maybe unreadable when opening the file with an editor. The current functions work nicely but we may need this feature to implement area names.

SmallJoker commented 7 years ago

Replaced in favour for #19 (using sqlite). Pros/cons are listed there.