Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bug with commas in palantir name #668

Merged
merged 1 commit into from
Jul 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions mods/_lott/lottblocks/locale/ru.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ Network Name = Клан палантиров
Palantir Name = Имя палантира
Both the network and the palantir must have a name!! = Клан и Палантир должны иметь имя!!
Palantir cannot use reserved name! = Палантир не может иметь зарезервированное имя!
Palantir cannot have commas in its name!=Палантир не должен содержать запятые в имени!
Someone else has a network with this name! = Кто-то уже создал такой клан!
A palantir already exists on this network with the same name! = В этом клане уже есть палантир с таким именем!
The palantiri is no longer anchored to the world! = Палантир больше не привязан к миру!
Expand Down
5 changes: 5 additions & 0 deletions mods/_lott/lottblocks/palantiri.lua
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,11 @@ minetest.register_node("lottblocks:palantir", {
minetest.colorize("red", SL("Palantir cannot use reserved name!")))
return
end
if string.find(fields.palantir, ",") then
minetest.chat_send_player(player_name, minetest.colorize("red",
SL("Palantir cannot have commas in its name!")))
return
end
if not lottblocks.palantiri[fields.network] then
lottblocks.palantiri[fields.network] = {}
lottblocks.palantiri[fields.network].owner = player_name
Expand Down