-----------------------------------------------------
-- 项目相关

-- 项目名称(PROJECT_NAME)：
-- 闪烁战火:sszh
-- 闪烁二次元:ssecy
-----------------------------------------------------

local Config = require("Config")
local Util = require("common.Util")
local Lang = require("common.Lang")
local LangSszh = require("common.LangSszh")
local LangSsecy = require("common.LangSsecy")

-- 是否闪烁战火
function isSszh()
	if Config.PROJECT_NAME == nil or 
		Config.PROJECT_NAME == "sszh" then
		return true
	end
end

-- 是否小精灵
function isSsecy()
	if Config.PROJECT_NAME == "ssecy" then
		return true
	end
end	

-- 是否符合
function inProjectName(projectNames)
	if type(projectNames) ~= "table" then
		assert(nil)
	end

	if Util.getTableCount(projectNames) == 0 then
		return true
	end

	for _, projectName in ipairs(projectNames) do
		if Config.PROJECT_NAME == projectName then
			return true
		end
	end
end

function initAfterHot()
	local tempLang = nil

	if isSszh() == true then
		tempLang = LangSszh
	elseif isSsecy() == true then
		tempLang = LangSsecy
	else
		assert(nil)
	end
	
	for k, v in pairs(tempLang) do
		if type(k) == "string" and type(v) == "string" then
			--print("---------", k, v, type(k), type(v))
			Lang[k] = v
		end
	end
end