Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove custom armor to use Schall suit armor #10

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
---------------------------------------------------------------------------------------------------
Version:
Date:
Changes:
- Early Construction Light armor technology by just Early Contruction Light technology.
- Size of construction-robot is now 2*2 to balanced schall suit size.
Removes:
- light and heavy armor replaced by basic ingenior suit of Schall suit mod.
- heavy armor technology.
---------------------------------------------------------------------------------------------------
Version: 0.9.3
Date: 12. 03. 2022
Bugfixes:
Expand Down
4 changes: 2 additions & 2 deletions src/control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ on_built_entity = function (event)
local player = game.players[event.player_index]

entity.destroy()
player.print('Early construction robots cannot be deployed manually, use an early construction equipment in the armor instead.', {r=1,g=0,b=0,a=1})
player.print('Early construction robots cannot be deployed manually, use an early construction equipment in the basic schall suit instead.', {r=1,g=0,b=0,a=1})
player.insert({ name = 'early-construction-robot', count = 1 })
end

Expand Down Expand Up @@ -187,7 +187,7 @@ end

on_configuration_changed_handle_startup_setting_changes = function ()
for _, force in pairs(game.forces) do
if force.technologies['early-construction-light-armor'].researched then
if force.technologies['early-construction'].researched then
log(('[early_construction] resetting technology effects for force %q'):format(force.name))
force.reset_technology_effects()
end
Expand Down
176 changes: 4 additions & 172 deletions src/data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,6 @@ if settings.startup["early-construction-enable-entity-ghosts-when-destroyed"].va
} }
end

local light_armor_ingredients = {
{"light-armor", 1},
{"iron-plate", 10},
{"iron-gear-wheel", 5},
{"electronic-circuit", 40}
}
local heavy_armor_ingredients = {
{"early-construction-light-armor", 1},
{"heavy-armor", 1},
{"electronic-circuit", 200},
{"steel-plate", 20}
}
local equipment_ingredients = {
{"electronic-circuit", 10}
}
Expand All @@ -55,26 +43,13 @@ end
Bob's Electronics compatibility patch
]]
if data.raw.item["basic-circuit-board"] ~= nil then
patch_strings("electronic-circuit", "basic-circuit-board", light_armor_ingredients)
patch_strings("electronic-circuit", "basic-circuit-board", equipment_ingredients)
end

--[[
Industrial Revolution compatibility patch
]]
if data.raw.technology["deadlock-bronze-age"] ~= nil then
light_armor_ingredients = {
{"light-armor", 1},
{"copper-plate", 10},
{"tin-gear-wheel", 5},
{"copper-motor", 10}
}
heavy_armor_ingredients = {
{"early-construction-light-armor", 1},
{"heavy-armor", 1},
{"copper-motor", 50},
{"bronze-chassis-small", 1}
}
equipment_ingredients = {
{"copper-motor", 5}
}
Expand Down Expand Up @@ -109,27 +84,9 @@ local function robot_property(name)
return robot_clone_and_modify(base_robot[name])
end

