Turret Shields

by OwnlyMe

Lightweight scripted shields with power consumption for all turrets (configurable or researchable)

Content
1 year, 11 months ago
0.16 - 2.0
7.38K
Combat

g 2.1

6 days ago

Hi, could you update your mode to 2.1?

I got it working on my computer, I only had 2 lines in file "misc.lua", under sections "select", "alt_select" and "reverse_select"

        ignore_cannot_select_entities = true,
        ignore_cannot_select_tiles = true,
2 days ago
(updated 13 hours ago)

It could cause problems with these entities. I don't use them, and I didn't test them.

  • turret shield toggle
  • turret shield combinator

In "misc.lua", the edited code looks like this.

{
    type = "selection-tool",
    name = "ts-shield-disabler",
    icon = "__Turret-Shields__/graphics/blueprint.png",
    icon_size = 32,
    --flags = {"goes-to-quickbar"},
    selection_color = {r = 1.0, g = 0.55, b = 0.0, a = 0.2},
    alt_selection_color = {r = 1.0, g = 0.2, b = 0.0, a = 0.2},
    selection_mode = {"blueprint"},
    alt_selection_mode = {"blueprint"},
    selection_cursor_box_type = "electricity",
    alt_selection_cursor_box_type = "electricity",
    subgroup = "tool",
    order = "c[automated-construction]-d[outpost-builder]a",
    stack_size = 1,
    select =
    {
        border_color = {71, 255, 73},
        mode = {"blueprint", "deconstruct", "avoid-rolling-stock", "avoid-vehicle"},
        cursor_box_type = "not-allowed",
        started_sound = { filename = "__core__/sound/upgrade-select-start.ogg" },
        ended_sound = { filename = "__core__/sound/upgrade-select-end.ogg" },
        ignore_cannot_select_entities = true,
        ignore_cannot_select_tiles = true,
    },
    alt_select =
    {
        border_color = {239, 153, 34},
        mode = {"blueprint", "deconstruct", "avoid-rolling-stock", "avoid-vehicle"},
        cursor_box_type = "not-allowed",
        started_sound = { filename = "__core__/sound/upgrade-cancel-start.ogg" },
        ended_sound = { filename = "__core__/sound/upgrade-cancel-end.ogg" },
        ignore_cannot_select_entities = true,
        ignore_cannot_select_tiles = true,
    },
    reverse_select =
    {
        border_color = {246, 255, 0},
        mode = {"blueprint", "deconstruct", "avoid-rolling-stock", "avoid-vehicle"},
        cursor_box_type = "not-allowed",
        started_sound = { filename = "__core__/sound/upgrade-select-start.ogg" },
        ended_sound = { filename = "__core__/sound/upgrade-select-end.ogg" },
        ignore_cannot_select_entities = true,
        ignore_cannot_select_tiles = true,
    },
},---------------------------

New response