Skip to content

Commit

Permalink
2.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Wip-Sama committed May 13, 2021
1 parent c32188e commit 69b36a7
Show file tree
Hide file tree
Showing 11 changed files with 201 additions and 45 deletions.
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"Lua.diagnostics.globals": [
"settings",
"data",
"mods"
]
}
38 changes: 38 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,42 @@
---------------------------------------------------------------------------------------------------
Version: 2.0.7
Date: 10/05/2021
Added:
- nothing value to if suel disabler
- bonus balancing setting (accelleration/max speed) (easy is the old one)
- recipe balancing setting (item needed/time needed) (easy is the old one)
- technology balancing setting (prerequisite/scienze pack) (easy is the old one)
Changes:
- internal code changes
- removed some weird stuff from the changelog
- hidden (plan to remove) KR fuel and recator Fuel
- removed "data-final-fixes-old"
---------------------------------------------------------------------------------------------------
Version: 2.0.6
Date: 2021/03/06
Changes:
- same as 2.0.5 but for factorio 1.1
---------------------------------------------------------------------------------------------------
Version: 2.0.5
Date: 06/03/2020
Changes:
- changed script to make Infinite Fuel available everywhere
---------------------------------------------------------------------------------------------------
Version: 2.0.4
Date: 202/03/06
Changes:
- same as 2.0.3 but for factorio 1.1
---------------------------------------------------------------------------------------------------
Version: 2.0.3
Date: 06/03/2020
Changes:
- changed script to make Infinite Fuel available everywhere
---------------------------------------------------------------------------------------------------
Version: 2.0.2
Date: 05/12/2020
Changes:
- factorio 1.1 update
---------------------------------------------------------------------------------------------------
Version: 2.0.1
Date: 16/10/2020
Added:
Expand Down
10 changes: 6 additions & 4 deletions data-final-fixes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ local entity_list = {
"mining-drill",
"boiler",
"furnace",
"reactor",
}
--[
if mods["Krastorio2"] then

if settings.startup["IF-enable-on-nuclear-reactor"].value == true then
table.insert(entity_list, "reactor")
end

if mods["Krastorio2"].value == true and settings.startup["IF-kr-Infinite-Fuel"].value == true then
table.insert(entity_list, "generator-equipment")
table.insert(entity_list, "spider-vehicle")
end
--]]

for _, entity in pairs(entity_list) do

Expand Down
98 changes: 84 additions & 14 deletions data-updates.lua
Original file line number Diff line number Diff line change
@@ -1,36 +1,106 @@
--going to be removed
if mods["Krastorio2"] and settings.startup["IF-kr-Infinite-Fuel"].value == true then
data.raw.item["kr-Infinite-Fuel"].fuel_category = "vehicle-fuel"
data.raw.recipe["kr-Infinite-Fuel"].hidden = false
table.insert(data.raw["technology"]["Infinite-Power"].effects, {type = "unlock-recipe",recipe = "kr-Infinite-Fuel"} )
--data.raw.recipe["kr-Infinite-Fuel"].hidden = false
--table.insert(data.raw["technology"]["Infinite-Power"].effects, {type = "unlock-recipe",recipe = "kr-Infinite-Fuel"} )
end
if settings.startup["IF-kr-Infinite-Fuel"].value == false or not settings.startup["IF-kr-Infinite-Fuel"].value == true then
data.raw.item["kr-Infinite-Fuel"].fuel_category = "nothing"
data.raw.recipe["kr-Infinite-Fuel"].hidden = true
data.raw.recipe["kr-Infinite-Fuel"].enabled = false
if settings.startup["IF-kr-Infinite-Fuel"].value == false then
--data.raw.item["kr-Infinite-Fuel"].fuel_category = "nothing"
end

