mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-31 21:01:39 +09:00
Used same compression on tick to hour/minute
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -41,12 +41,12 @@ end)
|
|||||||
---------------------------Common use functions---------------------------------------
|
---------------------------Common use functions---------------------------------------
|
||||||
----------------------------------------------------------------------------------------
|
----------------------------------------------------------------------------------------
|
||||||
function ticktohour (tick)
|
function ticktohour (tick)
|
||||||
local hour = tostring(math.floor(tick * (1 /(60*game.speed)) / 3600))
|
local hour = tostring(math.floor(tick/(216000*game.speed)))
|
||||||
return hour
|
return hour
|
||||||
end
|
end
|
||||||
|
|
||||||
function ticktominutes (tick)
|
function ticktominutes (tick)
|
||||||
local minutes = math.floor((tick * (1 /(60*game.speed))) / 60)
|
local minutes = math.floor(tick/(3600*game.speed))
|
||||||
return minutes
|
return minutes
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -281,7 +281,7 @@ script.on_event(defines.events.on_rocket_launched, function(event)
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
script.on_event(defines.events.on_tick, function(event) if (game.tick/(3600*game.speed)) % 30 == 0 then autoMessage() end end)
|
script.on_event(defines.events.on_tick, function(event) if (game.tick/(3600*game.speed)) % 2 == 0 then autoMessage() end end)
|
||||||
----------------------------------------------------------------------------------------
|
----------------------------------------------------------------------------------------
|
||||||
---------------------------IDK What There Do Functions----------------------------------
|
---------------------------IDK What There Do Functions----------------------------------
|
||||||
----------------------------------------------------------------------------------------
|
----------------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user