mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 02:55:22 +09:00
.
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = false
|
||||
insert_final_newline = false
|
||||
1597
PHI-CC/.luacheckrc
1597
PHI-CC/.luacheckrc
File diff suppressed because it is too large
Load Diff
@@ -1,6 +0,0 @@
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 1.1.0
|
||||
Date: 2022-12-01
|
||||
|
||||
Added:
|
||||
- Compound Solar Panel and Accumulator
|
||||
@@ -1,24 +0,0 @@
|
||||
script.on_init(function()
|
||||
if global.phi == nil then
|
||||
global.phi = {}
|
||||
end
|
||||
|
||||
global.phi.cc = {}
|
||||
global.phi.gui = {}
|
||||
end)
|
||||
|
||||
script.on_event(defines.events.on_player_created, function(event)
|
||||
global.phi.cc.gui[event.player.index] = {controls_active = true}
|
||||
|
||||
local player = game.get_player(event.player_index)
|
||||
|
||||
local screen_element = player.gui.screen
|
||||
local main_frame = screen_element.add{type='frame', name='ugg_main_frame', caption={'ugg.hello_world'}}
|
||||
main_frame.style.size = {385, 165}
|
||||
main_frame.auto_center = true
|
||||
|
||||
local content_frame = main_frame.add{type='frame', name='content_frame', direction='vertical', style='ugg_content_frame'}
|
||||
local controls_flow = content_frame.add{type='flow', name='controls_flow', direction='horizontal', style='ugg_controls_flow'}
|
||||
|
||||
controls_flow.add{type='button', name='ugg_controls_toggle', caption={'ugg.deactivate'}}
|
||||
end)
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"name": "PHI-CC",
|
||||
"version": "1.0.0",
|
||||
"factorio_version": "1.1",
|
||||
"date": "2023-04-25",
|
||||
"title": "Phidias Circuit Combinator",
|
||||
"author": "PHIDIAS0303",
|
||||
"contributers": "",
|
||||
"homepage": "",
|
||||
"description": "",
|
||||
"dependencies": [
|
||||
"base >= 1.1.0"
|
||||
]
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 86 KiB |
@@ -1,17 +1,5 @@
|
||||
local items = {
|
||||
['setting'] = {
|
||||
['PHI-EN-SOLAR'] = {
|
||||
type = 'enabled',
|
||||
effect = {'solar-panel', 'accumulator'}
|
||||
},
|
||||
['PHI-EN-STEAM'] = {
|
||||
type = 'enabled',
|
||||
effect = {'boiler', 'steam-engine'}
|
||||
},
|
||||
['PHI-EN-NUCLEAR'] = {
|
||||
type = 'enabled',
|
||||
effect = {'nuclear-reactor', 'heat-pipe', 'heat-exchanger', 'steam-turbine'}
|
||||
},
|
||||
['PHI-EN-SOLAR-TIER'] = {
|
||||
type = 'max',
|
||||
effect = {'solar-panel', 'accumulator'}
|
||||
|
||||
@@ -2,6 +2,10 @@ local items = require 'config'
|
||||
|
||||
for k, v in pairs(items['setting']) do
|
||||
for k2=1, #v.effect do
|
||||
if settings.startup[k].value < items[v.effect[k2]].min then
|
||||
items[v.effect[k2]].enabled = false
|
||||
end
|
||||
|
||||
items[v.effect[k2]][v.type] = settings.startup[k].value
|
||||
end
|
||||
end
|
||||
|
||||
@@ -168,6 +168,10 @@ end
|
||||
|
||||
for k, v in pairs(items['setting']) do
|
||||
for k2=1, #v.effect do
|
||||
if settings.startup[k].value < items[v.effect[k2]].min then
|
||||
items[v.effect[k2]].enabled = false
|
||||
end
|
||||
|
||||
items[v.effect[k2]][v.type] = settings.startup[k].value
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "PHI-EN",
|
||||
"version": "1.3.3",
|
||||
"version": "1.3.4",
|
||||
"factorio_version": "1.1",
|
||||
"date": "2023-09-18",
|
||||
"date": "2023-09-19",
|
||||
"title": "Phidias Energy",
|
||||
"author": "PHIDIAS0303",
|
||||
"contributers": "",
|
||||
|
||||
@@ -155,9 +155,6 @@ compound-energy-6=Source of free electric energy, but useless at night.
|
||||
compound-energy-7=Source of free electric energy, but useless at night.
|
||||
|
||||
[mod-setting-name]
|
||||
PHI-EN-SOLAR=Solar Panel
|
||||
PHI-EN-STEAM=Steam engine
|
||||
PHI-EN-NUCLEAR=Nuclear reactor
|
||||
PHI-EN-SOLAR-TIER=Solar Panel
|
||||
PHI-EN-STEAM-TIER=Steam engine
|
||||
PHI-EN-NUCLEAR-TIER=Nuclear reactor
|
||||
|
||||
@@ -155,9 +155,6 @@ compound-energy-6=クリーンで燃料が尽きることのない発電設備
|
||||
compound-energy-7=クリーンで燃料が尽きることのない発電設備。夜間は発電しません。
|
||||
|
||||
[mod-setting-name]
|
||||
PHI-EN-SOLAR=ソーラーパネル
|
||||
PHI-EN-STEAM=蒸気機関
|
||||
PHI-EN-NUCLEAR=原子炉
|
||||
PHI-EN-SOLAR-TIER=ソーラーパネル
|
||||
PHI-EN-STEAM-TIER=蒸気機関
|
||||
PHI-EN-NUCLEAR-TIER=原子炉
|
||||
|
||||
@@ -155,9 +155,6 @@ compound-energy-6=取之不盡的電力來源,但在夜晚派不上用場。
|
||||
compound-energy-7=取之不盡的電力來源,但在夜晚派不上用場。
|
||||
|
||||
[mod-setting-name]
|
||||
PHI-EN-SOLAR=太陽能板
|
||||
PHI-EN-STEAM=蒸汽發電機
|
||||
PHI-EN-NUCLEAR=核能反應爐
|
||||
PHI-EN-SOLAR-TIER=太陽能板
|
||||
PHI-EN-STEAM-TIER=蒸汽發電機
|
||||
PHI-EN-NUCLEAR-TIER=核能反應爐
|
||||
|
||||
@@ -155,9 +155,6 @@ compound-energy-6=取之不盡的電力來源,但在夜晚派不上用場。
|
||||
compound-energy-7=取之不盡的電力來源,但在夜晚派不上用場。
|
||||
|
||||
[mod-setting-name]
|
||||
PHI-EN-SOLAR=太陽能板
|
||||
PHI-EN-STEAM=蒸汽發電機
|
||||
PHI-EN-NUCLEAR=核能反應爐
|
||||
PHI-EN-SOLAR-TIER=太陽能板
|
||||
PHI-EN-STEAM-TIER=蒸汽發電機
|
||||
PHI-EN-NUCLEAR-TIER=核能反應爐
|
||||
|
||||
@@ -1,40 +1,22 @@
|
||||
data:extend({{
|
||||
type = 'bool-setting',
|
||||
name = 'PHI-EN-SOLAR',
|
||||
setting_type = 'startup',
|
||||
default_value = true,
|
||||
order = 'A1'
|
||||
}, {
|
||||
type = 'bool-setting',
|
||||
name = 'PHI-EN-STEAM',
|
||||
setting_type = 'startup',
|
||||
default_value = true,
|
||||
order = 'A2'
|
||||
}, {
|
||||
type = 'bool-setting',
|
||||
name = 'PHI-EN-NUCLEAR',
|
||||
setting_type = 'startup',
|
||||
default_value = true,
|
||||
order = 'A3'
|
||||
}, {
|
||||
type = 'int-setting',
|
||||
name = 'PHI-EN-SOLAR-TIER',
|
||||
setting_type = 'startup',
|
||||
default_value = 8,
|
||||
allowed_values = {2, 3, 4, 5, 6, 7, 8},
|
||||
order = 'B1'
|
||||
allowed_values = {1, 2, 3, 4, 5, 6, 7, 8},
|
||||
order = 'A1'
|
||||
}, {
|
||||
type = 'int-setting',
|
||||
name = 'PHI-EN-STEAM-TIER',
|
||||
setting_type = 'startup',
|
||||
default_value = 5,
|
||||
allowed_values = {2, 3, 4, 5},
|
||||
order = 'B2'
|
||||
allowed_values = {1, 2, 3, 4, 5},
|
||||
order = 'A2'
|
||||
}, {
|
||||
type = 'int-setting',
|
||||
name = 'PHI-EN-NUCLEAR-TIER',
|
||||
setting_type = 'startup',
|
||||
default_value = 5,
|
||||
allowed_values = {2, 3, 4, 5},
|
||||
order = 'B3'
|
||||
allowed_values = {1, 2, 3, 4, 5},
|
||||
order = 'A3'
|
||||
}})
|
||||
@@ -1,4 +1,38 @@
|
||||
local items = {
|
||||
['setting'] = {
|
||||
['PHI-EQ-SOLAR-TIER'] = {
|
||||
type = 'max',
|
||||
effect = {'solar-panel'}
|
||||
},
|
||||
['PHI-EQ-BATTERY-TIER'] = {
|
||||
type = 'max',
|
||||
effect = {'battery'}
|
||||
},
|
||||
['PHI-EQ-REACTOR-TIER'] = {
|
||||
type = 'max',
|
||||
effect = {'fusion-reactor'}
|
||||
},
|
||||
['PHI-EQ-LASER-TIER'] = {
|
||||
type = 'max',
|
||||
effect = {'personal-laser-defense'}
|
||||
},
|
||||
['PHI-EQ-ROBOPORT-TIER'] = {
|
||||
type = 'max',
|
||||
effect = {'personal-roboport'}
|
||||
},
|
||||
['PHI-EQ-SHIELD-TIER'] = {
|
||||
type = 'max',
|
||||
effect = {'energy-shield'}
|
||||
},
|
||||
['PHI-EQ-NIGHT-TIER'] = {
|
||||
type = 'max',
|
||||
effect = {'night-vision'}
|
||||
},
|
||||
['PHI-EQ-EXO-TIER'] = {
|
||||
type = 'max',
|
||||
effect = {'exoskeleton'}
|
||||
}
|
||||
},
|
||||
['solar-panel'] = {
|
||||
enabled = true,
|
||||
type = 'solar-panel',
|
||||
|
||||
122
PHI-EQ/data.lua
122
PHI-EQ/data.lua
@@ -9,7 +9,7 @@ local function EE(source, tier)
|
||||
item['categories'] = {'armor'}
|
||||
local w = 1
|
||||
local h = 1
|
||||
|
||||
|
||||
if (source.type == 'solar-panel') then
|
||||
item['type'] = 'solar-panel-equipment'
|
||||
item['power'] = (source.base * (2 ^ (tier - 1))) .. 'kW'
|
||||
@@ -124,63 +124,77 @@ local function ET(source, tier)
|
||||
table.insert(data.raw.technology[source.tech].effects, {type='unlock-recipe', recipe=source.name .. '-mk' .. tier .. '-equipment'})
|
||||
end
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = 'equipment-grid',
|
||||
name = 'equipment-grid-14x14',
|
||||
width = 14,
|
||||
height = 14,
|
||||
equipment_categories = {'armor'}
|
||||
},
|
||||
{
|
||||
type = 'armor',
|
||||
if settings.startup['PHI-EQ-ARMOR'].value then
|
||||
data:extend({
|
||||
{
|
||||
type = 'equipment-grid',
|
||||
name = 'equipment-grid-14x14',
|
||||
width = 14,
|
||||
height = 14,
|
||||
equipment_categories = {'armor'}
|
||||
},
|
||||
{
|
||||
type = 'armor',
|
||||
name = 'power-armor-mk3',
|
||||
icon = '__base__/graphics/icons/power-armor-mk2.png',
|
||||
icon_size = 64, icon_mipmaps = 4,
|
||||
resistances = {{type = 'physical', decrease = 20, percent = 50}, {type = 'acid', decrease = 20, percent = 80},
|
||||
{type = 'explosion', decrease = 70, percent = 60}, {type = 'fire', decrease = 20, percent = 80},
|
||||
{type = 'laser', decrease = 20, percent = 50}, {type = 'electric', decrease = 20, percent = 50},
|
||||
{type = 'impact', decrease = 20, percent = 50}, {type = 'poison', decrease = 20, percent = 50}},
|
||||
subgroup = 'armor',
|
||||
order = 'eb[power-armor-mk3]',
|
||||
stack_size = 1,
|
||||
infinite = true,
|
||||
equipment_grid = 'equipment-grid-14x14',
|
||||
inventory_size_bonus = 40,
|
||||
open_sound = {filename = '__base__/sound/armor-open.ogg', volume = 1},
|
||||
close_sound = {filename = '__base__/sound/armor-close.ogg', volume = 1}
|
||||
}
|
||||
})
|
||||
|
||||
data:extend({{
|
||||
type = 'recipe',
|
||||
name = 'power-armor-mk3',
|
||||
icon = '__base__/graphics/icons/power-armor-mk2.png',
|
||||
icon_size = 64, icon_mipmaps = 4,
|
||||
resistances = {{type = 'physical', decrease = 20, percent = 50}, {type = 'acid', decrease = 20, percent = 80},
|
||||
{type = 'explosion', decrease = 70, percent = 60}, {type = 'fire', decrease = 20, percent = 80},
|
||||
{type = 'laser', decrease = 20, percent = 50}, {type = 'electric', decrease = 20, percent = 50},
|
||||
{type = 'impact', decrease = 20, percent = 50}, {type = 'poison', decrease = 20, percent = 50}},
|
||||
subgroup = 'armor',
|
||||
order = 'eb[power-armor-mk3]',
|
||||
stack_size = 1,
|
||||
infinite = true,
|
||||
equipment_grid = 'equipment-grid-14x14',
|
||||
inventory_size_bonus = 40,
|
||||
open_sound = {filename = '__base__/sound/armor-open.ogg', volume = 1},
|
||||
close_sound = {filename = '__base__/sound/armor-close.ogg', volume = 1}
|
||||
}
|
||||
})
|
||||
energy_required = 5,
|
||||
enabled = 'false',
|
||||
ingredients = {{'power-armor-mk2', 2}},
|
||||
result = 'power-armor-mk3'
|
||||
}})
|
||||
|
||||
data:extend({{
|
||||
type = 'recipe',
|
||||
name = 'power-armor-mk3',
|
||||
energy_required = 5,
|
||||
enabled = 'false',
|
||||
ingredients = {{'power-armor-mk2', 2}},
|
||||
result = 'power-armor-mk3'
|
||||
}})
|
||||
for _, animation in ipairs(data.raw['character']['character']['animations']) do
|
||||
if animation.armors then
|
||||
for _, armor in ipairs(animation.armors) do
|
||||
if armor == 'power-armor-mk2' then
|
||||
animation.armors[#animation.armors + 1] = 'power-armor-mk3'
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for _, animation in ipairs(data.raw['character']['character']['animations']) do
|
||||
if animation.armors then
|
||||
for _, armor in ipairs(animation.armors) do
|
||||
if armor == 'power-armor-mk2' then
|
||||
animation.armors[#animation.armors + 1] = 'power-armor-mk3'
|
||||
break
|
||||
table.insert(data.raw.technology['power-armor-mk2'].effects, {type='unlock-recipe', recipe='power-armor-mk3'})
|
||||
end
|
||||
|
||||
for k, v in pairs(items['setting']) do
|
||||
for k2=1, #v.effect do
|
||||
if settings.startup[k].value < items[v.effect[k2]].min then
|
||||
items[v.effect[k2]].enabled = false
|
||||
end
|
||||
|
||||
items[v.effect[k2]][v.type] = settings.startup[k].value
|
||||
end
|
||||
end
|
||||
|
||||
for k, v in pairs(items) do
|
||||
if k ~= 'setting' then
|
||||
if v.enabled then
|
||||
for j=v.min, v.max, 1 do
|
||||
EE(v, j)
|
||||
EI(v, j)
|
||||
ER(v, j)
|
||||
ET(v, j)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
table.insert(data.raw.technology['power-armor-mk2'].effects, {type='unlock-recipe', recipe='power-armor-mk3'})
|
||||
|
||||
for _, v in pairs(items) do
|
||||
if v.enabled then
|
||||
for j=v.min, v.max, 1 do
|
||||
EE(v, j)
|
||||
EI(v, j)
|
||||
ER(v, j)
|
||||
ET(v, j)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "PHI-EQ",
|
||||
"version": "1.1.16",
|
||||
"version": "1.2.0",
|
||||
"factorio_version": "1.1",
|
||||
"date": "2023-05-10",
|
||||
"date": "2023-09-19",
|
||||
"title": "Phidias Equipment",
|
||||
"author": "PHIDIAS0303",
|
||||
"contributers": "",
|
||||
|
||||
@@ -146,3 +146,14 @@ personal-roboport-mk8-equipment=Personal Roboport MK8
|
||||
|
||||
night-vision-mk2-equipment=Nightvision Equipment MK2
|
||||
exoskeleton-mk2-equipment=Exoskeleton MK2
|
||||
|
||||
[mod-setting-name]
|
||||
PHI-EQ-SOLAR-TIER=Portable Solar Panel
|
||||
PHI-EQ-BATTERY-TIER=Personal Battery
|
||||
PHI-EQ-REACTOR-TIER=Portable Fusion Reactor
|
||||
PHI-EQ-LASER-TIER=Personal Laser Defense
|
||||
PHI-EQ-ROBOPORT-TIER=Personal Roboport
|
||||
PHI-EQ-SHIELD-TIER=Energy Shield
|
||||
PHI-EQ-NIGHT-TIER=Nightvision Equipment
|
||||
PHI-EQ-EXO-TIER=Exoskeleton
|
||||
PHI-EQ-ARMOR=Power armor
|
||||
|
||||
@@ -146,3 +146,14 @@ personal-roboport-mk8-equipment=携帯ロボットステーション8代
|
||||
|
||||
night-vision-mk2-equipment=暗視モジュール2代
|
||||
exoskeleton-mk2-equipment=強化外骨格モジュール2代
|
||||
|
||||
[mod-setting-name]
|
||||
PHI-EQ-SOLAR-TIER=携帯ソーラーパネルモジュール
|
||||
PHI-EQ-BATTERY-TIER=個人用バッテリー
|
||||
PHI-EQ-REACTOR-TIER=携帯核融合炉モジュール
|
||||
PHI-EQ-LASER-TIER=携帯レーザー防御モジュール
|
||||
PHI-EQ-ROBOPORT-TIER=携帯ロボットステーション
|
||||
PHI-EQ-SHIELD-TIER=エネルギーシールドモジュール
|
||||
PHI-EQ-NIGHT-TIER=暗視モジュール
|
||||
PHI-EQ-EXO-TIER=強化外骨格モジュール
|
||||
PHI-EQ-ARMOR=パワーアーマー
|
||||
|
||||
@@ -146,3 +146,14 @@ personal-roboport-mk8-equipment=機動無人機調度站8代
|
||||
|
||||
night-vision-mk2-equipment=夜視鏡2代
|
||||
exoskeleton-mk2-equipment=動力外骨骼2代
|
||||
|
||||
[mod-setting-name]
|
||||
PHI-EQ-SOLAR-TIER=攜帶式太陽能板
|
||||
PHI-EQ-BATTERY-TIER=電池設備
|
||||
PHI-EQ-REACTOR-TIER=攜帶式核融合反應器
|
||||
PHI-EQ-LASER-TIER=個人雷射防禦
|
||||
PHI-EQ-ROBOPORT-TIER=機動無人機調度站
|
||||
PHI-EQ-SHIELD-TIER=能量護盾
|
||||
PHI-EQ-NIGHT-TIER=夜視鏡
|
||||
PHI-EQ-EXO-TIER=動力外骨骼
|
||||
PHI-EQ-ARMOR=動力護甲
|
||||
|
||||
@@ -146,3 +146,14 @@ personal-roboport-mk8-equipment=機動無人機調度站8代
|
||||
|
||||
night-vision-mk2-equipment=夜視鏡2代
|
||||
exoskeleton-mk2-equipment=動力外骨骼2代
|
||||
|
||||
[mod-setting-name]
|
||||
PHI-EQ-SOLAR-TIER=攜帶式太陽能板
|
||||
PHI-EQ-BATTERY-TIER=電池設備
|
||||
PHI-EQ-REACTOR-TIER=攜帶式核融合反應器
|
||||
PHI-EQ-LASER-TIER=個人雷射防禦
|
||||
PHI-EQ-ROBOPORT-TIER=機動無人機調度站
|
||||
PHI-EQ-SHIELD-TIER=能量護盾
|
||||
PHI-EQ-NIGHT-TIER=夜視鏡
|
||||
PHI-EQ-EXO-TIER=動力外骨骼
|
||||
PHI-EQ-ARMOR=動力護甲
|
||||
|
||||
63
PHI-EQ/settings.lua
Normal file
63
PHI-EQ/settings.lua
Normal file
@@ -0,0 +1,63 @@
|
||||
data:extend({{
|
||||
type = 'int-setting',
|
||||
name = 'PHI-EQ-SOLAR-TIER',
|
||||
setting_type = 'startup',
|
||||
default_value = 8,
|
||||
allowed_values = {1, 2, 3, 4, 5, 6, 7, 8},
|
||||
order = 'A1'
|
||||
}, {
|
||||
type = 'int-setting',
|
||||
name = 'PHI-EQ-BATTERY-TIER',
|
||||
setting_type = 'startup',
|
||||
default_value = 8,
|
||||
allowed_values = {2, 3, 4, 5, 6, 7, 8},
|
||||
order = 'A2'
|
||||
}, {
|
||||
type = 'int-setting',
|
||||
name = 'PHI-EN-REACTOR-TIER',
|
||||
setting_type = 'startup',
|
||||
default_value = 8,
|
||||
allowed_values = {1, 2, 3, 4, 5, 6, 7, 8},
|
||||
order = 'A3'
|
||||
}, {
|
||||
type = 'int-setting',
|
||||
name = 'PHI-EN-LASER-TIER',
|
||||
setting_type = 'startup',
|
||||
default_value = 8,
|
||||
allowed_values = {1, 2, 3, 4, 5, 6, 7, 8},
|
||||
order = 'A4'
|
||||
}, {
|
||||
type = 'int-setting',
|
||||
name = 'PHI-EN-ROBOPORT-TIER',
|
||||
setting_type = 'startup',
|
||||
default_value = 8,
|
||||
allowed_values = {2, 3, 4, 5, 6, 7, 8},
|
||||
order = 'A5'
|
||||
}, {
|
||||
type = 'int-setting',
|
||||
name = 'PHI-EN-SHIELD-TIER',
|
||||
setting_type = 'startup',
|
||||
default_value = 8,
|
||||
allowed_values = {2, 3, 4, 5, 6, 7, 8},
|
||||
order = 'A6'
|
||||
}, {
|
||||
type = 'int-setting',
|
||||
name = 'PHI-EN-NIGHT-TIER',
|
||||
setting_type = 'startup',
|
||||
default_value = 2,
|
||||
allowed_values = {1, 2},
|
||||
order = 'A7'
|
||||
}, {
|
||||
type = 'int-setting',
|
||||
name = 'PHI-EN-EXO-TIER',
|
||||
setting_type = 'startup',
|
||||
default_value = 2,
|
||||
allowed_values = {1, 2},
|
||||
order = 'A8'
|
||||
}, {
|
||||
type = 'bool-setting',
|
||||
name = 'PHI-EQ-ARMOR',
|
||||
setting_type = 'startup',
|
||||
default_value = true,
|
||||
order = 'A9'
|
||||
}})
|
||||
Reference in New Issue
Block a user