if settings.startup["IF-enable-on-nuclear-reactor"].value == true then
data.raw.item["Reactor-Infinite-Fuel"].fuel_category = "nuclear"
data.raw.recipe["Reactor-Infinite-Fuel"].hidden = false
table.insert(data.raw["technology"]["Infinite-Power"].effects, {type = "unlock-recipe",recipe = "Reactor-Infinite-Fuel"} )
--data.raw.recipe["Reactor-Infinite-Fuel"].hidden = false
--table.insert(data.raw["technology"]["Infinite-Power"].effects, {type = "unlock-recipe",recipe = "Reactor-Infinite-Fuel"} )
end
if settings.startup["IF-enable-on-nuclear-reactor"].value == false then
data.raw.item["Reactor-Infinite-Fuel"].fuel_category = "nothing"
data.raw.recipe["Reactor-Infinite-Fuel"].hidden = true
data.raw.recipe["Reactor-Infinite-Fuel"].enabled = false
--data.raw.item["Reactor-Infinite-Fuel"].fuel_category = "nothing"
end
--going to be removed end

local IFFD = settings.startup["IF-fuel-disabler"].value
if IFFD == "tier 1" or IFFD == "tier 2" or IFFD == "tier 3" then
local IFFD2 = {}
if IFFD == "tier 1" then
IFFD2 = 1
elseif IFFD == "tier 2" then
IFFD2 = 2
elseif IFFD == "tier 3" then
IFFD2 = 3
else
IFFD2 = 0
end

if IFFD2 >= 1 then
data.raw["recipe"]["Infinite-Fuel"].hidden = false
data.raw["technology"]["Infinite-Power"].hidden = false
table.insert(data.raw["technology"]["Infinite-Power"].effects, {type = "unlock-recipe",recipe = "Infinite-Fuel"} )
if IFFD == "tier 2" or IFFD == "tier 3" then
if IFFD2 >= 2 then
data.raw["recipe"]["Boosted-Infinite-Fuel"].hidden = false
table.insert(data.raw["technology"]["Infinite-Power"].effects, {type = "unlock-recipe",recipe = "Boosted-Infinite-Fuel"} )
if IFFD == "tier 3" then
if IFFD2 >= 3 then
data.raw["recipe"]["Ultra-Boosted-Infinite-Fuel"].hidden = false
table.insert(data.raw["technology"]["Infinite-Power"].effects, {type = "unlock-recipe",recipe = "Ultra-Boosted-Infinite-Fuel"} )
end
end
end

--Fuel Balancer
local recipebalancing = settings.startup["IF-fuel-recipebalancer"].value
if recipebalancing == "easy" then
elseif recipebalancing == "normal" then
data.raw["recipe"]["Infinite-Fuel"].ingredients = {{"nuclear-fuel", 10}}
data.raw["recipe"]["Boosted-Infinite-Fuel"].ingredients = {{"Infinite-Fuel", 10}}
data.raw["recipe"]["Ultra-Boosted-Infinite-Fuel"].ingredients = {{"Boosted-Infinite-Fuel", 10}}
data.raw["recipe"]["Infinite-Fuel"].energy_required = 750
data.raw["recipe"]["Boosted-Infinite-Fuel"].energy_required = 1500
data.raw["recipe"]["Ultra-Boosted-Infinite-Fuel"].energy_required = 3000
elseif recipebalancing == "hard" then
data.raw["recipe"]["Infinite-Fuel"].ingredients = {{"nuclear-fuel", 20}, {"rocket-fuel", 10}}
data.raw["recipe"]["Boosted-Infinite-Fuel"].ingredients = {{"Infinite-Fuel", 20}, {"rocket-fuel", 10}}
data.raw["recipe"]["Ultra-Boosted-Infinite-Fuel"].ingredients = {{"Boosted-Infinite-Fuel", 20}, {"rocket-fuel", 10}}
data.raw["recipe"]["Infinite-Fuel"].energy_required = 1250
data.raw["recipe"]["Boosted-Infinite-Fuel"].energy_required = 2500
data.raw["recipe"]["Ultra-Boosted-Infinite-Fuel"].energy_required = 5000
elseif recipebalancing == "extreme" then
data.raw["recipe"]["Infinite-Fuel"].ingredients = {{"nuclear-fuel", 40}, {"rocket-fuel", 20}, {"low-density-structure", 5}, {"processing-unit", 5}}
data.raw["recipe"]["Boosted-Infinite-Fuel"].ingredients = {{"Infinite-Fuel", 40}, {"rocket-fuel", 20}, {"low-density-structure", 5}, {"processing-unit", 5}}
data.raw["recipe"]["Ultra-Boosted-Infinite-Fuel"].ingredients = {{"Boosted-Infinite-Fuel", 40}, {"rocket-fuel", 20}, {"low-density-structure", 5}, {"processing-unit", 5}}
data.raw["recipe"]["Infinite-Fuel"].energy_required = 2500
data.raw["recipe"]["Boosted-Infinite-Fuel"].energy_required = 5000
data.raw["recipe"]["Ultra-Boosted-Infinite-Fuel"].energy_required = 10000
else
end

