Commit Graph

111 Commits

Author SHA1 Message Date
1F616EMO
359280a353 Localize areas.startTime
startTime is not used anywhere else, so localizing it makes sense and saves memory.
2024-11-05 20:17:13 +01:00
1F616EMO
79e799cfa1 Move areas:save() into async
On newer Minetest servers, handles saving jobs in async environment. To prevent conflicts, the save file is locked whie saving, and if a code requests saving while the file is locked, data is saved again immediately after finishing the current save.
2024-11-05 20:17:13 +01:00
1F616EMO
ec77a57f42 Stop reusing holes in areas IDs
This eliminates the need of iterating the whole list for every protection operations. Note that the highest index isn't cached, i.e. the first or few (if there are many holes) operations would still suffer from the lag.
2024-11-05 20:17:13 +01:00
Luke aka SwissalpS
d2b227eca6
Make smallest area concept optional (#80)
This restores the behaviour to before #79.
2024-10-01 17:54:47 +02:00
Luke aka SwissalpS
9b6fea1473 fix trailing whitespace in translatable strings
Good editors trim trailing whitespace from EOL.
This means we need to avoid translatable strings that include spacers at
the end. They need to be added in code.
2024-09-25 20:42:09 +02:00
Luke aka SwissalpS
3f30886972 add German locale 2024-09-25 20:42:09 +02:00
Luke aka SwissalpS
a38915f241 overhaul French locale
- Use more informal tone, this is a game not a business meeting.
- Add missing entry about version upgrade
2024-09-25 20:42:09 +02:00
Luke aka SwissalpS
55594b65d8 add Spanish locale 2024-09-25 20:42:09 +02:00
Luke aka SwissalpS
6fd05bc95e trivial a -> an in comments 2024-09-25 20:42:09 +02:00
Luke aka SwissalpS
c2e3d073be
Use smallest area at given position (#79)
When checking for permission to interact, currently the smallest id takes precedence in a situation where areas enclose other areas. This makes it complicated to set up private areas within faction areas and vice versa. Same applies for open areas within a bigger private area.

When multiple areas have the same volume, players seem to agree that the most recently protected area should also take precedence.
Since we can't guarantee that the largest id is the most recent, we still use that info as we have no other way to determine age.
2024-09-11 22:00:47 +02:00
1F616EMO~nya
9a5cdb2822
Allow relative coordinates in /area_pos[12] (#77) 2024-08-07 21:33:36 +02:00
1F616EMO~nya
9024be24eb
Fix deprecated hud_elem_type field warning (#78)
Co-authored-by: cx384 <cx384@proton.me>
2024-07-17 18:18:21 +02:00
Alexander Chibrikin
2deb6770f4
Add russian translation (#68)
* Add ru locale.

* Fixed review remarks

---------

Co-authored-by: ssdaniel24 <bo7oaonteg2m@mail.ru>
2024-06-13 17:26:00 +02:00
tour
0bad0ec0ae
Allow custom checks before allowing a player to protect new areas (#74) 2024-03-22 22:26:12 +01:00
SmallJoker
c044d49d21
Short summary print in /list_areas for admins (#72) 2024-02-24 11:46:45 +01:00
1F616EMO~nya
2c900ef2cd
zh_TW and zh_CN translation (#71) 2024-02-15 18:35:43 +01:00
fluxionary
f4bb8eb29b
Include the endpoint position in the area size check (#70) 2024-02-09 21:25:23 +01:00
Niklp
cba647225c
Add missing placeholder in French translation (#66) 2023-08-28 12:22:40 +02:00
fluxionary
c8cf4aba92
Fix orthography (it's -> its) (#65) 2023-08-26 11:40:59 +02:00
fluxionary
d464d3484f
Fix chat command typo (#64) 2022-11-07 19:59:25 +01:00
Louis Royer
4018c0d204
Add privilege translations and update translations (#49)
+ Add new french translation strings
2020-09-07 17:47:18 +02:00
Kalio_42
c167b30ebf
Adapt to the new version of playerfactions (#48)
Enable to open an area to many factions
    Update to adapt to the new version of playerfactions mod, with its new multi-faction mode
2020-09-05 18:49:17 +02:00
luk3yx
a9c05f0e38
Use JSON to store areas (#47)
This works around a limit of ~21000 areas because of limits in 'minetest.deserialize()'. Files will be migrated to the new format on first change.
2020-08-28 12:54:48 +02:00
Hamlet
142a723eb2
Add Italian translation (#45) 2020-06-14 18:59:48 +02:00
Buckaroo Banzai
66bd6a9b1d
Add luacheck CI and drop node_ownership remnants (#44)
`node_ownership` is long dead, and pollutes the global namespace. Support dropped after ~7 years.

Co-authored-by: BuckarooBanzay <BuckarooBanzay@users.noreply.github.com>
2020-06-08 21:52:11 +02:00
MoNTE48
aa3e35acbe /areas_cleanup for removing ownerless areas 2020-06-04 20:36:12 +02:00
MoNTE48
800a93f5ee Minor cleanup 2020-06-04 20:36:12 +02:00
Louis Royer
448fe3ebf1 Rework on messages displayed
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
2020-03-19 22:46:22 +01:00
Louis Royer
2f4eddd324 Add french translation 2020-03-19 22:46:22 +01:00
Louis Royer
4179917eb4 Add translation support 2020-03-19 22:46:22 +01:00
Alden Peeters
aca830fd22 Add support for playerfactions mod (#37)
Add faction indicator to HUD
2019-09-21 15:33:42 +02:00
SmallJoker
95c1165e28 Add and parse from settingtypes.txt. Update readme 2019-07-11 20:02:32 +02:00
Panquesito7
5527dc8945 Replace deprecated functions with newer ones (#36)
This commit replaces a few deprecated calls to getpos with get_pos
2019-07-10 20:26:42 +02:00
Auke Kok
6218e5884d Limit areas to -30992,30992 due to MABLOCK_SIZE=16
Internally, when allocating an AreaStore, the limits are required
to be within the last full block, and so, you cannot create one "on"
the edge, as it will trigger an exception. When limited to the last
full mapblock, it all works fine.
2019-04-03 11:10:59 -07:00
Auke Kok
cfd4bb2423 Last of the luacheck cleanups. 2019-04-03 10:26:20 -07:00
Auke Kok
6e2b9a0a51 Needs to be defined earlier. 2019-04-03 10:24:02 -07:00
Auke Kok
024424ee8b Also limit chatcommand area_pos[12] positions. 2019-04-03 10:17:47 -07:00
Vanessa Dannenberg
f70600db30 oops, commas would be nice. 2019-04-02 16:06:19 -07:00
Vanessa Dannenberg
9508a004d0 fix posLimit(pos) to process and return a position table 2019-04-02 14:53:54 -07:00
Auke Kok
630bdefd98 Don't allow areas to cross outside mapgen world limits.
Limit any area to within [-31000,31000].
2019-04-01 21:28:03 -07:00
Auke Kok
a303abe51b Add template .luacheckrc 2019-04-01 21:22:31 -07:00
Tai Kedzierski
7b51f84404 Limit recalculations.
Setting based - limit area recalculation and allow tuning of the
interval.
2019-04-01 21:21:31 -07:00
sofar
1bbb997c7a
Add callbacks for area operations 2019-04-01 20:28:50 -07:00
red-001
09c030352f Use the new minetest.safe_file_write API if possible when saving database. 2019-04-01 20:27:17 -07:00
sofar
2637876555
Fix pos big (#1)
* fix pos being to big

* improve

* make the change instead in hud.lua
2019-04-01 20:24:59 -07:00
AntumDeluge
289d0e623c Update usage of settings API 2017-06-09 13:00:12 -04:00
Jordan Irwin
d3d43d9511 Reference 'settings.lua' instead of 'config.lua' (#21) 2017-05-06 13:41:45 -04:00
Tai @ Flex
6080ff065e Add API for adding areas to HUD 2016-12-19 16:36:37 +00:00
ShadowNinja
23f81f6278 Add mod.conf 2016-12-04 04:12:27 +00:00
Dorian Wouters
7cb8787beb Use get_auth_handler().get_auth() instead of auth_table
minetest.auth_table is an implementation detail of the default auth handler.
No guarantee is made that it even exists and using this table directly is incompatible
with custom auth handlers.  Instead, use the proper auth handler API.
2016-09-03 21:05:52 -04:00