more THEMERM and THEMERMFILL
Give a little more information if environment variable THEMERM or THEMERMFILL has an invalid value.
This commit is contained in:
+9
-2
@@ -982,15 +982,22 @@ end
|
|||||||
function pre_themerooms_generate()
|
function pre_themerooms_generate()
|
||||||
local debug_themerm = nh.debug_themerm(false)
|
local debug_themerm = nh.debug_themerm(false)
|
||||||
local debug_fill = nh.debug_themerm(true)
|
local debug_fill = nh.debug_themerm(true)
|
||||||
|
local xtrainfo = ""
|
||||||
debug_rm_idx = lookup_by_name(debug_themerm, false)
|
debug_rm_idx = lookup_by_name(debug_themerm, false)
|
||||||
debug_fill_idx = lookup_by_name(debug_fill, true)
|
debug_fill_idx = lookup_by_name(debug_fill, true)
|
||||||
if debug_themerm ~= nil and debug_rm_idx == nil then
|
if debug_themerm ~= nil and debug_rm_idx == nil then
|
||||||
|
if lookup_by_name(debug_themerm, true) ~= nil then
|
||||||
|
xtrainfo = "; it is a fill type"
|
||||||
|
end
|
||||||
pline("Warning: themeroom '"..debug_themerm
|
pline("Warning: themeroom '"..debug_themerm
|
||||||
.."' not found in themerooms", true)
|
.."' not found in themerooms"..xtrainfo, true)
|
||||||
end
|
end
|
||||||
if debug_fill ~= nil and debug_fill_idx == nil then
|
if debug_fill ~= nil and debug_fill_idx == nil then
|
||||||
|
if lookup_by_name(debug_fill, false) ~= nil then
|
||||||
|
xtrainfo = "; it is a room type"
|
||||||
|
end
|
||||||
pline("Warning: themeroom fill '"..debug_fill
|
pline("Warning: themeroom fill '"..debug_fill
|
||||||
.."' not found in themeroom_fills", true)
|
.."' not found in themeroom_fills"..xtrainfo, true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -990,7 +990,7 @@ nhl_get_debug_themerm_name(lua_State *L)
|
|||||||
lua_pop(L, 1);
|
lua_pop(L, 1);
|
||||||
if (wizard)
|
if (wizard)
|
||||||
dbg_themerm = getenv(is_fill ? "THEMERMFILL" : "THEMERM");
|
dbg_themerm = getenv(is_fill ? "THEMERMFILL" : "THEMERM");
|
||||||
if (!dbg_themerm || strlen(dbg_themerm) == 0) {
|
if (!dbg_themerm || !*dbg_themerm) {
|
||||||
lua_pushnil(L);
|
lua_pushnil(L);
|
||||||
} else {
|
} else {
|
||||||
lua_pushstring(L, dbg_themerm);
|
lua_pushstring(L, dbg_themerm);
|
||||||
|
|||||||
Reference in New Issue
Block a user