local bonusbalancing = settings.startup["IF-fuel-bonusbalancer"].value
if bonusbalancing == "easy" then
elseif bonusbalancing == "normal" then
data.raw["item"]["Infinite-Fuel"].fuel_acceleration_multiplier = 2.5
data.raw["item"]["Boosted-Infinite-Fuel"].fuel_acceleration_multiplier = 5
data.raw["item"]["Ultra-Boosted-Infinite-Fuel"].fuel_acceleration_multiplier = 10
data.raw["item"]["Infinite-Fuel"].fuel_top_speed_multiplier = 4.5
data.raw["item"]["Boosted-Infinite-Fuel"].fuel_top_speed_multiplier = 6
data.raw["item"]["Ultra-Boosted-Infinite-Fuel"].fuel_top_speed_multiplier = 9.5
elseif bonusbalancing == "hard" then
data.raw["item"]["Infinite-Fuel"].fuel_acceleration_multiplier = 2
data.raw["item"]["Boosted-Infinite-Fuel"].fuel_acceleration_multiplier = 4
data.raw["item"]["Ultra-Boosted-Infinite-Fuel"].fuel_acceleration_multiplier = 8
data.raw["item"]["Infinite-Fuel"].fuel_top_speed_multiplier = 4
data.raw["item"]["Boosted-Infinite-Fuel"].fuel_top_speed_multiplier = 5
data.raw["item"]["Ultra-Boosted-Infinite-Fuel"].fuel_top_speed_multiplier = 6
elseif bonusbalancing == "extreme" then
data.raw["item"]["Infinite-Fuel"].fuel_acceleration_multiplier = 1.5
data.raw["item"]["Boosted-Infinite-Fuel"].fuel_acceleration_multiplier = 2
data.raw["item"]["Ultra-Boosted-Infinite-Fuel"].fuel_acceleration_multiplier = 2.5
data.raw["item"]["Infinite-Fuel"].fuel_top_speed_multiplier = 3
data.raw["item"]["Boosted-Infinite-Fuel"].fuel_top_speed_multiplier = 3.5
data.raw["item"]["Ultra-Boosted-Infinite-Fuel"].fuel_top_speed_multiplier = 4
else
end

local technologybalancing = settings.startup["IF-fuel-technologybalancer"].value
if technologybalancing == "easy" then
data.raw["technology"]["Infinite-Power"].prerequisites = {"oil-processing"}
data.raw["technology"]["Infinite-Power"].ingredients = {{"automation-science-pack", 1}, {"logistic-science-pack", 1}, {"chemical-science-pack", 1}}
elseif technologybalancing == "normal" then
else
end
4 changes: 2 additions & 2 deletions info.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "InfiniteFuel",
"version": "2.0.1",
"factorio_version": "1.0",
"version": "2.0.7",
"factorio_version": "1.1",
"title": "Infinite Fuel",
"author": "WipMod",
"contact": "https://t.me/wipmod",
Expand Down
8 changes: 7 additions & 1 deletion locale/en/local.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,14 @@ Reactor-Infinite-Fuel= Reactor Infinite Fuel
IF-fuel-disabler= Number of fuels
IF-enable-on-nuclear-reactor= Fuel in the reactor
IF-kr-Infinite-Fuel= Krastorio 2 fuel
IF-fuel-recipebalancer= Balance recipe
IF-fuel-bonusbalancer= Balance Bonus
IF-fuel-technologybalancer= Balance Technology

