mirror of
https://github.com/dvdvideo1234/TrackAssemblyTool.git
synced 2025-03-04 03:13:32 -05:00
Removed: First format argument for translations path
Changed: Translations relative to `LUA` instead of `GAME`
This commit is contained in:
parent
c69a3d1f26
commit
1773f51b06
@ -71,14 +71,12 @@ local propertiesCanBeTargeted = properties and properties.CanBeTargeted
|
||||
local constraintFindConstraints = constraint and constraint.FindConstraints
|
||||
local constraintFind = constraint and constraint.Find
|
||||
local controlpanelGet = controlpanel and controlpanel.Get
|
||||
local resourceAddSingleFile = resource and resource.AddSingleFile
|
||||
local duplicatorStoreEntityModifier = duplicator and duplicator.StoreEntityModifier
|
||||
local spawnmenuAddToolMenuOption = spawnmenu and spawnmenu.AddToolMenuOption
|
||||
|
||||
------------ INCLUDE LIBRARY ------------
|
||||
if(SERVER) then
|
||||
AddCSLuaFile("trackassembly/trackasmlib.lua")
|
||||
resourceAddSingleFile("trackassembly/trackasmlib.lua")
|
||||
end
|
||||
include("trackassembly/trackasmlib.lua")
|
||||
|
||||
@ -90,7 +88,7 @@ local asmlib = trackasmlib; if(not asmlib) then -- Module present
|
||||
------------ CONFIGURE ASMLIB ------------
|
||||
|
||||
asmlib.InitBase("track","assembly")
|
||||
asmlib.SetOpVar("TOOL_VERSION","8.653")
|
||||
asmlib.SetOpVar("TOOL_VERSION","8.654")
|
||||
asmlib.SetIndexes("V" ,1,2,3)
|
||||
asmlib.SetIndexes("A" ,1,2,3)
|
||||
asmlib.SetIndexes("WV",1,2,3)
|
||||
@ -114,7 +112,7 @@ local gsLangForm = asmlib.GetOpVar("FORM_LANGPATH")
|
||||
local gsLimitName = asmlib.GetOpVar("CVAR_LIMITNAME")
|
||||
local gtCallBack = asmlib.GetOpVar("TABLE_CALLBACK")
|
||||
local gsNoAnchor = gsNoID..gsSymRev..gsNoMD
|
||||
local gtTransFile = fileFind(gsLangForm:format("lua/", "*.lua"), "GAME")
|
||||
local gtTransFile = fileFind(gsLangForm:format("*.lua"), "LUA")
|
||||
local gsFullDSV = asmlib.GetOpVar("DIRPATH_BAS")..asmlib.GetOpVar("DIRPATH_DSV")..
|
||||
asmlib.GetInstPref()..asmlib.GetOpVar("TOOLNAME_PU")
|
||||
|
||||
@ -323,20 +321,14 @@ asmlib.SetOpVar("STRUCT_SPAWN",{
|
||||
}
|
||||
})
|
||||
|
||||
------------ TRANSLATIONS ------------
|
||||
|
||||
for iD = 1, #gtTransFile do
|
||||
local sNam = gsLangForm:format("", gtTransFile[iD])
|
||||
if(SERVER) then
|
||||
AddCSLuaFile(sNam)
|
||||
resourceAddSingleFile(sNam)
|
||||
end
|
||||
end
|
||||
|
||||
------------ ACTIONS ------------
|
||||
|
||||
if(SERVER) then
|
||||
|
||||
for iD = 1, #gtTransFile do
|
||||
AddCSLuaFile(gsLangForm:format(gtTransFile[iD]))
|
||||
end -- Add client side translation lua files
|
||||
|
||||
utilAddNetworkString(gsLibName.."SendIntersectClear")
|
||||
utilAddNetworkString(gsLibName.."SendIntersectRelate")
|
||||
utilAddNetworkString(gsLibName.."SendCreateCurveNode")
|
||||
|
@ -705,7 +705,7 @@ function InitBase(sName, sPurp)
|
||||
SetOpVar("FORM_PREFIXDSV", "%s%s.txt")
|
||||
SetOpVar("FORM_GITWIKI", "https://github.com/dvdvideo1234/TrackAssemblyTool/wiki/%s")
|
||||
SetOpVar("LOG_FILENAME",GetOpVar("DIRPATH_BAS")..GetOpVar("NAME_LIBRARY").."_log.txt")
|
||||
SetOpVar("FORM_LANGPATH","%s"..GetOpVar("TOOLNAME_NL").."/lang/%s")
|
||||
SetOpVar("FORM_LANGPATH",GetOpVar("TOOLNAME_NL").."/lang/%s")
|
||||
SetOpVar("FORM_SNAPSND", "physics/metal/metal_canister_impact_hard%d.wav")
|
||||
SetOpVar("FORM_NTFGAME", "GAMEMODE:AddNotify(\"%s\", NOTIFY_%s, 6)")
|
||||
SetOpVar("FORM_NTFPLAY", "surface.PlaySound(\"ambient/water/drip%d.wav\")")
|
||||
@ -4885,7 +4885,7 @@ local function GetLocalify(vCode)
|
||||
local sCode = tostring(vCode or GetOpVar("MISS_NOAV"))
|
||||
if(SERVER) then LogInstance("Server "..GetReport(vCode)); return nil end
|
||||
local sTool, sLimit = GetOpVar("TOOLNAME_NL"), GetOpVar("CVAR_LIMITNAME")
|
||||
local sPath = GetOpVar("FORM_LANGPATH"):format("", sCode..".lua")
|
||||
local sPath = GetOpVar("FORM_LANGPATH"):format(sCode..".lua")
|
||||
if(not fileExists("lua/"..sPath, "GAME")) then -- Translation file path
|
||||
LogInstance("Missing "..GetReport1(sCode)); return nil end
|
||||
local fCode = CompileFile(sPath); if(not fCode) then -- Compile
|
||||
|
Loading…
Reference in New Issue
Block a user