This commit is contained in:
2024-06-17 04:53:50 +09:00
parent 45f45b01bb
commit 812dde4e02
14 changed files with 41 additions and 14 deletions

8
OLD/PHI-XC/.editorconfig Normal file
View File

@@ -0,0 +1,8 @@
root = true
[*]
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = false

1597
OLD/PHI-XC/.luacheckrc Normal file

File diff suppressed because it is too large Load Diff

6
OLD/PHI-XC/changelog.txt Normal file
View File

@@ -0,0 +1,6 @@
---------------------------------------------------------------------------------------------------
Version: 1.0.0
Date: 2023-04-19
Added:
- Clock

21
OLD/PHI-XC/control.lua Normal file
View File

@@ -0,0 +1,21 @@
local function clock_display(sec)
local s = math.floor(sec) % 60
local m = math.floor(sec / 60) % 60
if sec > 3599 then
local h = math.floor(sec / 3600)
return string.format('%d:%02d:%02d', h, m, s)
else
return string.format('%d:%02d', m, s)
end
end
script.on_nth_tick(60, function(event)
for _, player in pairs(game.connected_players) do
if player.gui.top.phi_clock == nil then
player.gui.top.add{type='button', name='phi_clock'}
end
player.gui.top.phi_clock.caption = clock_display(math.floor(event.tick / 60))
end
end)

14
OLD/PHI-XC/info.json Normal file
View File

@@ -0,0 +1,14 @@
{
"name": "PHI-XC",
"version": "1.0.0",
"factorio_version": "1.1",
"date": "2023-04-19",
"title": "Phidias Clock",
"author": "PHIDIAS0303",
"contributers": "",
"homepage": "",
"description": "In game playtime",
"dependencies": [
"base >= 1.1.0"
]
}

BIN
OLD/PHI-XC/thumbnail.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB