Skip to content

Commit 350f472

Browse files
authored
v2.0.35
v2.0.35
2 parents 0c8af33 + 5dd8883 commit 350f472

File tree

5 files changed

+63
-75
lines changed

5 files changed

+63
-75
lines changed

data/compatibility/krastorio2.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
if mods["Krastorio2"] then
22
local spider = data.raw["spider-vehicle"]["constructron"]
3-
if spider then
3+
if data.raw["spider-vehicle"]["constructron"] then
44
spider.equipment_grid = "kr-spidertron-equipment-grid"
55
end
6+
local spider_rocket = data.raw["spider-vehicle"]["constructron-rocket-powered"]
7+
if data.raw["spider-vehicle"]["constructron-rocket-powered"] then
8+
spider_rocket.equipment_grid = "kr-spidertron-equipment-grid"
9+
end
610
end
Lines changed: 45 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,53 @@
1-
local lib_spider = require("data/lib/lib_spider")
21

3-
-------------------------------------------------------------------------------
2+
------------------------------------------------------------------------------
43
-- Entity
54
-------------------------------------------------------------------------------
65

7-
local spidertron_definition = {
6+
local args = {
87
name = "constructron-rocket-powered",
9-
guns = {},
108
scale = 1,
11-
leg_scale = 0,
12-
legs = {
13-
{
14-
block = {1},
15-
angle = 0,
16-
length = 1
17-
}
18-
},
19-
collision_mask = {"colliding-with-tiles-only", "ground-tile", "water-tile"}
9+
leg_scale = 1,
10+
leg_movement_speed = 1,
11+
leg_thickness = 1,
2012
}
21-
local constructron = lib_spider.create_spidertron(spidertron_definition)
22-
constructron.se_allow_in_space = true
2313

24-
if mods["Krastorio2"] then
25-
constructron.equipment_grid = "kr-spidertron-equipment-grid"
26-
end
14+
local spider_leg = {
15+
type = "spider-leg",
16+
name = "constructron-rocket-powered-leg",
17+
localised_name = {"entity-name.spidertron-leg"},
18+
collision_box = {{-0.1, -0.1}, {0.1, 0.1}},
19+
selection_box = {{-0.5, -0.5}, {0.5, 0.5}},
20+
icon = "__base__/graphics/icons/spidertron.png",
21+
collision_mask = { layers = { } },
22+
target_position_randomisation_distance = 0.25,
23+
minimal_step_size = 4,
24+
stretch_force_scalar = 1,
25+
knee_height = 2.5,
26+
knee_distance_factor = 0.4,
27+
initial_movement_speed = 100,
28+
movement_acceleration = 100,
29+
max_health = 100,
30+
base_position_selection_distance = 6,
31+
movement_based_position_selection_distance = 4,
32+
selectable_in_game = false,
33+
alert_when_damaged = false,
34+
}
35+
data:extend({spider_leg})
2736

28-
--Rocket flames
29-
-- local layers = constructron.graphics_set.base_animation.layers
30-
-- for _, layer in pairs(layers) do
31-
-- layer.repeat_count = 8
32-
-- layer.hr_version.repeat_count = 8
33-
-- end
34-
-- table.insert(
35-
-- layers,
36-
-- 1,
37-
-- {
38-
-- filename = "__base__/graphics/entity/rocket-silo/10-jet-flame.png",
39-
-- priority = "medium",
40-
-- blend_mode = "additive",
41-
-- draw_as_glow = true,
42-
-- width = 87,
43-
-- height = 128,
44-
-- frame_count = 8,
45-
-- line_length = 8,
46-
-- animation_speed = 0.5,
47-
-- scale = 1.25,
48-
-- shift = util.by_pixel(-0.5, 55),
49-
-- direction_count = 1,
50-
-- hr_version = {
51-
-- filename = "__base__/graphics/entity/rocket-silo/hr-10-jet-flame.png",
52-
-- priority = "medium",
53-
-- blend_mode = "additive",
54-
-- draw_as_glow = true,
55-
-- width = 172,
56-
-- height = 256,
57-
-- frame_count = 8,
58-
-- line_length = 8,
59-
-- animation_speed = 0.5,
60-
-- scale = 1.25 / 2,
61-
-- shift = util.by_pixel(-1, 80),
62-
-- direction_count = 1
63-
-- }
64-
-- }
65-
-- )
37+
create_spidertron(args)
6638

67-
local leg_entities = lib_spider.create_spidertron_legs(spidertron_definition)
39+
-- remove legs from the spidertron entity
40+
local spidertron = data.raw["spider-vehicle"]["constructron-rocket-powered"]
41+
spidertron.spider_engine.legs = { -- 1
42+
leg = "constructron-rocket-powered-leg",
43+
mount_position = {0, -1},
44+
ground_position = {0, -1},
45+
walking_group = 1,
46+
}
47+
48+
if mods["Krastorio2"] then
49+
spidertron.equipment_grid = "kr-spidertron-equipment-grid"
50+
end
6851

6952
-------------------------------------------------------------------------------
7053
-- Item
@@ -97,23 +80,15 @@ local constructron_recipe = {
9780
name = "constructron-rocket-powered",
9881
enabled = false,
9982
ingredients = {
100-
{type = "item", name = "constructron", amount = 1},
101-
{type = "item", name = "jetpack-1", amount = 4}
83+
{type = "item", name = "spidertron", amount = 1},
84+
{type = "item", name = "jetpack-1", amount = 4},
10285
},
10386
results = {
104-
{type = "item", name = "constructron-rocket-powered", amount = 1}
87+
{type = "item", name = "constructron-rocket-powered", amount = 1},
10588
},
10689
energy = 1
10790
}
10891

109-
local ctron_rocket_powered = {constructron, constructron_item}
110-
table.insert(ctron_rocket_powered, constructron_recipe)
111-
112-
for _, leg in pairs(leg_entities) do
113-
leg.se_allow_in_space = true
114-
table.insert(ctron_rocket_powered, leg)
115-
end
116-
11792
-------------------------------------------------------------------------------
11893
-- Technology
11994
-------------------------------------------------------------------------------
@@ -129,4 +104,5 @@ table.insert(
129104
-- Extend
130105
-------------------------------------------------------------------------------
131106

132-
data:extend(ctron_rocket_powered)
107+
data:extend({constructron_item})
108+
data:extend({constructron_recipe})

locale/ru/locale.cfg

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ missing_power=Необходим источник питания!
3232
stuck=Застрял!
3333
fleeing=Убегает!
3434
trying_diff_station=Пробует другую станцию
35+
no_station_power=Нет питания на станции!
3536
no_logi_robots=В сети нет логистических роботов!
3637
no_logi_storage=В сети нет логистического хранилища!
3738
dest_station_invalid=Станция назначения не исправна!
@@ -49,6 +50,7 @@ no_landfill=Перезапуск задания: отсутствует отсы
4950
clearing_inventory=Освобождает инвентарь
5051
new=Новая задача
5152
delivering_cargo=Выгружает
53+
safe_position=Двигается на безопасную позицию
5254

5355
[ctron_gui_locale]
5456
all_logistics_req=Логистические запросы
@@ -72,6 +74,7 @@ job_card_cargo_name=Доставка
7274
job_card_destroy_name=Уничтожение
7375
job_card_utility_name=Снабжение
7476
job_status=Ожидание свободного Конструктрона
77+
chunk_delay=Начало через __1__ секунд
7578
job_locate_button=Показать
7679
job_locate_button_tooltip=Посмотреть место задачи
7780
job_remote_button=Управление
@@ -99,6 +102,7 @@ settings_robot_count_label=Количество дронов
99102
settings_robot_count_tooltip=Количество дронов, используемых при выполнении задач. Обычно это значение устанавливается в максимальное количество, поддерживаемое дронстанцией
100103
settings_robot_selection_label=Выбор дронов
101104
settings_robot_selection_tooltip=Тип дронов используемых для выполнения задач
105+
settings_zone_restriction_label=Ограничения зоны
102106
settings_zone_restriction_tooltip=Переключение заданий в зонах строительства дронстанций. Полезно для предотвращения выполнения конструкторами заданий в пределах диапазона стройки дронстанции. Применяется ко всем типам заданий.
103107
settings_construction_jobs_label=Строительство
104108
settings_construction_jobs_tooltip=Конструктроны будут автоматически строить призрачные сущности.
@@ -113,10 +117,14 @@ settings_destroy_jobs_tooltip=Включает режим уничтожения
113117
settings_repair_jobs_label=Ремонт
114118
settings_repair_jobs_tooltip=Конструктроны будут автоматически ремонтировать строения.
115119
settings_repair_tool_selection_label=Инструменты ремонта
120+
settings_repair_tool_selection_tooltip=Эти инструменты будут использоваться для ремонта
116121
settings_ammo_selection_label=Вооружение
117122
settings_ammo_selection_tooltip=Тип боеприпасов для уничтожения противников
118123
settings_ammo_count_label=Боеприпасов
119124
settings_ammo_count_tooltip=Количество боеприпасов для уничтожения
125+
settings_atomic_selection_label=Выбор ядерных боеприпасов
126+
settings_atomic_count_label=Количество ядерных боеприпасов
127+
settings_min_cluster_size_label=Минимальный размер кластера
120128

121129
job_title=Информация о работе
122130
job_worker_minimap_label=Местонахождение рабочего

script/entity_processor.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ script.on_event(ev.on_player_alt_selected_area, function (event)
401401
for _, entity in pairs(event.entities) do
402402
if entity and entity.valid and entity.name == "constructron" then
403403
for _, job in pairs(storage.jobs) do
404-
if job.worker.unit_number == entity.unit_number then
404+
if job.worker and job.worker.unit_number == entity.unit_number then
405405
if not player.gui.screen.ctron_job_window then
406406
gui_job.buildJobGui(player, job)
407407
player.opened = player.gui.screen.ctron_job_window

script/job/destroy.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -422,10 +422,10 @@ local threat_weights = {
422422
["big-spitter"] = 2,
423423
["behemoth-spitter"] = 3,
424424

425-
["small-worm-turret"] = 1,
426-
["medium-worm-turret"] = 2,
427-
["big-worm-turret"] = 4,
428-
["behemoth-worm-turret"] = 6,
425+
["small-worm-turret"] = 0.1,
426+
["medium-worm-turret"] = 0.5,
427+
["big-worm-turret"] = 1,
428+
["behemoth-worm-turret"] = 2,
429429

430430
["biter-spawner"] = 0.5,
431431
["spitter-spawner"] = 0.5,

0 commit comments

Comments
 (0)