mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-14 03:09:08 +00:00
Merge with default
This commit is contained in:
parent
26567a3ce8
commit
1f972da834
7 changed files with 12 additions and 12 deletions
|
@ -84,7 +84,7 @@ function bgdownloader:setPatchProgress(progress)
|
||||||
|
|
||||||
self:getPrioCB().active = true
|
self:getPrioCB().active = true
|
||||||
local progressPercentText = string.format("%d%%", 100 * progress)
|
local progressPercentText = string.format("%d%%", 100 * progress)
|
||||||
local progressPostfix = math.mod(os.time(), 3)
|
local progressPostfix = math.fmod(os.time(), 3)
|
||||||
local progressDate = nltime.getLocalTime() / 500
|
local progressDate = nltime.getLocalTime() / 500
|
||||||
local colValue = math.floor(230 + 24 * math.sin(progressDate))
|
local colValue = math.floor(230 + 24 * math.sin(progressDate))
|
||||||
local color = string.format("%d %d %d %d", colValue, colValue, colValue, 255)
|
local color = string.format("%d %d %d %d", colValue, colValue, colValue, 255)
|
||||||
|
|
|
@ -521,7 +521,7 @@ function GameR2Loading:validateLoading()
|
||||||
|
|
||||||
local filename = GameR2Loading.CurrentFile
|
local filename = GameR2Loading.CurrentFile
|
||||||
|
|
||||||
if string.find(filename, '\.r2', -3) == nil then
|
if string.find(filename, '.r2', -3) == nil then
|
||||||
messageBox(i18n.get("uiR2EDLoadScenario_InvalidFileName"))
|
messageBox(i18n.get("uiR2EDLoadScenario_InvalidFileName"))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
|
@ -131,7 +131,7 @@ local function levelToForceRegion(level)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function levelToLevelForce(level)
|
local function levelToLevelForce(level)
|
||||||
return math.floor(math.mod(level, 50) * 5 / 50) + 1
|
return math.floor(math.fmod(level, 50) * 5 / 50) + 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -135,7 +135,7 @@ end
|
||||||
--function outgame:setPatchProgress(progress)
|
--function outgame:setPatchProgress(progress)
|
||||||
-- --debugInfo("*** 3 ***")
|
-- --debugInfo("*** 3 ***")
|
||||||
-- local progressPercentText = string.format("%d%%", 100 * progress)
|
-- local progressPercentText = string.format("%d%%", 100 * progress)
|
||||||
-- local progressPostfix = math.mod(os.time(), 3)
|
-- local progressPostfix = math.fmod(os.time(), 3)
|
||||||
-- --debugInfo("Patch in progress : " .. tostring(progress))
|
-- --debugInfo("Patch in progress : " .. tostring(progress))
|
||||||
-- local progressDate = nltime.getLocalTime() / 500
|
-- local progressDate = nltime.getLocalTime() / 500
|
||||||
-- local colValue = math.floor(230 + 24 * math.sin(progressDate))
|
-- local colValue = math.floor(230 + 24 * math.sin(progressDate))
|
||||||
|
|
|
@ -56,7 +56,7 @@ function game:outpostAdjustHour(uiLocal, prop)
|
||||||
local h = runExpr(prop);
|
local h = runExpr(prop);
|
||||||
|
|
||||||
-- add time zone and clamp hour
|
-- add time zone and clamp hour
|
||||||
h = math.mod(h + tz + 24, 24);
|
h = math.fmod(h + tz + 24, 24);
|
||||||
uiGroup[uiLocal].uc_hardtext = string.format('%02d:00', h);
|
uiGroup[uiLocal].uc_hardtext = string.format('%02d:00', h);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -288,8 +288,8 @@ function game:outpostActiveDefenderHourButton()
|
||||||
local timeRangeDef= getDbProp(path .. ':TIME_RANGE_DEF');
|
local timeRangeDef= getDbProp(path .. ':TIME_RANGE_DEF');
|
||||||
local timeRangeDefWanted= getDbProp(path .. ':TIME_RANGE_DEF_WANTED');
|
local timeRangeDefWanted= getDbProp(path .. ':TIME_RANGE_DEF_WANTED');
|
||||||
timeRangeDef= secondsSince1970ToHour( timeRangeDef );
|
timeRangeDef= secondsSince1970ToHour( timeRangeDef );
|
||||||
timeRangeDef= math.mod(timeRangeDef+24, 24);
|
timeRangeDef= math.fmod(timeRangeDef+24, 24);
|
||||||
timeRangeDefWanted= math.mod(timeRangeDefWanted+24, 24);
|
timeRangeDefWanted= math.fmod(timeRangeDefWanted+24, 24);
|
||||||
|
|
||||||
-- if time required is the one obtained, or if we are in peace
|
-- if time required is the one obtained, or if we are in peace
|
||||||
if( timeRangeDef == timeRangeDefWanted or status<=game.OutpostEnums.Peace ) then
|
if( timeRangeDef == timeRangeDefWanted or status<=game.OutpostEnums.Peace ) then
|
||||||
|
@ -323,8 +323,8 @@ function game:outpostActiveAttackerHourButton()
|
||||||
local timeRangeAtt= getDbProp('UI:TEMP:OUTPOST:DECLARE_WAR_ACK_TIME_RANGE_ATT');
|
local timeRangeAtt= getDbProp('UI:TEMP:OUTPOST:DECLARE_WAR_ACK_TIME_RANGE_ATT');
|
||||||
local timeRangeAttWanted= getDbProp('UI:TEMP:OUTPOST:DECLARE_WAR_ATTACK_PERIOD');
|
local timeRangeAttWanted= getDbProp('UI:TEMP:OUTPOST:DECLARE_WAR_ATTACK_PERIOD');
|
||||||
timeRangeAtt= secondsSince1970ToHour( timeRangeAtt );
|
timeRangeAtt= secondsSince1970ToHour( timeRangeAtt );
|
||||||
timeRangeAtt= math.mod(timeRangeAtt+24, 24);
|
timeRangeAtt= math.fmod(timeRangeAtt+24, 24);
|
||||||
timeRangeAttWanted= math.mod(timeRangeAttWanted+24, 24);
|
timeRangeAttWanted= math.fmod(timeRangeAttWanted+24, 24);
|
||||||
|
|
||||||
-- if time required is the one obtained
|
-- if time required is the one obtained
|
||||||
if( timeRangeAtt == timeRangeAttWanted ) then
|
if( timeRangeAtt == timeRangeAttWanted ) then
|
||||||
|
|
|
@ -803,8 +803,8 @@ end
|
||||||
|
|
||||||
|
|
||||||
function game:timeInSecondsToReadableTime(regenTime)
|
function game:timeInSecondsToReadableTime(regenTime)
|
||||||
local seconds = math.mod(regenTime, 60)
|
local seconds = math.fmod(regenTime, 60)
|
||||||
local minutes = math.mod(math.floor(regenTime / 60), 60)
|
local minutes = math.fmod(math.floor(regenTime / 60), 60)
|
||||||
local hours = math.floor(regenTime / 3600)
|
local hours = math.floor(regenTime / 3600)
|
||||||
local result = ""
|
local result = ""
|
||||||
if seconds > 0 then result = concatUCString(tostring(seconds), i18n.get("uittSecondsShort")) end
|
if seconds > 0 then result = concatUCString(tostring(seconds), i18n.get("uittSecondsShort")) end
|
||||||
|
|
|
@ -904,7 +904,7 @@ function RingAccessPoint:onDraw()
|
||||||
self.LastRefreshTime = nltime.getLocalTime() / 1000
|
self.LastRefreshTime = nltime.getLocalTime() / 1000
|
||||||
--self:getWindow():find("refreshText").active = false
|
--self:getWindow():find("refreshText").active = false
|
||||||
else
|
else
|
||||||
local waitText = i18n.get("uiRAP_WaitMsg" .. math.mod(os.time(), 3))
|
local waitText = i18n.get("uiRAP_WaitMsg" .. math.fmod(os.time(), 3))
|
||||||
self:setInfoMessage(waitText)
|
self:setInfoMessage(waitText)
|
||||||
--local refreshText = self:getWindow():find("refreshText")
|
--local refreshText = self:getWindow():find("refreshText")
|
||||||
--if not self.ListReceived then
|
--if not self.ListReceived then
|
||||||
|
|
Loading…
Reference in a new issue