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

23
PHI-CL/control.lua Normal file
View File

@@ -0,0 +1,23 @@
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
if settings.startup['PHI-XC'].value then
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)
end

View File

@@ -1,5 +1,3 @@
local alpha_order = {'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm'}
-- local graphics_location = '__PHI-EN__/graphics/'
local items = require 'config'
local main = require 'main'
local file_stage = 1

View File

@@ -720,6 +720,7 @@ PHI-EN=Energy
PHI-MB=Megabase
PHI-WE=Military
PHI-EQ=Equipment
PHI-XC=Clock
PHI-EN-SOLAR-TIER=Solar Panel
PHI-EN-STEAM-TIER=Steam engine
PHI-EN-NUCLEAR-TIER=Nuclear reactor

View File

@@ -718,6 +718,7 @@ PHI-EN=エネルギー
PHI-MB=メガベース
PHI-WE=軍事
PHI-EQ=設備
PHI-XC=時計
PHI-EN-SOLAR-TIER=ソーラーパネル
PHI-EN-STEAM-TIER=蒸気機関
PHI-EN-NUCLEAR-TIER=原子炉

View File

@@ -718,6 +718,7 @@ PHI-EN=能量
PHI-MB=大型基地
PHI-WE=軍事
PHI-EQ=設備
PHI-XC=時鐘
PHI-EN-SOLAR-TIER=太陽能板
PHI-EN-STEAM-TIER=蒸汽發電機
PHI-EN-NUCLEAR-TIER=核能反應爐

View File

@@ -718,6 +718,7 @@ PHI-EN=能量
PHI-MB=大型基地
PHI-WE=軍事
PHI-EQ=設備
PHI-XC=時鐘
PHI-EN-SOLAR-TIER=太陽能板
PHI-EN-STEAM-TIER=蒸汽發電機
PHI-EN-NUCLEAR-TIER=核能反應爐

View File

@@ -1,3 +1,5 @@
local alpha_order = {'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm'}
-- local graphics_location = '__PHI-EN__/graphics/'
local main = {}
-- entity

View File

@@ -5,37 +5,38 @@ data:extend({
setting_type = 'startup',
default_value = true,
order = 'A1'
},
{
}, {
type = 'bool-setting',
name = 'PHI-MB',
setting_type = 'startup',
default_value = true,
order = 'A2'
},
{
}, {
type = 'bool-setting',
name = 'PHI-WE',
setting_type = 'startup',
default_value = true,
order = 'A3'
},
{
}, {
type = 'bool-setting',
name = 'PHI-EQ',
setting_type = 'startup',
default_value = true,
order = 'A6'
},
{
}, {
type = 'int-setting',
name = 'PHI-XW-WATER',
setting_type = 'startup',
default_value = 1,
allowed_values = {0, 1, 2, 3, 4, 5},
order = 'A7'
},
{
}, {
type = 'bool-setting',
name = 'PHI-XC',
setting_type = 'startup',
default_value = true,
order = 'A8'
}, {
type = 'int-setting',
name = 'PHI-EN-SOLAR-TIER',
setting_type = 'startup',
@@ -105,8 +106,7 @@ data:extend({
default_value = 3,
allowed_values = {1, 2, 3},
order = 'C7'
},
{
}, {
type = 'int-setting',
name = 'PHI-WE-LASER-TIER',
setting_type = 'startup',