[Mod] Protector Redo [3.2] [protector]

User avatar
MeseCraft
Member
Posts: 30
Joined: Wed Nov 04, 2020 22:52

Re: [Mod] Protector Redo [3.2] [protector]

by MeseCraft » Post

Hi TenPlus1,

I saw in the commitnotes that this worked with the playerfactions mod, however, when I went to use it, right clicking on the protector produced a fatal crash:

Code: Select all

2020-12-24 18:21:44: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback item_OnPlace(): ...e/games/minetest/games/mesecraft/mods/protector/init.lua:176: bad argument #1 to 'next' (table expected, got nil)
2020-12-24 18:21:44: ERROR[Main]: stack traceback:
2020-12-24 18:21:44: ERROR[Main]:       [C]: in function 'next'
2020-12-24 18:21:44: ERROR[Main]:       ...e/games/minetest/games/mesecraft/mods/protector/init.lua:176: in function 'protector_formspec'
2020-12-24 18:21:44: ERROR[Main]:       ...e/games/minetest/games/mesecraft/mods/protector/init.lua:504: in function 'on_rightclick'
2020-12-24 18:21:44: ERROR[Main]:       /usr/share/games/minetest/builtin/game/item.lua:426: in function </usr/share/games/minetest/builtin/game/item.lua:419>
MeseCraft Website: https://www.mesecraft.net

User avatar
MeseCraft
Member
Posts: 30
Joined: Wed Nov 04, 2020 22:52

Re: [Mod] Protector Redo [3.2] [protector]

by MeseCraft » Post

MisterE and I were able to patch a quick fix.

https://notabug.org/MeseCraft/mesecraft ... #L176-L180
MeseCraft Website: https://www.mesecraft.net

User avatar
MeseCraft
Member
Posts: 30
Joined: Wed Nov 04, 2020 22:52

Re: [Mod] Protector Redo [3.2] [protector]

by MeseCraft » Post

Another when player2 punching the protector owned and shared by player1.

Code: Select all

2020-12-24 19:25:55: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback node_on_punch(): /usr/share/games/minetest/builtin/game/auth.lua:13: assertion failed!
2020-12-24 19:25:55: ERROR[Main]: stack traceback:
2020-12-24 19:25:55: ERROR[Main]:       [C]: in function 'assert'
2020-12-24 19:25:55: ERROR[Main]:       /usr/share/games/minetest/builtin/game/auth.lua:13: in function 'get_auth'
2020-12-24 19:25:55: ERROR[Main]:       /usr/share/games/minetest/builtin/game/misc.lua:87: in function 'player_exists'
2020-12-24 19:25:55: ERROR[Main]:       ...es/minetest/games/mesecraft/mods/playerfactions/init.lua:51: in function 'player_is_in_faction'
2020-12-24 19:25:55: ERROR[Main]:       ...e/games/minetest/games/mesecraft/mods/protector/init.lua:87: in function 'is_member'
2020-12-24 19:25:55: ERROR[Main]:       ...e/games/minetest/games/mesecraft/mods/protector/init.lua:312: in function 'can_dig'
2020-12-24 19:25:55: ERROR[Main]:       ...e/games/minetest/games/mesecraft/mods/protector/init.lua:363: in function 'is_protected'
2020-12-24 19:25:55: ERROR[Main]:       ...e/games/minetest/games/mesecraft/mods/protector/init.lua:512: in function <...e/games/minetest/games/mesecraft/mods/protector/init.lua:510>
Last edited by MeseCraft on Fri Dec 25, 2020 01:54, edited 1 time in total.
MeseCraft Website: https://www.mesecraft.net

User avatar
MeseCraft
Member
Posts: 30
Joined: Wed Nov 04, 2020 22:52

Re: [Mod] Protector Redo [3.2] [protector]

by MeseCraft » Post

Another when player2 placing inside a protector owned and shared by player1.

Code: Select all

2020-12-24 19:33:31: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback item_OnPlace(): /usr/share/games/minetest/builtin/game/auth.lua:13: assertion failed!
2020-12-24 19:33:31: ERROR[Main]: stack traceback:
2020-12-24 19:33:31: ERROR[Main]:       [C]: in function 'assert'
2020-12-24 19:33:31: ERROR[Main]:       /usr/share/games/minetest/builtin/game/auth.lua:13: in function 'get_auth'
2020-12-24 19:33:31: ERROR[Main]:       /usr/share/games/minetest/builtin/game/misc.lua:87: in function 'player_exists'
2020-12-24 19:33:31: ERROR[Main]:       ...es/minetest/games/mesecraft/mods/playerfactions/init.lua:51: in function 'player_is_in_faction'
2020-12-24 19:33:31: ERROR[Main]:       ...e/games/minetest/games/mesecraft/mods/protector/init.lua:87: in function 'is_member'
2020-12-24 19:33:31: ERROR[Main]:       ...e/games/minetest/games/mesecraft/mods/protector/init.lua:312: in function 'can_dig'
2020-12-24 19:33:31: ERROR[Main]:       ...e/games/minetest/games/mesecraft/mods/protector/init.lua:363: in function 'is_protected'
2020-12-24 19:33:31: ERROR[Main]:       /usr/share/games/minetest/builtin/game/item.lua:299: in function 'item_place_node'
2020-12-24 19:33:31: ERROR[Main]:       /usr/share/games/minetest/builtin/common/misc_helpers.lua:340: in function </usr/share/games/minetest/builtin/common/misc_helpers.lua:286>
MeseCraft Website: https://www.mesecraft.net

User avatar
MeseCraft
Member
Posts: 30
Joined: Wed Nov 04, 2020 22:52

Re: [Mod] Protector Redo [3.2] [protector]

