minetest-mods / areas Goto Github PK
View Code? Open in Web Editor NEWA rewrite of the node_ownership Minetest mod with many new features.
License: GNU Lesser General Public License v2.1
A rewrite of the node_ownership Minetest mod with many new features.
License: GNU Lesser General Public License v2.1
In the chatcommand add_owner there's a typo in the description:
https://github.com/minetest-mods/areas/blob/master/chatcommands.lua#L74
description = S("Give a player access to a sub-area beetween two"
=>
description = S("Give a player access to a sub-area between two"
May need changes in the language files, too
For my reference 2726
write all area modifications to log
Currently is requires administrative privileges, could it be also allowed for area owners?
Currently it is hard to change / move area without administrative privileges if area contains subareas (one cannot just remove and recreate parent).
This would allow easier area fine tuning / adjustment after area has been already created.
It would be great if you'd consider moving this mod to the minetest-mods organisation. It's a shame to see it go unmaintained.
Is there a way to allow non-owners of areas to interact with things like machines and furnaces?
Unless I'm being oblivious, I see no way to allow this. If it doesn't exist, maybe add something like:
/area_interactall
/area_interact playername
First one allowing anyone to interact. Second to only allow one player to interact but not let them be an owner.
I want to protect a very large tunnel, over 7k nodes long.
Will protecting such a huge area impact the performance or even crash the server?
Hi below log from server crash, maybe an idea what could go wrong ?
2018-01-07 13:54:51: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback on_playerReceiveFields(): Invalid float vector dimension range 'x' (expected -2.14748e+06 < x < 2.14748e+06 got 1.00001e+07).
2018-01-07 13:54:51: ERROR[Main]: stack traceback:
2018-01-07 13:54:51: ERROR[Main]: [C]: in function 'get_areas_for_pos'
2018-01-07 13:54:51: ERROR[Main]: /root/.minetest/mods/areas/api.lua:22: in function 'getAreasAtPos'
2018-01-07 13:54:51: ERROR[Main]: /root/.minetest/mods/areas/api.lua:76: in function 'canInteract'
2018-01-07 13:54:51: ERROR[Main]: /root/.minetest/mods/areas/interact.lua:4: in function 'old_is_protected'
2018-01-07 13:54:51: ERROR[Main]: /root/.minetest/mods/basic_machines/protect.lua:12: in function 'is_protected'
2018-01-07 13:54:51: ERROR[Main]: /root/.minetest/mods/basic_machines/mover.lua:2257: in function 'func'
2018-01-07 13:54:51: ERROR[Main]: /usr/share/minetest/builtin/profiler/instrumentation.lua:106: in function </usr/share/minetest/builtin/profiler/instrumentation.lua:100>
2018-01-07 13:54:51: ERROR[Main]: /usr/share/minetest/builtin/game/register.lua:412: in function </usr/share/minetest/builtin/game/register.lua:392>
/area_info: "You can protect areas spanning up to 64x128x64."
/list_areas: (-32,-64,-32) (32,64,32)
markers:land_title_register: "It spans 65x65 = 4225 m^2. Height: 129 m."
Now, I can see how this might be deliberate to make mental maths easier, but one of those two statements is wrong - either the spanning is 65x129x65 (perhaps written as +/-32,+/-64,+/-32) or the protection should be one less.
using minetest.place_node in a protected area even when owned by the player does not work at all
Bluelobster server crashed when CWz tried to do an extremely large protection (the whole sky above y=200 I think). Maybe that wasn't a good idea, but here are the errors generated in debug.txt:
11:48:51: ERROR[main]: ERROR: An unhandled exception occurred: createSector(): pos. over limit
11:48:51: ERROR[main]: stack traceback:
11:48:51: ERROR[main]: [C]: in function 'add_entity'
11:48:51: ERROR[main]: ...inetest/bin/../games/bluelobster_game/mods/areas/pos.lua:209: in function 'markPos2'
11:48:51: ERROR[main]: ...inetest/bin/../games/bluelobster_game/mods/areas/pos.lua:139: in function 'setPos2'
11:48:51: ERROR[main]: ...inetest/bin/../games/bluelobster_game/mods/areas/pos.lua:81: in function 'func'
11:48:51: ERROR[main]: ...chaoswormz/minetest/bin/../builtin/game/chatcommands.lua:40: in function <...chaoswormz/minetest/bin/../builtin/game/chatcommands.lua:29>
11:48:51: ERROR[main]: /home/chaoswormz/minetest/bin/../builtin/game/register.lua:341: in function </home/chaoswormz/minetest/bin/../builtin/game/register.lua:329>
I haven't looked at the lines referenced yet, but maybe you could point me in the right direction for why it crashed?
Thanks,
deezl
Feature for some users to be allowed to exceed areas.self_protection_max_areas
We've had a few crashes lately that seem to be caused by the same issue in Areas.
minetestserver_2014_07_14.log:04:46:30: ERROR[main]: ERROR: An unhandled exception occurred: ...inetest-0.4.9/bin/../mods/areas_2014_06_23/areas/api.lua:5: attempt to index local 'pos' (a nil value)
Here is a pastebin of the error sections from our logs:
http://pastebin.com/5N4b7rA5
If that fails, below is the same info.
Areas is a great mod. I hope this helps to improve it. ;)
Here are the error sections from our server logs:
minetestserver_2014_07_14.log-PLAYER JOINED: KAYATA
minetestserver_2014_07_14.log-04:43:46: ACTION[ServerThread]: Player KAYATA moved too fast; resetting position
minetestserver_2014_07_14.log-04:45:32: ACTION[ServerThread]: srifqi uses bucket:bucket_empty, pointing at [node under=524,1,148 above=524,2,148]
minetestserver_2014_07_14.log-04:46:01: ACTION[ServerThread]: srifqi digs flowers:waterlily_675 at (525,2,146)
minetestserver_2014_07_14.log-04:46:07: ACTION[ServerThread]: Server: Player with the name "Admin" tried to connect from 149.135.3.224 but it was disallowed for the following reason: The name 'Admin' is disallowed on this server. Please choose another username and try again.
minetestserver_2014_07_14.log:04:46:30: ERROR[main]: ERROR: An unhandled exception occurred: ...inetest-0.4.9/bin/../mods/areas_2014_06_23/areas/api.lua:5: attempt to index local 'pos' (a nil value)
minetestserver_2014_07_14.log-04:46:30: ERROR[main]: stack traceback:
minetestserver_2014_07_14.log:04:46:30: ERROR[main]: ...inetest-0.4.9/bin/../mods/areas_2014_06_23/areas/api.lua:5: in function 'getAreasAtPos'
minetestserver_2014_07_14.log-04:46:30: ERROR[main]: ...test-0.4.9/bin/../mods/areas_2014_06_23/areas/legacy.lua:101: in function 'HasOwner'
minetestserver_2014_07_14.log-04:46:30: ERROR[main]: ...4.9/bin/../mods/plantlife_2014_05_25/plants_lib/init.lua:448: in function 'node_is_owned'
minetestserver_2014_07_14.log-04:46:30: ERROR[main]: ...9/bin/../mods/plantlife_2014_05_25/flowers_plus/init.lua:97: in function <...9/bin/../mods/plantlife_2014_05_25/flowers_plus/init.lua:74>
minetestserver_2014_07_14.log-
minetestserver_2014_07_14.log-In thread 7fa9fa19b780:
--
minetestserver_2014_07_15.log-15:58:08: ACTION[ServerThread]: oriol places node default:dirt at (593,21,652)
minetestserver_2014_07_15.log-15:58:08: ACTION[ServerThread]: oriol places node default:dirt at (593,21,655)
minetestserver_2014_07_15.log-15:58:08: ACTION[ServerThread]: oriol places node default:dirt at (593,21,654)
minetestserver_2014_07_15.log-15:58:10: ACTION[ServerThread]: oriol places node default:dirt at (593,21,657)
minetestserver_2014_07_15.log-15:58:10: ACTION[ServerThread]: oriol places node default:dirt at (593,21,656)
minetestserver_2014_07_15.log:15:58:15: ERROR[main]: ERROR: An unhandled exception occurred: ...inetest-0.4.9/bin/../mods/areas_2014_07_12/areas/api.lua:5: attempt to index local 'pos' (a nil value)
minetestserver_2014_07_15.log-15:58:15: ERROR[main]: stack traceback:
minetestserver_2014_07_15.log:15:58:15: ERROR[main]: ...inetest-0.4.9/bin/../mods/areas_2014_07_12/areas/api.lua:5: in function 'getAreasAtPos'
minetestserver_2014_07_15.log-15:58:15: ERROR[main]: ...test-0.4.9/bin/../mods/areas_2014_07_12/areas/legacy.lua:102: in function 'HasOwner'
minetestserver_2014_07_15.log-15:58:15: ERROR[main]: ...4.9/bin/../mods/plantlife_2014_05_25/plants_lib/init.lua:448: in function 'node_is_owned'
minetestserver_2014_07_15.log-15:58:15: ERROR[main]: ...9/bin/../mods/plantlife_2014_05_25/flowers_plus/init.lua:97: in function <...9/bin/../mods/plantlife_2014_05_25/flowers_plus/init.lua:74>
minetestserver_2014_07_15.log-
minetestserver_2014_07_15.log-In thread 7f13cf2ad780:
--
minetestserver_2014_07_17.log-09:58:46: ACTION[ServerThread]: klappspaten digs moreblocks:super_glow_glass at (463,37,686)
minetestserver_2014_07_17.log-09:59:20: ACTION[ServerThread]: Server: Player with the name "Guest5946" tried to connect from 212.215.201.82 but it was disallowed for the following reason: Guest accounts are disallowed on this server. Please choose a proper username and try again.
minetestserver_2014_07_17.log-09:59:36: ACTION[ServerThread]: fabri digs homedecor:glowlight_small_cube_yellow at (-1974,12,3004)
minetestserver_2014_07_17.log-10:00:06: ACTION[ServerThread]: citygot times out. List of players: ubuntuyou fabri klappspaten
minetestserver_2014_07_17.log-10:01:51: ACTION[ServerThread]: player fabri crafts farming:flour
minetestserver_2014_07_17.log:10:01:55: ERROR[main]: ERROR: An unhandled exception occurred: ...inetest-0.4.9/bin/../mods/areas_2014_07_15/areas/api.lua:5: attempt to index local 'pos' (a nil value)
minetestserver_2014_07_17.log-10:01:55: ERROR[main]: stack traceback:
minetestserver_2014_07_17.log:10:01:55: ERROR[main]: ...inetest-0.4.9/bin/../mods/areas_2014_07_15/areas/api.lua:5: in function 'getAreasAtPos'
minetestserver_2014_07_17.log-10:01:55: ERROR[main]: ...test-0.4.9/bin/../mods/areas_2014_07_15/areas/legacy.lua:102: in function 'HasOwner'
minetestserver_2014_07_17.log-10:01:55: ERROR[main]: ...4.9/bin/../mods/plantlife_2014_05_25/plants_lib/init.lua:448: in function 'node_is_owned'
minetestserver_2014_07_17.log-10:01:55: ERROR[main]: ...9/bin/../mods/plantlife_2014_05_25/flowers_plus/init.lua:197: in function <...9/bin/../mods/plantlife_2014_05_25/flowers_plus/init.lua:174>
minetestserver_2014_07_17.log-
minetestserver_2014_07_17.log-In thread 7ff35b00f780:
Hi,
it would be quite helpful, if on mobile (phone) the Area Description can be hidden, as it's (when the Area Name, or the Area Owner's Name, 'is long enough') overlappin' the Inventory preview of the Slots (8 Slots, not this 'Mod' with the '16' shown).
Maybe a button on the very left-bottom side(?), so it can be toggled?
Regards,
Johannes
I was protecting an area with pipeworks:deployers in the corners. It would not work until I replaced the deployers with some standard node and put them back after protecting area.
I dont know any detailed information, howto reproduce, I have only this crashlog:
18:12:55: ERROR[main]: ERROR: An unhandled exception occurred: /home/bukkit/minetest/bin/../mods/areas/api.lua:5: attempt to index local 'pos' (a nil value)
18:12:55: ERROR[main]: stack traceback:
18:12:55: ERROR[main]: /home/bukkit/minetest/bin/../mods/areas/api.lua:5: in function 'getAreasAtPos'
18:12:55: ERROR[main]: /home/bukkit/minetest/bin/../mods/areas/api.lua:23: in function 'canInteract'
18:12:55: ERROR[main]: /home/bukkit/minetest/bin/../mods/areas/interact.lua:4: in function 'is_protected'
18:12:55: ERROR[main]: ...kit/minetest/bin/../mods/plantlife/flowers_plus/init.lua:97: in function <...kit/minetest/bin/../mods/plantlife/flowers_plus/init.lua:74>
Currently there's a very simple hard-coded criterion in
chatcommands.lua:402: if area.owner == name then
internal.lua:241: if area.owner == name then
As far as I can tell, those places count the number of owned areas, to check whether players exceed the maximum number of allowed areas.
I'm trying to maintain a mod that changes those lines to add additional criteria. It's duplicate code there, and here. Could we factor out those criteria into a function areas:isLiableLandlordOf(landlordCandidateName, area)
?
That way, the function could easily be changed from the outside.
If an areas-admin invokes /list_areas
with around +10k areas available the server crashes with a String too long
message:
2021-02-17 08:57:14: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback on_chat_message(): String too long
2021-02-17 08:57:14: ERROR[Main]: stack traceback:
2021-02-17 08:57:14: ERROR[Main]: [C]: in function 'chat_send_player'
2021-02-17 08:57:14: ERROR[Main]: ...st/minetest-5.2.0-dev-linux/bin/../builtin/game/chat.lua:71: in function <...st/minetest-5.2.0-dev-linux/bin/../builtin/game/chat.lua:48>
2021-02-17 08:57:14: ERROR[Main]: ...inetest-5.2.0-dev-linux/bin/../builtin/game/register.lua:429: in function <...inetest-5.2.0-dev-linux/bin/../builtin/game/register.lua:413>
A possible solution would be just to truncate the list to a (sane?) amount or display an error message instead.
Related: #40
A user on my server caused this crash, while trying to dye some asphalt (which is not colorable) -- not in an owned area. This looks like an areas mod crash, so filing it here.
I suspect this has something to do with these various nil
exceptions that have been added to Minetest/minetest_game recently.
2018-08-02 10:25:09: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback item_OnUse(): Invalid position (expected table got nil).
2018-08-02 10:25:09: ERROR[Main]: stack traceback:
2018-08-02 10:25:09: ERROR[Main]: [C]: in function 'get_areas_for_pos'
2018-08-02 10:25:09: ERROR[Main]: .../.minetest/worlds/Building_World/worldmods/areas/api.lua:22: in function 'getAreasAtPos'
2018-08-02 10:25:09: ERROR[Main]: .../.minetest/worlds/Building_World/worldmods/areas/api.lua:76: in function 'canInteract'
2018-08-02 10:25:09: ERROR[Main]: ...etest/worlds/Building_World/worldmods/areas/interact.lua:4: in function 'is_protected'
2018-08-02 10:25:09: ERROR[Main]: ...est/worlds/Building_World/worldmods/unifieddyes/init.lua:568: in function <...est/worlds/Building_World/worldmods/unifieddyes/init.lua:563>
2018-08-02 10:25:09: ERROR[Main]: stack traceback:
2018-08-02 10:25:09: ERROR[Main]: [C]: in function 'get_areas_for_pos'
2018-08-02 10:25:09: ERROR[Main]: .../.minetest/worlds/Building_World/worldmods/areas/api.lua:22: in function 'getAreasAtPos'
2018-08-02 10:25:09: ERROR[Main]: .../.minetest/worlds/Building_World/worldmods/areas/api.lua:76: in function 'canInteract'
2018-08-02 10:25:09: ERROR[Main]: ...etest/worlds/Building_World/worldmods/areas/interact.lua:4: in function 'is_protected'
2018-08-02 10:25:09: ERROR[Main]: ...est/worlds/Building_World/worldmods/unifieddyes/init.lua:568: in function <...est/worlds/Building_World/worldmods/unifieddyes/init.lua:563>
Protecting areas from players being able to place entities in them should be something that this mod includes.
Note: This should include protection against the placement of entities from APercy's mods. I was told this was gonna be tricky.
2022-08-22 16:46:37: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod '' in callback item_OnPlace(): .../bin/../mods/areas/interact.lua:14: bad argument #1 to 'chat_send_player' (string expected, got userdata)
2022-08-22 16:46:37: ERROR[Main]: stack traceback:
2022-08-22 16:46:37: ERROR[Main]: [C]: in function 'chat_send_player'
2022-08-22 16:46:37: ERROR[Main]: .../bin/../mods/areas/interact.lua:14: in function 'func'
2022-08-22 16:46:37: ERROR[Main]: .../bin/../builtin/game/misc.lua:180: in function 'record_protection_violation'
2022-08-22 16:46:37: ERROR[Main]: .../bin/../mods/handholds_redo/lib/utility.lua:48: in function 'place_holds'
2022-08-22 16:46:37: ERROR[Main]: .../bin/../mods/handholds_redo/init.lua:21: in function <.../bin/../mods/handholds_redo/init.lua:20>
hello
the area.dat file is maybe (deleted) but I think more like overridden just by last new entry made from a gamer with /protect ... .
I didn't change anything at file , it worked well, but since about one week ago,
and today I see live that this happen just after a new entry had been made.
Is there a limit in size ? 78.6 kb
entries ?
or if someone own an area (player) is deleted by the [mod] minetest_cleaner ?
Add assigning areas to groups to enable easier faster and easier group projects setup
The hack that I used to guess the text height for the area list display on the HUD is computed based on the server's font_size
setting. This works fine in singleplayer but it will break in multiplayer if a client has a different font_size
setting than the server.
The ideal solution for this would be support for bottom-alignment (and right-alignment, for completeness) of text in the core.
As an admin, using the /list_areas command will give me a long list of all the areas on the server, which, after a certain number of areas, will scroll off the chat buffer, leaving me unable to get information on those areas. I would like an option to add an area number or range of areas, like /list_areas 25-74 or /list_areas 98.
It would be so handy if you could actually see the area like the way worldEdit or postool work, and not just position 1 and 2
Title says it all.
Hi,
I would like to package areas for Debian, but you don't tag releases and I'm pretty uncomfortable packaging a random commit : could you do that?
As a bonus, when you'll tag your releases, I'll be notified there's a new version and be able to update faster.
Thanks,
Snark on #debian-games
Hello,
I'm using this mod on a server running Minetest Game to protect an area. Now I'm thinking about installing mods to add mobs, but I was wondering: will this mod also protect the area from damages caused by mobs?
Thank you for the information,
GTP
Steps to reproduce:
Do /area_faction_open <ID>
, log out, log back in.
Expected:
Open status is saved
Current:
Area is not open after logging back in.
Server: EdenLost, running multicraft-2.0.0
will lock up hard (with 100% CPU usage for the server thread) if a regular player (ex: "1hit") issues /list_areas
. The same command does not lockup when a full admin ("sysadmin") runs it (a huge list of areas is returned though, for every player).
1hit@EdgyNet:~$ sqlite3 -column ./worlds/world/auth.sqlite \
"select a.name, up.privilege from auth a, user_privileges up \
where (a.id = up.id) and (a.name in ('1hit', 'sysadmin')) and (up.privilege like '%area%');"
1hit area_high_limit
1hit area_protect
1hit areas_high_limit
1hit areas_protect
sysadmin areas
sysadmin areas_high_limit
sysadmin pvp_areas_admin
I granted areas
priv to 1hit and retried /list_areas
as 1hit, and the server no longer locked up.
I don't know why 1hit has seemingly duplicate privs of area_high_limit
, area_protect
vs areas_high_limit
. I'll audit privs offline soon. Maybe the priv name changed, or maybe I screwed something up earlier. Players other than 1hit can lock up the server by issuing /list_areas
and they only have the areas_protect
priv and none of the others.
So it seems that anyone lacking areas
, who issues /list_areas
on multitest-2.0.0 with the latest version of this areas mod can lock up the server. I do not think that this is the same as issue #51.
There should be a way to change what kind of protection you get. Currently, if someone puts a light switch in a protected area, nobody else can use the light switch, but if they place a mesecons lever or button, others can use it. Players should be able to change protection settings, like:
This could be done by adding the ability to edit "flags" or settings, perhaps though a command like /area_settings [area ID].
This would be useful in allowing people to choose what kind of protections they want, and should also enhance protection experience.
Lnked to this issue MinetestForFun/server-minetestforfun#194
The idea is to give the possibility for an area to set a name instead of a list of users of the area, or set an option to hide just for one area the player names of the area
Thank you in advance.
It could be a great tool to keep servers clean by stopping people from being able to interact with unclaimed nodes and server griefing.
I am using the mod in my server but It is a bit buggy isn't it? Players can easily wall through the blocks via breaking blocks and just moving towards.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.