show-buildable/sb-util.lua

changeset 14
c26d4dd2af9b
equal deleted inserted replaced
13:826df96c3720 14:c26d4dd2af9b
1 entity_categories =
2 {
3 "container",
4 "storage-tank",
5 "transport-belt",
6 "underground-belt",
7 "splitter",
8 "loader",
9 "inserter",
10 "electric-pole",
11 "pipe",
12 "pipe-to-ground",
13 "pump",
14 "straight-rail",
15 "half-diagonal-rail",
16 "curved-rail-a",
17 "curved-rail-b",
18 "elevated-straight-rail",
19 "elevated-half-diagonal-rail",
20 "elevated-curved-rail-a",
21 "elevated-curved-rail-b",
22 "legacy-straight-rail",
23 "legacy-curved-rail",
24 "rail-ramp",
25 "rail-support",
26 "train-stop",
27 "rail-signal",
28 "rail-chain-signal",
29 "logistic-container",
30 "roboport",
31 "lamp",
32 "arithmetic-combinator",
33 "decider-combinator",
34 "selector-combinator",
35 "constant-combinator",
36 "power-switch",
37 "programmable-speaker",
38 "display-panel",
39 "boiler",
40 "generator",
41 "fusion-reactor",
42 "fusion-generator",
43 "mining-drill",
44 "offshore-pump",
45 "furnace",
46 "assembling-machine",
47 "agricultural-tower",
48 "lab",
49 "lightning-attractor",
50 "reactor",
51 "beacon",
52 "rocket-silo",
53 "cargo-landing-pad",
54 "cargo-bay",
55 "asteroid-collector",
56 "thruster",
57 "wall",
58 "gate",
59 "radar",
60 "land-mine",
61 "ammo-turret",
62 "electric-turret",
63 "fluid-turret",
64 "artillery-turret",
65 "plant",
66 "simple-entity-with-force",
67 "simple-entity-with-owner",
68 "electric-energy-interface",
69 "linked-container",
70 "proxy-container",
71 "heat-interface",
72 "heat-pipe",
73 "lane-splitter",
74 "linked-belt",
75 "valve",
76 "burner-generator",
77 "cargo-pod",
78 "temporary-container",
79 "asteroid",
80 "turret",
81 "unit-spawner",
82 "spider-unit",
83 "character",
84 "simple-entity",
85 "corpse",
86 "rail-remnants",
87 "explosion",
88 "particle-source",
89 "fire",
90 "sticker",
91 "stream",
92 "artillery-flare",
93 "artillery-projectile",
94 "projectile",
95 "segment",
96 "spider-leg",
97 "beam",
98 "character-corpse",
99 "speech-bubble",
100 "loader-1x1",
101 "rocket-silo-rocket",
102 "market",
103 "solar-panel",
104 }
105
106 ---@param entity data.EntityPrototype|LuaEntityPrototype
107 ---@param needle_flag EntityPrototypeFlag
108 function has_flag(entity, needle_flag)
109 for _, flag in pairs(entity.flags or {})
110 do
111 if flag == needle_flag
112 then
113 return true
114 end
115 end
116 return false
117 end

mercurial