by MeseCraft » Post

MisterE did most of this, he said I'll try to make an issue in your repo.

We were able to resolve the problems as far as we can tell and its working well now. Ended up with a protector init file as below that is working correctly with playerfactions and protector.

https://notabug.org/MeseCraft/mesecraft ... r/init.lua
MeseCraft Website: https://www.mesecraft.net

User avatar
MeseCraft
Member
Posts: 30
Joined: Wed Nov 04, 2020 22:52

Re: [Mod] Protector Redo [3.2] [protector]

by MeseCraft » Post

now a conflict with mobs redo
2020-12-24 20:11:40: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback LuaABM::trigger(): ...e/games/minetest/games/mesecraft/mods/protector/init.lua:85: bad argument #1 to 'ipairs' (table expected, got boolean)
2020-12-24 20:11:40: ERROR[Main]: stack traceback:
2020-12-24 20:11:40: ERROR[Main]: [C]: in function 'ipairs'
2020-12-24 20:11:40: ERROR[Main]: ...e/games/minetest/games/mesecraft/mods/protector/init.lua:85: in function 'is_member'
2020-12-24 20:11:40: ERROR[Main]: ...e/games/minetest/games/mesecraft/mods/protector/init.lua:312: in function 'can_dig'
2020-12-24 20:11:40: ERROR[Main]: ...e/games/minetest/games/mesecraft/mods/protector/init.lua:363: in function 'is_protected'
2020-12-24 20:11:40: ERROR[Main]: ...re/games/minetest/games/mesecraft/mods/mobs_redo/api.lua:3935: in function 'spawn_action'
2020-12-24 20:11:40: ERROR[Main]: ...re/games/minetest/games/mesecraft/mods/mobs_redo/api.lua:4015: in function <...re/games/minetest/games/mesecraft/mods/mobs_redo/api.lua:4014>
MeseCraft Website: https://www.mesecraft.net

User avatar
MeseCraft
Member
Posts: 30
Joined: Wed Nov 04, 2020 22:52

Re: [Mod] Protector Redo [3.2] [protector]

by MeseCraft » Post

MeseCraft Website: https://www.mesecraft.net

User avatar
TenPlus1
Member
Posts: 2962
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Update:

by TenPlus1 » Post

- Player Factions issue fixed (thanks MisterE)
- Protector display removal tidied up

Git and ContentDB both updated :)

User avatar
MeseCraft
Member
Posts: 30
Joined: Wed Nov 04, 2020 22:52

Re: [Mod] Protector Redo [3.2] [protector]

by MeseCraft » Post

Merry Christmas everyone!

I woke up this morning to a new bug but it's within the scope of playerfactions so I'll report it within that thread. Translate is not working.
MeseCraft Website: https://www.mesecraft.net

hlqkj
Member
Posts: 23
Joined: Wed Dec 11, 2019 20:10
GitHub: hlqkj
IRC: hlqkj
In-game: hlqkj

Re: [Mod] Protector Redo [3.2] [protector]

by hlqkj » Post

Hello, and happy new year to everyone!

Being inspired by the areas-based protection, where you can set an area name and have it displayed on the hud, I thought that would be nice to have the same feature in the protector mod too! :)

The use case that gave me this idea is a player that's building beautiful PoIs and he nicely names them too, though the only place those names are displayed are in poorly-visible signs at their entrances.

I think it should easily be feasible by adding a new text field to the protector formspec and adding that field value to the hud too, where it already shows the owner.

The placer tool would also need to copy the value as it does with members when used with sneak pressed.

What do you think about this?
Quando omni flunkus, moritati.

User avatar
TenPlus1
Member
Posts: 2962
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Protector Redo [3.2] [protector]

by TenPlus1 » Post

@hlqkj - Protector Redo already displays the owner's name in the bottom left of the screen using HUD and placing a protector using the tool while holding sneak already copies all of the members across to the new one.

hlqkj
Member
Posts: 23
Joined: Wed Dec 11, 2019 20:10
GitHub: hlqkj
IRC: hlqkj
In-game: hlqkj

Re: [Mod] Protector Redo [3.2] [protector]

by hlqkj » Post

TenPlus1 wrote:
Sun Jan 03, 2021 08:17
@hlqkj - Protector Redo already displays the owner's name in the bottom left of the screen using HUD and placing a protector using the tool while holding sneak already copies all of the members across to the new one.
I know all this of course, indeed, I wasn't talking about the player name but the "area name", that is an additional text field that players could use to name their places...

Note that this wasn't meant to be a feature request, rather more like an opinion poll :)
Quando omni flunkus, moritati.

User avatar
TenPlus1
Member
Posts: 2962
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Protector Redo [3.2] [protector]

by TenPlus1 » Post

Ah okie :P

User avatar
Miniontoby
Member
Posts: 462
Joined: Fri Mar 01, 2019 19:25
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [Mod] Protector Redo [3.2] [protector]

by Miniontoby » Post

I got an public server, but some user spammed the protector block all over the island,

How to remove all the blocks and the areas?
My English isn't very good because I'm Dutch ---- Check my mod "Doorbell"

User avatar
TenPlus1
Member
Posts: 2962
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Protector Redo [3.2] [protector]

by TenPlus1 » Post

Admin can remove protection blocks by using the command: /protector_remove <name>

User avatar
Miniontoby
Member
Posts: 462
Joined: Fri Mar 01, 2019 19:25
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [Mod] Protector Redo [3.2] [protector]

by Miniontoby » Post

TenPlus1 wrote:
Sun Feb 14, 2021 21:03
Admin can remove protection blocks by using the command: /protector_remove <name>

thanks, that worked
My English isn't very good because I'm Dutch ---- Check my mod "Doorbell"

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests