added belt-immunity-eq. lds in high eq. fix axe

This commit is contained in:
Peter 2019-01-12 14:33:03 +08:00
parent 2dce2d07a1
commit 3692b6750f
6 changed files with 113 additions and 4 deletions

View File

@ -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)

View File

@ -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)

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -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)",

View File

@ -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.
@ -22,3 +28,6 @@ high-tech-science-pack=Utility science pack
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-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)

View File

@ -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
}
})