mirror of
https://github.com/peter-tanner/017-science-transition-mod.git
synced 2024-11-30 11:00:19 +08:00
added belt-immunity-eq. lds in high eq. fix axe
This commit is contained in:
parent
2dce2d07a1
commit
3692b6750f
|
@ -107,8 +107,12 @@ if settings.startup["017-axe"].value then
|
|||
if player.cursor_stack.valid_for_read then
|
||||
-- game.print(axe)
|
||||
-- game.print(player.cursor_stack.name)
|
||||
if player.cursor_stack.name == highest_speed[player.force.name][1] then
|
||||
player.clean_cursor()
|
||||
if highest_speed == nil then
|
||||
ax_gen()
|
||||
else
|
||||
if player.cursor_stack.name == highest_speed[player.force.name][1] then
|
||||
player.clean_cursor()
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
|
|
@ -90,6 +90,82 @@ if settings.startup["017-axe"].value then
|
|||
end
|
||||
end
|
||||
|
||||
if settings.startup["017-equipment"].value and data.raw["recipe"]["belt-immunity-equipment"] == nil then
|
||||
data:extend({
|
||||
{
|
||||
type = "technology",
|
||||
name = "belt-immunity-equipment",
|
||||
icon_size = 128,
|
||||
icon = "__017_science__/graphics/belt-immunity-equipment.png",
|
||||
prerequisites = {"modular-armor"},
|
||||
effects =
|
||||
{
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "belt-immunity-equipment"
|
||||
}
|
||||
},
|
||||
unit =
|
||||
{
|
||||
count = 50,
|
||||
ingredients = {{"science-pack-1", 1}, {"science-pack-2", 1}},
|
||||
time = 15
|
||||
},
|
||||
order = "g-ga"
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "belt-immunity-equipment",
|
||||
enabled = false,
|
||||
energy_required = 10,
|
||||
ingredients =
|
||||
{
|
||||
{"advanced-circuit", 5},
|
||||
{"steel-plate", 10}
|
||||
},
|
||||
result = "belt-immunity-equipment"
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
local lds_recipes = {
|
||||
"energy-shield-mk2-equipment",
|
||||
"battery-mk2-equipment",
|
||||
"fusion-reactor-equipment",
|
||||
"personal-laser-defense-equipment",
|
||||
"discharge-defense-equipment", -- sorry for indirectly nerfing discharge-defense :(
|
||||
"exoskeleton-equipment",
|
||||
"personal-roboport-mk2-equipment",
|
||||
"power-armor-mk2"
|
||||
}
|
||||
|
||||
if settings.startup["017-lds"].value then
|
||||
local recipe = data.raw["recipe"]
|
||||
for _, r in pairs(recipe) do
|
||||
for _, l in pairs(lds_recipes) do
|
||||
if r.name == l then
|
||||
modified = false
|
||||
for _=1, #r.ingredients do
|
||||
if r.ingredients[_][1] == "steel-plate" then
|
||||
local n = math.ceil(r.ingredients[_][2] / 2)
|
||||
table.remove(r.ingredients, _)
|
||||
r.ingredients[#r.ingredients+1] = {"low-density-structure", n}
|
||||
modified = true
|
||||
end
|
||||
end
|
||||
if modified == false then
|
||||
for _=1, #r.ingredients do
|
||||
if r.ingredients[_][1] == "processing-unit" then
|
||||
local n = math.ceil(r.ingredients[_][2] / settings.startup["017-lds-num"].value)
|
||||
r.ingredients[#r.ingredients+1] = {"low-density-structure", n}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--HUGE THANKS to Dimava for the following changes
|
||||
--Added options for some changes (for modded users)
|
||||
|
||||
|
|
BIN
017_science/graphics/belt-immunity-equipment.png
Normal file
BIN
017_science/graphics/belt-immunity-equipment.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "017_science",
|
||||
"version": "0.0.10",
|
||||
"version": "0.0.11",
|
||||
"factorio_version": "0.16",
|
||||
"title": "0.17 science conversion",
|
||||
"author": "npc_strider(morley376)",
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
[technology-name]
|
||||
belt-immunity-equipment=Belt immunity equipment
|
||||
|
||||
[item-name]
|
||||
science-pack-1=Automation science pack
|
||||
science-pack-2=Logistics science pack
|
||||
|
@ -13,6 +16,9 @@ high-tech-science-pack=Utility science pack
|
|||
017-recipes-changes=Misc. recipe changes in 0.17
|
||||
017-durability=Infinite armor/tool durability
|
||||
017-axe=mining-tool (axe) removal
|
||||
017-equipment=Belt immunity equipment
|
||||
017-lds=low-density-structure in recipes
|
||||
017-lds-num=low-density-structure factor
|
||||
|
||||
[mod-setting-description]
|
||||
017-drill=(Default enabled) Toggle FFF-266 mining changes (removed hardness). This mod makes all vanilla ore hardness = 1 and makes the burner-mining-drill mining_power = 3, which may break modded ore gating.
|
||||
|
@ -21,4 +27,7 @@ high-tech-science-pack=Utility science pack
|
|||
017-old-science=(Default disabled) Toggle the old science recipes (0.16), including LDS. When disabled it removes the ability to use the vanilla science and LDS recipes (except SP 1 & 2) but allows existing crafting machines to continue using the recipe until manually changed.
|
||||
017-recipes-changes=(Default enabled) atomic-bomb and power-armor-mk2 recipe changes
|
||||
017-durability=(Default enabled) All armor now have inf. durability (https://forums.factorio.com/viewtopic.php?p=384185#p384185). Axes also have inf. durability to reflect the removal of mining-tool items.
|
||||
017-axe=(Default enabled) IMPORTANT NOTE: It is highly recomended that infinite durability is enabled when using this option to prevent duplicate items. Implements the FFF-266 changes as best as possible. Instead of mining-tools being crafted, they are inserted and locked to the player's tool slot when they're researched. The best mining-tool is used over lower speed ones.
|
||||
017-axe=(Default enabled) IMPORTANT NOTE: It is highly recomended that infinite durability is enabled when using this option to prevent duplicate items. Implements the FFF-266 changes as best as possible. Instead of mining-tools being crafted, they are inserted and locked to the player's tool slot when they're researched. The best mining-tool is used over lower speed ones.
|
||||
017-equipment=(Default enabled) Adds belt-immunity-equipment tech and recipe (FFF-256). Note that if another mod that adds belt-immunity-equipment recipe is present, this mod's unlock will be disabled. Disabling this option in an existing game will NOT remove the item - only the recipe & tech.
|
||||
017-lds=(Default enabled) low-density-structure is also used in multiple advanced personal equipment recipes (mk2 items, fusion reactor, laser defense) instead of steel (FFF-257). NOTE: the cost values in this mod are NOT official, and won't affect other mods (contact me if you want your modded recipe added.). Where possible the cost = math.ceil(n("steel-plate")/2)
|
||||
017-lds-num=(Default 5) When steel-plate is not present in vanilla 'high tech' equipment recipes, the cost is determined by the number of "processing-unit"s. math.ceil(n("processing-unit")/thissetting)
|
|
@ -41,5 +41,25 @@ data:extend(
|
|||
name = "017-durability",
|
||||
setting_type = "startup",
|
||||
default_value = true
|
||||
},
|
||||
{
|
||||
type = "bool-setting",
|
||||
name = "017-lds",
|
||||
setting_type = "startup",
|
||||
default_value = true
|
||||
},
|
||||
{
|
||||
type = "int-setting",
|
||||
name = "017-lds-num",
|
||||
setting_type = "startup",
|
||||
minimum_value = 1,
|
||||
maximum_value = 32,
|
||||
default_value = 5
|
||||
},
|
||||
{
|
||||
type = "bool-setting",
|
||||
name = "017-equipment",
|
||||
setting_type = "startup",
|
||||
default_value = true
|
||||
}
|
||||
})
|
Loading…
Reference in New Issue
Block a user