Silence various undeclared variable warnings
scaffold: 2021-08-18 22:42:54: WARNING[Main]: Assignment to undeclared global "sdir" inside a function at scaffold:/railscaffold.lua:151. incrementaltp: Fix this by adding `optional_depends` to `mod.conf` 2021-08-18 22:52:39: WARNING[Main]: Undeclared global variable "autofly" accessed at incrementaltp:init.lua:85 2021-08-18 22:52:39: WARNING[Main]: Undeclared global variable "autofly" accessed at incrementaltp:init.lua:87 dte: 2021-08-18 22:59:26: WARNING[Main]: Assignment to undeclared global "_" inside a function at dte:init.lua:375. tchat: Use `get_modpath('wisp')` to fix this 2021-08-18 23:21:20: WARNING[Main]: Undeclared global variable "wisp" accessed at tchat:init.lua:537
This commit is contained in:
parent
4669d8bc95
commit
76db810cca
@ -372,6 +372,7 @@ end
|
||||
local function load_UI(name) -- open/create a ui file
|
||||
current_ui_file = name
|
||||
modstorage:set_string("_GUI_editor_selected_file", current_ui_file)
|
||||
local _
|
||||
_, widgets = pcall(loadstring("return "..modstorage:get_string("_GUI_editor_file_"..current_ui_file)))
|
||||
if widgets == nil then
|
||||
widgets = {{type="Display", name="", width=5, height=5, width_param=false, height_param=false, left=0.5, top=0.5,
|
||||
|
4
clientmods/incrementaltp/mod.conf
Normal file
4
clientmods/incrementaltp/mod.conf
Normal file
@ -0,0 +1,4 @@
|
||||
name = incrementaltp
|
||||
author = cora
|
||||
description = Teleport to a destination in increments
|
||||
optional_depends = autofly
|
@ -148,7 +148,7 @@ end,function() --stopfunc
|
||||
end,{'afly_axissnap','continuous_forward','autorefill'}) --'scaffold_ltbm'
|
||||
|
||||
ws.on_connect(function()
|
||||
sdir=storage:get_string('BOTDIR')
|
||||
local sdir=storage:get_string('BOTDIR')
|
||||
if sdir ~= "" then
|
||||
ws.set_dir(sdir)
|
||||
else
|
||||
|
@ -130,6 +130,9 @@ local message_to = minetest.settings:get("tchat_prefix_send")
|
||||
local team_mode = minetest.settings:get_bool("tchat_team_mode")
|
||||
|
||||
local use_wisp = minetest.settings:get_bool("tchat_use_wisp")
|
||||
if minetest.get_modpath('wisp') == nil then
|
||||
use_wisp = false
|
||||
end
|
||||
|
||||
local hide_sent = minetest.settings:get_bool("tchat_hide_sent")
|
||||
local blacklist = string.split(minetest.settings:get("tchat_blacklist"))
|
||||
@ -320,7 +323,7 @@ end
|
||||
|
||||
|
||||
local function dm(player, message)
|
||||
if wisp == nil or not use_wisp then
|
||||
if not use_wisp then
|
||||
minetest.send_chat_message("/msg " .. player .." " .. message)
|
||||
else
|
||||
wisp.send(player, message, true)
|
||||
@ -534,7 +537,7 @@ table.insert(minetest.registered_on_receiving_chat_message, 1, function(message)
|
||||
end
|
||||
end)
|
||||
|
||||
if wisp ~= nil then
|
||||
if use_wisp then
|
||||
wisp.register_on_receive_split(function(player, message)
|
||||
if message:find(message_prefix) then
|
||||
tchat.chat_append("E " .. player .. ": " .. clean_message(message))
|
||||
|
@ -1,3 +1,4 @@
|
||||
name = tchat
|
||||
author = cora, system32
|
||||
description = Adds a team chat and prevents accidental sending of coordinates. Supports Wisp for encrypting messages.
|
||||
optional_depends = wisp
|
||||
|
Loading…
x
Reference in New Issue
Block a user