aboutsummaryrefslogtreecommitdiff
Commit message (Expand)AuthorAge
...
* Translated using Weblate (Filipino)Krock2020-01-24
* Translated using Weblate (Thai)Krock2020-01-24
* Translated using Weblate (Lithuanian)Krock2020-01-24
* Translated using Weblate (Lao)Krock2020-01-24
* Translated using Weblate (Italian)Allan Nordhøy2020-01-24
* Translated using Weblate (Polish)Mateusz Mendel2020-01-24
* Translated using Weblate (Spanish)Vicente Carrasco Alvarez2020-01-24
* Translated using Weblate (Polish)Mateusz Mendel2020-01-24
* Translated using Weblate (Malay)Muhammad Nur Hidayat Yasuyoshi2020-01-24
* Translated using Weblate (Swedish)Mattias Münster2020-01-24
* Translated using Weblate (Italian)Jacques Lagrange2020-01-24
* Translated using Weblate (Hungarian)Ács Zoltán2020-01-24
* Translated using Weblate (Portuguese)ssantos2020-01-24
* Translated using Weblate (Japanese)BreadW2020-01-24
* Translated using Weblate (German)Wuzzy2020-01-24
* Translated using Weblate (German)nautilusx2020-01-24
* Translated using Weblate (Turkish)monolifed2020-01-24
* Translated using Weblate (Turkish)Oguz Ersen2020-01-24
* CMakeLists: Remove some redundant declarations and flagssfan52020-01-23
* Organize and sort out some library dependency issuessfan52020-01-23
* EnrichedString: Fix uninitialized variable m_default_lengthSmallJoker2020-01-23
* StaticText/EnrichedString: Styling support (#9187)SmallJoker2020-01-22
* Remove zh_* from GETTEXT_BLACKLISTED_LOCALES (#9229)Zaoqi2020-01-22
* Remove unused weight property from objects (#9320)Wuzzy2020-01-22
* Formspec: Don't start a button click when the pointer isn't on top (#9332)Hugues Ross2020-01-22
* Resized torchlike sprite now attaches to surface (#9303)Wuzzy2020-01-20
* lua_api.txt: Improve privs_to_string and string_to_privs documentation (#9228)ANAND2020-01-19
* Replace stray tab with whitespace in guiFormSpecMenu.cpp (#9317)ANAND2020-01-18
* Add Lua unit tests to builtin using busted (#9184)rubenwardy2020-01-18
* Fix syntax error in Dockerfilerubenwardy2020-01-17
* Make clipping of formspec elements more consistent (#9262)Hugues Ross2020-01-16
* Increase star count to 1000 and decrease radius slightly (#9307)lhofhansl2020-01-16
* Android: fix cyrillic characters, update iconv lib (#9117)Maksim2020-01-13
* Map download: Escape ':' to '_' (#9235)Montandalar2020-01-11
* Formspec: change the appeareance of the cursor on fields and co. (#8665)DS2020-01-11
* Add missing entity documentation (#9297)Wuzzy2020-01-09
* Improve Lua API documentation on sounds (#9265)Wuzzy2020-01-08
* Formspec: Fix clicking on tooltip-obstructed elements (#9266)DS2020-01-04
* Add table.key_value_swap (#9248)HybridDog2020-01-04
* Tweak default textures (#9237)Wuzzy2020-01-04
* Remove Mapgen V7 floatlands in preparation for new implementation (#9238)Paramat2020-01-04
* Use appropriate LC_ locale macro for Windows (#9230)Montandalar2019-12-24
* Fix item eat sound not played if last item (#9239)Wuzzy2019-12-24
* Document permissible group ratings (#9236)Wuzzy2019-12-24
* Allow wave_heights up to two nodes. #9220Lars Hofhansl2019-12-21
* Fix the player information version_string return value (#8616)Lejo2019-12-20
* /privs: Delimit output list of privs with commas (#9224)ANAND2019-12-20
* Builtin: Make dropped light_source nodes glow (#9200)Wuzzy2019-12-19
* Make core.item_place_node return position of placed node. (#7713)Bluebird2019-12-18
* Dockerfile: correct `apt clean` + git clone --depth 1 + remove .git (#8697)Zaoqi2019-12-17
"hl kwa">end core.registered_chatcommands[name] = chatcommand end local function format_help_line(cmd, def) local cmd_marker = INIT == "client" and "." or "/" local msg = core.colorize("#00ffff", cmd_marker .. cmd) if def.params and def.params ~= "" then msg = msg .. " " .. def.params end if def.description and def.description ~= "" then msg = msg .. ": " .. def.description end return msg end local function do_help_cmd(name, param) local opts, args = getopts("help", param) if not opts then return false, args end if #args > 1 then return false, S("Too many arguments, try using just /help <command>") end local use_gui = INIT ~= "client" and core.get_player_by_name(name) use_gui = use_gui and not opts:find("t") if #args == 0 and not use_gui then local cmds = {} for cmd, def in pairs(core.registered_chatcommands) do if INIT == "client" or core.check_player_privs(name, def.privs) then cmds[#cmds + 1] = cmd end end table.sort(cmds) local msg if INIT == "game" then msg = S("Available commands: @1", table.concat(cmds, " ")) .. "\n" .. S("Use '/help <cmd>' to get more " .. "information, or '/help all' to list " .. "everything.") else msg = core.gettext("Available commands: ") .. table.concat(cmds, " ") .. "\n" .. core.gettext("Use '.help <cmd>' to get more " .. "information, or '.help all' to list " .. "everything.") end return true, msg elseif #args == 0 or (args[1] == "all" and use_gui) then core.show_general_help_formspec(name) return true elseif args[1] == "all" then local cmds = {} for cmd, def in pairs(core.registered_chatcommands) do if INIT == "client" or core.check_player_privs(name, def.privs) then cmds[#cmds + 1] = format_help_line(cmd, def) end end table.sort(cmds) local msg if INIT == "game" then msg = S("Available commands:") else msg = core.gettext("Available commands:") end return true, msg.."\n"..table.concat(cmds, "\n") elseif INIT == "game" and args[1] == "privs" then if use_gui then core.show_privs_help_formspec(name) return true end local privs = {} for priv, def in pairs(core.registered_privileges) do privs[#privs + 1] = priv .. ": " .. def.description end table.sort(privs) return true, S("Available privileges:").."\n"..table.concat(privs, "\n") else local cmd = args[1] local def = core.registered_chatcommands[cmd] if not def then local msg if INIT == "game" then msg = S("Command not available: @1", cmd) else msg = core.gettext("Command not available: ") .. cmd end return false, msg else return true, format_help_line(cmd, def) end end end if INIT == "client" then core.register_chatcommand("help", { params = core.gettext("[all | <cmd>]"), description = core.gettext("Get help for commands"), func = function(param) return do_help_cmd(nil, param) end, }) else core.register_chatcommand("help", { params = S("[all | privs | <cmd>] [-t]"), description = S("Get help for commands or list privileges (-t: output in chat)"), func = do_help_cmd, }) end