[mod-setting-description]
IF-fuel-disabler= Select the allowed
IF-enable-on-nuclear-reactor= Add an infinite fuel for the nuclear reactor (nuclear)
IF-kr-Infinite-Fuel= Add an infinite fuel for the vehicle with krastorio 2 (vehicle-fuel)
IF-kr-Infinite-Fuel= Add an infinite fuel for the vehicle with krastorio 2 (vehicle-fuel)
IF-fuel-recipebalancer= change the recipe/time to craft of the IF (extreme is more difficult)
IF-fuel-bonusbalancer= change the accelleration/accelleration speed of the IF (extreme is less powerful)
IF-fuel-technologybalancer= change the technology prerequisite/cost to unlok all teh IF (normal is more difficult)
18 changes: 8 additions & 10 deletions prototypes/fuel_category.lua
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
data:extend(
{
data:extend({
{
type = "fuel-category",
name = "IF",
localised_name = "omni fuel",
type = "fuel-category",
name = "IF",
localised_name = "omni fuel",
},
{
type = "fuel-category",
name = "nothing",
localised_name = "if this is showed an error as occurred",
type = "fuel-category",
name = "nothing",
localised_name = "if this is showed an error as occurred",
}
}
)
})
8 changes: 3 additions & 5 deletions prototypes/item.lua
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
data:extend(
{
data:extend({
{
type = "item",
name = "Infinite-Fuel",
icon = "__InfiniteFuel__/graphics/infinite-fuel-1.png",
icon_size = 256,
fuel_category = "IF",
fuel_value = "1e309YJ",
fuel_acceleration_multiplier = 3.5,
fuel_acceleration_multiplier = 3,
fuel_top_speed_multiplier = 4,
subgroup = "intermediate-product",
order = "q[InfitineFuel]-a",
Expand Down Expand Up @@ -65,5 +64,4 @@ data:extend(
order = "q[InfitineFuel]-f",
stack_size = 10
},
}
)
})
6 changes: 2 additions & 4 deletions prototypes/recipe.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
data:extend(
{
data:extend({
{
type = "recipe",
name = "Infinite-Fuel",
Expand Down Expand Up @@ -80,5 +79,4 @@ data:extend(
},
result = "kr-Infinite-Fuel"
},
}
)
})
6 changes: 4 additions & 2 deletions prototypes/technology.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ data:extend(
hidden = "true",
icon = "__InfiniteFuel__/graphics/infinite-fuel-tech.png",
icon_size = 256,
prerequisites = {"oil-processing"},
prerequisites = {"oil-processing", "kovarex-enrichment-process"},
effects =
{
--{type = "unlock-recipe",recipe = "Infinite-Fuel"},
Expand All @@ -20,7 +20,9 @@ data:extend(
{
{"automation-science-pack", 1},
{"logistic-science-pack", 1},
{"chemical-science-pack", 2},
{"chemical-science-pack", 1},
{"chemical-production-pack", 1},
{"chemical-advanced-pack", 1},
},
time = 55
},
Expand Down
43 changes: 40 additions & 3 deletions settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ data:extend({
order = "aa",
setting_type = "startup",
default_value = "tier 3",
allowed_values =
{
allowed_values ={
"nothing",
"tier 1",
"tier 2",
"tier 3"
Expand All @@ -25,6 +25,43 @@ data:extend({
hidden = "true",
order = "ac",
setting_type = "startup",
default_value = "true",
default_value = "false",
},
{
type = "string-setting",
name = "IF-fuel-recipebalancer",
order = "ba",
setting_type = "startup",
default_value = "normal",
allowed_values ={
"easy",
"normal",
"hard",
"extreme"
},
},
{
type = "string-setting",
name = "IF-fuel-bonusbalancer",
order = "bb",
setting_type = "startup",
default_value = "normal",
allowed_values ={
"easy",
"normal",
"hard",
"extreme"
},
},
{
type = "string-setting",
name = "IF-fuel-technologybalancer",
order = "bc",
setting_type = "startup",
default_value = "normal",
allowed_values ={
"easy",
"normal"
},
},
})

0 comments on commit 69b36a7

Please sign in to comment.