mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 11:05:22 +09:00
.
This commit is contained in:
@@ -531,6 +531,224 @@ local items = {
|
||||
graphics_name = 'exoskeleton-equipment'
|
||||
}
|
||||
},
|
||||
['bonus'] = {
|
||||
player_bonus = {
|
||||
{
|
||||
name = 'character_mining_speed_modifier',
|
||||
enabled = true,
|
||||
min = 0,
|
||||
max = 2
|
||||
},
|
||||
{
|
||||
name = 'character_running_speed_modifier',
|
||||
enabled = true,
|
||||
min = 0,
|
||||
max = 1.5
|
||||
},
|
||||
{
|
||||
name = 'character_crafting_speed_modifier',
|
||||
enabled = true,
|
||||
min = 0,
|
||||
max = 5
|
||||
},
|
||||
{
|
||||
name = 'character_reach_distance_bonus',
|
||||
enabled = true,
|
||||
min = 0,
|
||||
max = 10
|
||||
},
|
||||
{
|
||||
name = 'character_resource_reach_distance_bonus',
|
||||
enabled = true,
|
||||
min = 0,
|
||||
max = 10
|
||||
},
|
||||
{
|
||||
name = 'character_build_distance_bonus',
|
||||
enabled = true,
|
||||
min = 0,
|
||||
max = 10
|
||||
},
|
||||
{
|
||||
name = 'character_item_pickup_distance_bonus',
|
||||
enabled = false,
|
||||
min = 0,
|
||||
max = 0
|
||||
},
|
||||
{
|
||||
name = 'character_loot_pickup_distance_bonus',
|
||||
enabled = false,
|
||||
min = 0,
|
||||
max = 0
|
||||
},
|
||||
{
|
||||
name = 'character_item_drop_distance_bonus',
|
||||
enabled = false,
|
||||
min = 0,
|
||||
max = 5
|
||||
},
|
||||
{
|
||||
name = 'character_inventory_slots_bonus',
|
||||
enabled = true,
|
||||
min = 0,
|
||||
max = 100
|
||||
},
|
||||
{
|
||||
name = 'character_health_bonus',
|
||||
enabled = true,
|
||||
min = 0,
|
||||
max = 200
|
||||
}
|
||||
},
|
||||
force_bonus = {
|
||||
{
|
||||
name = 'manual_mining_speed_modifier',
|
||||
enabled = false,
|
||||
min = 0,
|
||||
max = 2
|
||||
},
|
||||
{
|
||||
name = 'character_running_speed_modifier',
|
||||
enabled = false,
|
||||
min = 0,
|
||||
max = 1
|
||||
},
|
||||
{
|
||||
name = 'character_crafting_speed_modifier',
|
||||
enabled = false,
|
||||
min = 0,
|
||||
max = 5
|
||||
},
|
||||
{
|
||||
name = 'character_reach_distance_bonus',
|
||||
enabled = false,
|
||||
min = 0,
|
||||
max = 10
|
||||
},
|
||||
{
|
||||
name = 'character_resource_reach_distance_bonus',
|
||||
enabled = false,
|
||||
min = 0,
|
||||
max = 10
|
||||
},
|
||||
{
|
||||
name = 'character_build_distance_bonus',
|
||||
enabled = false,
|
||||
min = 0,
|
||||
max = 10
|
||||
},
|
||||
{
|
||||
name = 'character_item_pickup_distance_bonus',
|
||||
enabled = false,
|
||||
min = 0,
|
||||
max = 0
|
||||
},
|
||||
{
|
||||
name = 'character_loot_pickup_distance_bonus',
|
||||
enabled = false,
|
||||
min = 0,
|
||||
max = 0
|
||||
},
|
||||
{
|
||||
name = 'character_item_drop_distance_bonus',
|
||||
enabled = false,
|
||||
min = 0,
|
||||
max = 5
|
||||
},
|
||||
{
|
||||
name = 'character_inventory_slots_bonus',
|
||||
enabled = false,
|
||||
min = 0,
|
||||
max = 100
|
||||
},
|
||||
{
|
||||
name = 'character_health_bonus',
|
||||
enabled = false,
|
||||
min = 0,
|
||||
max = 200
|
||||
},
|
||||
{
|
||||
name = 'worker_robots_speed_modifier',
|
||||
enabled = false,
|
||||
min = 0,
|
||||
max = 1.3
|
||||
},
|
||||
{
|
||||
name = 'worker_robots_battery_modifier',
|
||||
enabled = true,
|
||||
min = 0,
|
||||
max = 1
|
||||
},
|
||||
{
|
||||
name = 'worker_robots_storage_bonus',
|
||||
enabled = true,
|
||||
min = 0,
|
||||
max = 1
|
||||
},
|
||||
{
|
||||
name = 'following_robots_lifetime_modifier',
|
||||
enabled = true,
|
||||
min = 0,
|
||||
max = 1
|
||||
},
|
||||
{
|
||||
name = 'character_trash_slot_count',
|
||||
enabled = false,
|
||||
min = 0,
|
||||
max = 20
|
||||
},
|
||||
{
|
||||
name = 'mining_drill_productivity_bonus',
|
||||
enabled = false,
|
||||
min = 0,
|
||||
max = 0
|
||||
},
|
||||
{
|
||||
name = 'train_braking_force_bonus',
|
||||
enabled = false,
|
||||
min = 0,
|
||||
max = 0
|
||||
},
|
||||
{
|
||||
name = 'laboratory_speed_modifier',
|
||||
enabled = false,
|
||||
min = 0,
|
||||
max = 0
|
||||
},
|
||||
{
|
||||
name = 'laboratory_productivity_bonus',
|
||||
enabled = false,
|
||||
min = 0,
|
||||
max = 0
|
||||
},
|
||||
{
|
||||
name = 'inserter_stack_size_bonus',
|
||||
enabled = false,
|
||||
min = 0,
|
||||
max = 0
|
||||
},
|
||||
{
|
||||
name = 'stack_inserter_capacity_bonus',
|
||||
enabled = false,
|
||||
min = 0,
|
||||
max = 0
|
||||
},
|
||||
{
|
||||
name = 'artillery_range_modifier',
|
||||
enabled = false,
|
||||
min = 0,
|
||||
max = 0
|
||||
}
|
||||
},
|
||||
surface_bonus = {
|
||||
{
|
||||
name = 'solar_power_multiplier',
|
||||
enabled = false,
|
||||
min = 0,
|
||||
max = 0
|
||||
}
|
||||
}
|
||||
},
|
||||
['recipe'] = {
|
||||
{
|
||||
name='iron-plate',
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
local items = require 'config'
|
||||
local main = require 'main'
|
||||
|
||||
local function clock_display(sec)
|
||||
local s = math.floor(sec) % 60
|
||||
local m = math.floor(sec / 60) % 60
|
||||
@@ -21,3 +24,35 @@ if settings.startup['PHI-XC'].value then
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
if settings.startup['PHI-PB'].value then
|
||||
commands.add_command('bonus', nil, function(command)
|
||||
local player
|
||||
|
||||
if command.player_index then
|
||||
player = game.get_player(command.player_index)
|
||||
|
||||
else
|
||||
game.print('Command Error')
|
||||
return
|
||||
end
|
||||
|
||||
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)
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
@@ -48,6 +48,12 @@ data:extend({
|
||||
setting_type = 'startup',
|
||||
default_value = false,
|
||||
order = 'A8'
|
||||
}, {
|
||||
type = 'bool-setting',
|
||||
name = 'PHI-PB',
|
||||
setting_type = 'startup',
|
||||
default_value = false,
|
||||
order = 'A9'
|
||||
}, {
|
||||
type = 'int-setting',
|
||||
name = 'PHI-EN-SOLAR-TIER',
|
||||
|
||||
Reference in New Issue
Block a user