add additional check for correct game

This commit is contained in:
𝘋𝘪𝘳𝘬 2023-08-05 00:13:21 +02:00
parent 3d5c80f629
commit e630a71de8
Signed by: dirk
GPG Key ID: F44E7467B12D6707
3 changed files with 8 additions and 1 deletions

View File

@ -18,6 +18,7 @@ local regpath = modpath..DIR_DELIM..'registry'..DIR_DELIM
-- Initiante global table
ladders_3d = {
game = minetest.get_game_info(),
worldconfig = Settings(get_worldpath()..DIR_DELIM..'_ladders_3d.conf'),
translator = minetest.get_translator(modname)
}

View File

@ -5,6 +5,11 @@
-- @see default.override_ladders.lua
-- Make sure to only run if the currently running games ID is `minetest`
-- which is “Minetest Game”.
if ladders_3d.game.id ~= 'minetest' then return end
local S = ladders_3d.translator
local texture = '(+base^(+mask^[opacity:+opacity))'
local image = '((+texture)^[mask:+mask)'

View File

@ -11,8 +11,9 @@
-- Forums: https://forum.minetest.net/viewtopic.php?t=24297
-- Load when unconfigured or explicitly enabled
-- Load when unconfigured or explicitly enabled and if game ID is `minetest`
if ladders_3d.option('override_default_ladders', true) ~= true then return end
if ladders_3d.game.id ~= 'minetest' then return end
-- Minetest Games default laders