-- Apply armor type to character animation, borrowed from Simply Power Armor MK3
-- Contributed by millerlarson
for _, animation in ipairs(data.raw['character']['character']['animations']) do
if animation.armors then
for _, armor in ipairs(animation.armors) do
if armor == 'light-armor' then
animation.armors[#animation.armors + 1] = 'early-construction-light-armor'
elseif armor == 'heavy-armor' then
animation.armors[#animation.armors + 1] = 'early-construction-heavy-armor'
end
end
end
end

data:extend(
{
-- Equipment
{
type = "equipment-category",
name = "early-construction-armor"
},
{
type = "item",
name = "early-construction-equipment",
Expand All @@ -152,8 +109,8 @@ data:extend(
priority = "medium"
},
shape = {
width = 1,
height = 1,
width = 2,
height = 2,
type = "full"
},
energy_source = {
Expand Down Expand Up @@ -182,90 +139,7 @@ data:extend(
charging_station_count = 0,
charging_distance = 1.6,
charging_threshold_distance = 5,
categories = {"early-construction-armor"}
},
-- Armor
{
type = "equipment-grid",
name = "small-early-construction-equipment-grid",
width = 1,
height = 1,
equipment_categories = {"early-construction-armor"}
},
{
type = "equipment-grid",
name = "medium-early-construction-equipment-grid",
width = 2,
height = 1,
equipment_categories = {"early-construction-armor"}
},
{
type = "armor",
name = "early-construction-light-armor",
icon = "__early_construction__/graphics/light-armor.png",
icon_size = 32,
flags = {},
resistances = {
{
type = "physical",
decrease = 3,
percent = 20
},
{
type = "acid",
decrease = 0,
percent = 20
},
{
type = "explosion",
decrease = 2,
percent = 20
},
{
type = "fire",
decrease = 0,
percent = 10
}
},
subgroup = "armor",
equipment_grid = "small-early-construction-equipment-grid",
order = "a[light-armor][early-construction]",
stack_size = 1,
infinite = true
},
{
type = "armor",
name = "early-construction-heavy-armor",
icon = "__early_construction__/graphics/heavy-armor.png",
icon_size = 32,
flags = {},
resistances = {
{
type = "physical",
decrease = 6,
percent = 30
},
{
type = "explosion",
decrease = 20,
percent = 30
},
{
type = "acid",
decrease = 0,
percent = 40
},
{
type = "fire",
decrease = 0,
percent = 30
}
},
subgroup = "armor",
equipment_grid = "medium-early-construction-equipment-grid",
order = "b[heavy-armor][early-construction]",
stack_size = 1,
infinite = true
categories = {"armor-early"}
},
-- Robot
{
Expand Down Expand Up @@ -319,22 +193,6 @@ data:extend(
shadow_working = robot_property('shadow_working'),
},
-- Recipes
{
type = "recipe",
name = "early-construction-light-armor",
enabled = false,
energy_required = 3,
ingredients = light_armor_ingredients,
result = "early-construction-light-armor"
},
{
type = "recipe",
name = "early-construction-heavy-armor",
enabled = false,
energy_required = 8,
ingredients = heavy_armor_ingredients,
result = "early-construction-heavy-armor"
},
{
type = "recipe",
enabled = false,
Expand All @@ -355,18 +213,14 @@ data:extend(
-- Technologies
{
type = "technology",
name = "early-construction-light-armor",
name = "early-construction",
icon_size = 128,
icon = "__early_construction__/graphics/technology.png",
effects = combine_effects({
{
type = "unlock-recipe",
recipe = "early-construction-robot"
},
{
type = "unlock-recipe",
recipe = "early-construction-light-armor"
},
{
type = "unlock-recipe",
recipe = "early-construction-equipment"
Expand All @@ -379,27 +233,5 @@ data:extend(
},
order = "a-c-a"
},
{
type = "technology",
name = "early-construction-heavy-armor",
icon_size = 128,
icon = "__early_construction__/graphics/technology.png",
effects = {
{
type = "unlock-recipe",
recipe = "early-construction-heavy-armor"
}
},
prerequisites = {"heavy-armor", "early-construction-light-armor", "logistic-science-pack"},
unit = {
count = 200,
ingredients = {
{"automation-science-pack", 1},
{"logistic-science-pack", 1}
},
time = 30
},
order = "a-c-b"
}
}
)
Binary file removed src/graphics/heavy-armor.png
Binary file not shown.
Binary file removed src/graphics/light-armor.png
Binary file not shown.
3 changes: 2 additions & 1 deletion src/info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "early_construction",
"version": "0.9.3",
"version": "0.10.0",
"title": "Early Construction",
"author": "Aidiakapi",
"contact": "aidiakapi@gmail.com",
Expand All @@ -9,6 +9,7 @@
"factorio_version": "1.1",
"dependencies": [
"base >= 1.1.0",
"? SchallSuit >= 1.0.0",
"?bobelectronics >= 0.18",
"?IndustrialRevolution >= 1.0"
]
Expand Down
12 changes: 2 additions & 10 deletions src/locale/en/locale.cfg
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
[mod-setting-name]
early-construction-enable-entity-ghosts-when-destroyed=Destroyed entities should leave ghosts
[mod-setting-description]
early-construction-enable-entity-ghosts-when-destroyed=When enabled, destroyed entities will leave behind ghost placed versions of themselves after you unlock the early game light armor.
early-construction-enable-entity-ghosts-when-destroyed=When enabled, destroyed entities will leave behind ghost placed versions of themselves after you unlock the early construction technologie.

[entity-name]
early-construction-robot=Early construction robot
[entity-description]
early-construction-robot=Early game construction robots that explode after one operation. For personal logistics only.

[item-name]
early-construction-light-armor=Early construction light armor
early-construction-heavy-armor=Early construction heavy armor

[equipment-name]
early-construction-equipment=Early construction equipment

[technology-name]
early-construction-light-armor=Early construction robots
early-construction-heavy-armor=Early construction heavy armor

[technology-description]
early-construction-light-armor=Unlocks early construction robots, and an upgraded light armor which can hold the equipment to deploy them.
early-construction=Unlocks early construction robots, and the equipment to deploy them.

12 changes: 3 additions & 9 deletions src/locale/ru/locale.cfg
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
[mod-setting-name]
early-construction-enable-entity-ghosts-when-destroyed=Уничтоженные объекты должны оставлять планы размещения себя
[mod-setting-description]
early-construction-enable-entity-ghosts-when-destroyed=Когда эта функция включена, уничтоженные объекты оставят после себя план размещения самих себя после того, как вы разблокируете легкую броню Early construction.
early-construction-enable-entity-ghosts-when-destroyed=Когда эта функция включена, уничтоженные объекты оставят после себя план размещения самих себя после того, как вы разблокируете технологии Early construction.

[entity-name]
early-construction-robot=Ранний строительный дрон
[entity-description]
early-construction-robot=Строительные дроны ранней игры, которые взрываются после одной операции. Только для личного использования.

[item-name]
early-construction-light-armor=Легкая броня Early construction
early-construction-heavy-armor=Тяжёлая броня Early construction

[equipment-name]
early-construction-equipment=Персональная дронстанция Early construction

[technology-name]
early-construction-light-armor=Ранние строительные дроны
early-construction-heavy-armor=Тяжёлая броня Early construction
early-construction=Ранние строительные дроны

[technology-description]
early-construction-light-armor=Открывает ранних строительных дронов и модернизированную легкую броню, в которую можно установит персональную дронстанцию Early construction.

early-construction=Открывает ранних строительных дронов, и персональную дронстанцию Early construction.