mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 11:05:22 +09:00
.
This commit is contained in:
@@ -533,192 +533,29 @@ local items = {
|
||||
},
|
||||
['bonus'] = {
|
||||
player_bonus = {
|
||||
{
|
||||
name = 'character_mining_speed_modifier',
|
||||
enabled = true,
|
||||
value = 2
|
||||
['character_mining_speed_modifier'] = {
|
||||
value = settings.startup['PHI-PB-CMMS'].value
|
||||
},
|
||||
{
|
||||
name = 'character_running_speed_modifier',
|
||||
enabled = true,
|
||||
value = 1.5
|
||||
['character_running_speed_modifier'] = {
|
||||
value = settings.startup['PHI-PB-CRS'].value
|
||||
},
|
||||
{
|
||||
name = 'character_crafting_speed_modifier',
|
||||
enabled = true,
|
||||
value = 5
|
||||
['character_crafting_speed_modifier'] = {
|
||||
value = settings.startup['PHI-PB-CCS'].value
|
||||
},
|
||||
{
|
||||
name = 'character_inventory_slots_bonus',
|
||||
enabled = true,
|
||||
value = 100
|
||||
['character_inventory_slots_bonus'] = {
|
||||
value = settings.startup['PHI-PB-CISB'].value
|
||||
},
|
||||
{
|
||||
name = 'character_health_bonus',
|
||||
enabled = true,
|
||||
value = 200
|
||||
}
|
||||
--[[
|
||||
{
|
||||
name = 'character_reach_distance_bonus',
|
||||
enabled = true,
|
||||
value = 10
|
||||
['character_health_bonus'] = {
|
||||
value = settings.startup['PHI-PB-CHB'].value
|
||||
},
|
||||
{
|
||||
name = 'character_resource_reach_distance_bonus',
|
||||
enabled = true,
|
||||
value = 10
|
||||
},
|
||||
{
|
||||
name = 'character_build_distance_bonus',
|
||||
enabled = true,
|
||||
value = 10
|
||||
},
|
||||
{
|
||||
name = 'character_item_pickup_distance_bonus',
|
||||
enabled = false,
|
||||
value = 0
|
||||
},
|
||||
{
|
||||
name = 'character_loot_pickup_distance_bonus',
|
||||
enabled = false,
|
||||
value = 0
|
||||
},
|
||||
{
|
||||
name = 'character_item_drop_distance_bonus',
|
||||
enabled = false,
|
||||
value = 5
|
||||
},
|
||||
]]
|
||||
},
|
||||
force_bonus = {
|
||||
{
|
||||
name = 'manual_mining_speed_modifier',
|
||||
enabled = false,
|
||||
value = 2
|
||||
},
|
||||
{
|
||||
name = 'character_running_speed_modifier',
|
||||
enabled = false,
|
||||
value = 1.5
|
||||
},
|
||||
{
|
||||
name = 'character_crafting_speed_modifier',
|
||||
enabled = false,
|
||||
value = 5
|
||||
},
|
||||
{
|
||||
name = 'character_inventory_slots_bonus',
|
||||
enabled = false,
|
||||
value = 100
|
||||
},
|
||||
{
|
||||
name = 'character_health_bonus',
|
||||
enabled = false,
|
||||
value = 200
|
||||
},
|
||||
{
|
||||
name = 'worker_robots_speed_modifier',
|
||||
enabled = false,
|
||||
value = 1.3
|
||||
},
|
||||
{
|
||||
name = 'worker_robots_battery_modifier',
|
||||
enabled = true,
|
||||
value = 1
|
||||
},
|
||||
{
|
||||
name = 'worker_robots_storage_bonus',
|
||||
enabled = true,
|
||||
value = 1
|
||||
},
|
||||
{
|
||||
name = 'following_robots_lifetime_modifier',
|
||||
enabled = true,
|
||||
value = 1
|
||||
},
|
||||
--[[
|
||||
{
|
||||
name = 'character_reach_distance_bonus',
|
||||
enabled = false,
|
||||
value = 10
|
||||
},
|
||||
{
|
||||
name = 'character_resource_reach_distance_bonus',
|
||||
enabled = false,
|
||||
value = 10
|
||||
},
|
||||
{
|
||||
name = 'character_build_distance_bonus',
|
||||
enabled = false,
|
||||
value = 10
|
||||
},
|
||||
{
|
||||
name = 'character_item_pickup_distance_bonus',
|
||||
enabled = false,
|
||||
value = 0
|
||||
},
|
||||
{
|
||||
name = 'character_loot_pickup_distance_bonus',
|
||||
enabled = false,
|
||||
value = 0
|
||||
},
|
||||
{
|
||||
name = 'character_item_drop_distance_bonus',
|
||||
enabled = false,
|
||||
value = 5
|
||||
},
|
||||
{
|
||||
name = 'character_trash_slot_count',
|
||||
enabled = false,
|
||||
value = 20
|
||||
},
|
||||
{
|
||||
name = 'mining_drill_productivity_bonus',
|
||||
enabled = false,
|
||||
value = 0
|
||||
},
|
||||
{
|
||||
name = 'train_braking_force_bonus',
|
||||
enabled = false,
|
||||
value = 0
|
||||
},
|
||||
{
|
||||
name = 'laboratory_speed_modifier',
|
||||
enabled = false,
|
||||
value = 0
|
||||
},
|
||||
{
|
||||
name = 'laboratory_productivity_bonus',
|
||||
enabled = false,
|
||||
value = 0
|
||||
},
|
||||
{
|
||||
name = 'inserter_stack_size_bonus',
|
||||
enabled = false,
|
||||
value = 0
|
||||
},
|
||||
{
|
||||
name = 'stack_inserter_capacity_bonus',
|
||||
enabled = false,
|
||||
value = 0
|
||||
},
|
||||
{
|
||||
name = 'artillery_range_modifier',
|
||||
enabled = false,
|
||||
value = 0
|
||||
}
|
||||
]]
|
||||
}
|
||||
--[[
|
||||
surface_bonus = {
|
||||
{
|
||||
name = 'solar_power_multiplier',
|
||||
enabled = false,
|
||||
value = 0
|
||||
['character_reach_distance_bonus'] = {
|
||||
value = settings.startup['PHI-PB-CRDB'].value,
|
||||
combined_bonus = {
|
||||
'character_resource_reach_distance_bonus',
|
||||
'character_build_distance_bonus'
|
||||
}
|
||||
}
|
||||
}
|
||||
]]
|
||||
},
|
||||
['recipe'] = {
|
||||
{
|
||||
|
||||
@@ -36,21 +36,25 @@ if settings.startup['PHI-PB'].value then
|
||||
return
|
||||
end
|
||||
|
||||
local bonus = tonumber(command.parameter)
|
||||
|
||||
if type(command.parameter) ~= 'number' then
|
||||
player.print('Parameter need to be number')
|
||||
return
|
||||
end
|
||||
|
||||
local bonus = tonumber(command.parameter)
|
||||
|
||||
if (bonus < 0) or (bonus > 10) then
|
||||
player.print('Parameter need to be in range of 0 - 10')
|
||||
return
|
||||
end
|
||||
|
||||
for _, v in pairs(items['bonus']['player_bonus']) do
|
||||
if v.enabled then
|
||||
game.players[command.player_index][v.name] = game.players[command.player_index][v.name] + (bonus / 10 * v.value)
|
||||
for k, v in pairs(items['bonus']['player_bonus']) do
|
||||
game.players[command.player_index][k] = bonus / 10 * v.value
|
||||
|
||||
if v.combined_bonus then
|
||||
for i=1, #v.combined_bonus, 1 do
|
||||
game.players[command.player_index][v.combined_bonus[i]] = bonus / 10 * v.value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "PHI-CL",
|
||||
"version": "2.0.1",
|
||||
"version": "2.0.2",
|
||||
"factorio_version": "1.1",
|
||||
"date": "2024-06-20",
|
||||
"date": "2024-06-26",
|
||||
"title": "Phidias Collection",
|
||||
"author": "PHIDIAS0303",
|
||||
"contributers": "",
|
||||
|
||||
@@ -834,11 +834,13 @@ PHI-PB-CRS=Character running speed
|
||||
PHI-PB-CCS=Character crafting speed
|
||||
PHI-PB-CISB=Character inventory slots bonus
|
||||
PHI-PB-CHB=Character health bonus
|
||||
PHI-PB-CRDB=Character reach distance bonus
|
||||
PHI-PB-FMMS=Force manual mining speed
|
||||
PHI-PB-FRS=Force running speed
|
||||
PHI-PB-FCS=Force crafting speed
|
||||
PHI-PB-FISB=Force inventory slots bonus
|
||||
PHI-PB-FHB=Force health bonus
|
||||
PHI-PB-FRDB=Force reach distance bonus
|
||||
PHI-PB-FWRSM=Force worker robots speed modifier
|
||||
PHI-PB-FWRBM=Force worker robots battery modifier
|
||||
PHI-PB-FWRSB=Force worker robots storage bonus
|
||||
|
||||
@@ -829,6 +829,23 @@ PHI-RS-MODULE=モジュール
|
||||
|
||||
PHI-XW-WATER=水
|
||||
|
||||
PHI-PB-CMMS=Character manual mining speed
|
||||
PHI-PB-CRS=Character running speed
|
||||
PHI-PB-CCS=Character crafting speed
|
||||
PHI-PB-CISB=Character inventory slots bonus
|
||||
PHI-PB-CHB=Character health bonus
|
||||
PHI-PB-CRDB=Character reach distance bonus
|
||||
PHI-PB-FMMS=Force manual mining speed
|
||||
PHI-PB-FRS=Force running speed
|
||||
PHI-PB-FCS=Force crafting speed
|
||||
PHI-PB-FISB=Force inventory slots bonus
|
||||
PHI-PB-FHB=Force health bonus
|
||||
PHI-PB-FRDB=Force reach distance bonus
|
||||
PHI-PB-FWRSM=Force worker robots speed modifier
|
||||
PHI-PB-FWRBM=Force worker robots battery modifier
|
||||
PHI-PB-FWRSB=Force worker robots storage bonus
|
||||
PHI-PB-FFRLM=Force following robots lifetime modifier
|
||||
|
||||
[mod-setting-description]
|
||||
PHI-EN-SOLAR-TIER=デフォルト 8 ; 止める 1
|
||||
PHI-EN-STEAM-TIER=デフォルト 5 ; 止める 1
|
||||
|
||||
@@ -829,6 +829,23 @@ PHI-RS-MODULE=模組
|
||||
|
||||
PHI-XW-WATER=水
|
||||
|
||||
PHI-PB-CMMS=Character manual mining speed
|
||||
PHI-PB-CRS=Character running speed
|
||||
PHI-PB-CCS=Character crafting speed
|
||||
PHI-PB-CISB=Character inventory slots bonus
|
||||
PHI-PB-CHB=Character health bonus
|
||||
PHI-PB-CRDB=Character reach distance bonus
|
||||
PHI-PB-FMMS=Force manual mining speed
|
||||
PHI-PB-FRS=Force running speed
|
||||
PHI-PB-FCS=Force crafting speed
|
||||
PHI-PB-FISB=Force inventory slots bonus
|
||||
PHI-PB-FHB=Force health bonus
|
||||
PHI-PB-FRDB=Force reach distance bonus
|
||||
PHI-PB-FWRSM=Force worker robots speed modifier
|
||||
PHI-PB-FWRBM=Force worker robots battery modifier
|
||||
PHI-PB-FWRSB=Force worker robots storage bonus
|
||||
PHI-PB-FFRLM=Force following robots lifetime modifier
|
||||
|
||||
[mod-setting-description]
|
||||
PHI-EN-SOLAR-TIER=預設 8 ; 停用 1
|
||||
PHI-EN-STEAM-TIER=預設 5 ; 停用 1
|
||||
|
||||
@@ -829,6 +829,23 @@ PHI-RS-MODULE=模組
|
||||
|
||||
PHI-XW-WATER=水
|
||||
|
||||
PHI-PB-CMMS=Character manual mining speed
|
||||
PHI-PB-CRS=Character running speed
|
||||
PHI-PB-CCS=Character crafting speed
|
||||
PHI-PB-CISB=Character inventory slots bonus
|
||||
PHI-PB-CHB=Character health bonus
|
||||
PHI-PB-CRDB=Character reach distance bonus
|
||||
PHI-PB-FMMS=Force manual mining speed
|
||||
PHI-PB-FRS=Force running speed
|
||||
PHI-PB-FCS=Force crafting speed
|
||||
PHI-PB-FISB=Force inventory slots bonus
|
||||
PHI-PB-FHB=Force health bonus
|
||||
PHI-PB-FRDB=Force reach distance bonus
|
||||
PHI-PB-FWRSM=Force worker robots speed modifier
|
||||
PHI-PB-FWRBM=Force worker robots battery modifier
|
||||
PHI-PB-FWRSB=Force worker robots storage bonus
|
||||
PHI-PB-FFRLM=Force following robots lifetime modifier
|
||||
|
||||
[mod-setting-description]
|
||||
PHI-EN-SOLAR-TIER=預設 8 ; 停用 1
|
||||
PHI-EN-STEAM-TIER=預設 5 ; 停用 1
|
||||
|
||||
@@ -309,15 +309,15 @@ data:extend({
|
||||
setting_type = 'startup',
|
||||
default_value = 2,
|
||||
minimum_value = 0,
|
||||
maximum_value = 10,
|
||||
maximum_value = 4,
|
||||
order = 'IA1'
|
||||
}, {
|
||||
type = 'float-setting',
|
||||
type = 'double-setting',
|
||||
name = 'PHI-PB-CRS',
|
||||
setting_type = 'startup',
|
||||
default_value = 1.5,
|
||||
minimum_value = 0,
|
||||
maximum_value = 10,
|
||||
maximum_value = 5,
|
||||
order = 'IA2'
|
||||
}, {
|
||||
type = 'int-setting',
|
||||
@@ -325,7 +325,7 @@ data:extend({
|
||||
setting_type = 'startup',
|
||||
default_value = 5,
|
||||
minimum_value = 0,
|
||||
maximum_value = 20,
|
||||
maximum_value = 10,
|
||||
order = 'IA3'
|
||||
}, {
|
||||
type = 'int-setting',
|
||||
@@ -333,7 +333,7 @@ data:extend({
|
||||
setting_type = 'startup',
|
||||
default_value = 100,
|
||||
minimum_value = 0,
|
||||
maximum_value = 200,
|
||||
maximum_value = 120,
|
||||
order = 'IA4'
|
||||
}, {
|
||||
type = 'int-setting',
|
||||
@@ -341,9 +341,18 @@ data:extend({
|
||||
setting_type = 'startup',
|
||||
default_value = 200,
|
||||
minimum_value = 0,
|
||||
maximum_value = 1000,
|
||||
maximum_value = 400,
|
||||
order = 'IA5'
|
||||
}, {
|
||||
type = 'int-setting',
|
||||
name = 'PHI-PB-CRDB',
|
||||
setting_type = 'startup',
|
||||
default_value = 10,
|
||||
minimum_value = 0,
|
||||
maximum_value = 20,
|
||||
order = 'IA6'
|
||||
}
|
||||
--[[, {
|
||||
type = 'int-setting',
|
||||
name = 'PHI-PB-FMMS',
|
||||
setting_type = 'startup',
|
||||
@@ -352,7 +361,7 @@ data:extend({
|
||||
maximum_value = 10,
|
||||
order = 'IB1'
|
||||
}, {
|
||||
type = 'float-setting',
|
||||
type = 'double-setting',
|
||||
name = 'PHI-PB-FRS',
|
||||
setting_type = 'startup',
|
||||
default_value = 1.5,
|
||||
@@ -384,7 +393,7 @@ data:extend({
|
||||
maximum_value = 1000,
|
||||
order = 'IB5'
|
||||
}, {
|
||||
type = 'float-setting',
|
||||
type = 'double-setting',
|
||||
name = 'PHI-PB-FWRSM',
|
||||
setting_type = 'startup',
|
||||
default_value = 1.3,
|
||||
@@ -392,7 +401,7 @@ data:extend({
|
||||
maximum_value = 20,
|
||||
order = 'IB6'
|
||||
}, {
|
||||
type = 'float-setting',
|
||||
type = 'double-setting',
|
||||
name = 'PHI-PB-FWRBM',
|
||||
setting_type = 'startup',
|
||||
default_value = 1,
|
||||
@@ -416,5 +425,6 @@ data:extend({
|
||||
maximum_value = 20,
|
||||
order = 'IB9'
|
||||
}
|
||||
]]
|
||||
}
|
||||
)
|
||||
Reference in New Issue
Block a user