Overview
Comment: | add basic architecture, rebalance minerals & recipes, fix dumb fab bug |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
99aefdbd9eb4e6a143ddfb1fce3710be |
User & Date: | lexi on 2024-05-15 15:23:42 |
Other Links: | manifest | tags |
Context
2024-05-15
| ||
18:51 | add (nonfunctional) floor heater check-in: d6efac25ef user: lexi tags: trunk | |
15:23 | add basic architecture, rebalance minerals & recipes, fix dumb fab bug check-in: 99aefdbd9e user: lexi tags: trunk | |
2024-05-09
| ||
15:33 | add beginnings of construction system, add cuprite, fix granite, tweak balance, add sane asset management system check-in: d831add94c user: lexi tags: trunk | |
Changes
Modified asset.list from [a70ff394cb] to [249bbd7770].
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
mods/starlit-building/textures/starlit-item-hinge.png mods/starlit-building/textures/starlit-item-insulation.png mods/starlit-building/textures/starlit-item-pipe.png mods/starlit-building/textures/starlit-item-panel.png mods/starlit-building/textures/starlit-item-concrete.png mods/starlit-building/textures/starlit-node-concrete.png mods/starlit-building/textures/starlit-node-floor-panel-side.png mods/starlit-building/textures/starlit-node-floor-panel-side-conduit.png mods/starlit-building/textures/starlit-node-floor-panel-top.png mods/starlit-building/textures/starlit-node-floor-panel-top-vent.png mods/starlit-building/textures/starlit-node-insulation-top.png mods/starlit-building/textures/starlit-node-insulation-cable-top.png mods/starlit-eco/textures/starlit-eco-plant-berry-bunch.png mods/starlit-eco/textures/starlit-eco-plant-bloom-leaf.png mods/starlit-eco/textures/starlit-eco-plant-bloom-petal.png mods/starlit-eco/textures/starlit-eco-plant-bloom-stalk.png mods/starlit-eco/textures/starlit-eco-plant-fiber.png mods/starlit-eco/textures/starlit-eco-plant-grass-high.png mods/starlit-eco/textures/starlit-eco-plant-grass-sprig.png |
< > > > > | |
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
mods/starlit-building/textures/starlit-item-hinge.png mods/starlit-building/textures/starlit-item-insulation.png mods/starlit-building/textures/starlit-item-pipe.png mods/starlit-building/textures/starlit-item-panel.png mods/starlit-building/textures/starlit-item-concrete.png mods/starlit-building/textures/starlit-node-concrete.png mods/starlit-building/textures/starlit-node-floor-panel-side.png mods/starlit-building/textures/starlit-node-floor-panel-top.png mods/starlit-building/textures/starlit-node-floor-panel-top-vent.png mods/starlit-building/textures/starlit-node-insulation-top.png mods/starlit-building/textures/starlit-node-cable-run.png mods/starlit-building/textures/starlit-node-cable-plug.png mods/starlit-building/textures/starlit-node-pipe-run.png mods/starlit-building/textures/starlit-node-pipe-plug.png mods/starlit-building/textures/starlit-node-insulated-panels.png mods/starlit-eco/textures/starlit-eco-plant-berry-bunch.png mods/starlit-eco/textures/starlit-eco-plant-bloom-leaf.png mods/starlit-eco/textures/starlit-eco-plant-bloom-petal.png mods/starlit-eco/textures/starlit-eco-plant-bloom-stalk.png mods/starlit-eco/textures/starlit-eco-plant-fiber.png mods/starlit-eco/textures/starlit-eco-plant-grass-high.png mods/starlit-eco/textures/starlit-eco-plant-grass-sprig.png |
Modified makefile from [ebfb2ead99] to [3b17e07d68].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
all: asset-sync doc-sync starlit.html: starlit.ct cortav -y html:fossil-uv "$<" -o "$@" .PHONY: doc-sync doc-sync: starlit.html fossil uv add "$<" fossil uv sync asset.cpxz: asset.list $(cat asset.list) cpio -o <"$<" | xz >"$@" .PHONY: asset-sync asset-sync: asset.cpxz fossil uv add "$<" fossil uv sync |
> > | > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
all: asset-sync doc-sync repo-uri = https://c.hale.su/starlit starlit.html: starlit.ct cortav -y html:fossil-uv "$<" -o "$@" .PHONY: doc-sync doc-sync: starlit.html fossil uv add "$<" fossil uv sync asset.cpxz: asset.list $(shell cat asset.list) cpio -o <"$<" | xz >"$@" .PHONY: asset-sync asset-sync: asset.cpxz fossil uv add "$<" fossil uv sync .PHONY: unpack unpack: fossil uv ex asset.cpxz asset.cpxz || curl $(repo-uri)/uv/asset.cpxz -o asset.cpxz xzcat asset.cpxz | cpio -i |
Modified mods/starlit-building/init.lua from [76e0104e11] to [c6afb91b3d].
88 89 90 91 92 93 94 95 96 97 98 99 100 101 ... 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 ... 205 206 207 208 209 210 211 212 |
minetest.register_craftitem(id, { short_description = e.name; description = starlit.ui.tooltip { title = e.name; desc = e.desc; props = props; }; inventory_image = e.img; on_place = function(stack, luser, point) local node = minetest.get_node(point.under) local function tryBuild() local p = B.path[node.name] if not p then return nil end if (not p.part) or (not p.part[id]) then return nil end ................................................................................ local grp = e.groups and table.copy(e.groups) or {} grp.stage = 1 minetest.register_node(id, { description = 'Construction'; drawtype = (e.box and 'nodebox') or (e.mesh and 'mesh') or 'regular'; paramtype = (e.box or e.mesh or e.light) and 'light' or nil; paramtype2 = e.stateful or 'none'; tiles = e.tex; node_box = e.box; mesh = e.mesh; groups = grp; _starlit = { stage = id; }; }) if e.begin then for _, kind in ipairs {'part', 'tool'} do for i, v in ipairs(e.begin[kind] or {}) do assert(B.begin[kind][v] == nil, 'attempted to overwrite buildpath beginning') B.begin[kind][v] = id ................................................................................ end end end end) starlit.include 'parts' starlit.include 'stages' |
> | | > | |
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 ... 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 ... 207 208 209 210 211 212 213 214 |
minetest.register_craftitem(id, { short_description = e.name; description = starlit.ui.tooltip { title = e.name; desc = e.desc; props = props; }; stack_max = e.max or (e.mass and math.min(math.max(math.floor(500 / e.mass), 1), 500)) or 10; inventory_image = e.img; on_place = function(stack, luser, point) local node = minetest.get_node(point.under) local function tryBuild() local p = B.path[node.name] if not p then return nil end if (not p.part) or (not p.part[id]) then return nil end ................................................................................ local grp = e.groups and table.copy(e.groups) or {} grp.stage = 1 minetest.register_node(id, { description = 'Construction'; drawtype = (e.box and 'nodebox') or (e.mesh and 'mesh') or 'regular'; paramtype = e.paramtype or (e.box or e.mesh or e.light) and 'light' or nil; paramtype2 = e.paramtype2 or 'none'; tiles = e.tex; node_box = e.box; mesh = e.mesh; groups = grp; _starlit = { stage = id; recover = e.recover; }; }) if e.begin then for _, kind in ipairs {'part', 'tool'} do for i, v in ipairs(e.begin[kind] or {}) do assert(B.begin[kind][v] == nil, 'attempted to overwrite buildpath beginning') B.begin[kind][v] = id ................................................................................ end end end end) starlit.include 'parts' starlit.include 'stages/arch' |
Modified mods/starlit-building/parts.lua from [d434edb6db] to [6e6ea77d78].
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
...
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
B.part.link('starlit_building:concrete', { name = 'Concrete'; desc = 'A sturdy base for modular construction units.'; img = 'starlit-item-concrete.png'; fab = starlit.type.fab { element = { calcium = 1; carbon = 4; }; cost = {power = 200}; flag = {print=true}; time = {print=5}; }; mass = 5; rarity = 1; }) B.part.link('starlit_building:insulation', { name = 'Insulation'; desc = 'An aerogel that traps heat very effectively.'; img = 'starlit-item-insulation.png'; ................................................................................ B.part.link('starlit_building:panel', { name = 'Panel'; desc = 'A sheet of aluminum suitable for use as a wall or floor panel.'; img = 'starlit-item-panel.png'; fab = starlit.type.fab { element = { aluminum = 8; }; cost = {power = 300}; flag = {print=true}; time = {print=15}; }; mass = 8; rarity = 1; }) B.part.link('starlit_building:pipe', { name = 'Pipe'; desc = 'A pipe suitable for conveying liquids or gasses.'; img = 'starlit-item-pipe.png'; |
|
|
|
|
|
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
...
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
B.part.link('starlit_building:concrete', { name = 'Concrete'; desc = 'A sturdy base for modular construction units.'; img = 'starlit-item-concrete.png'; fab = starlit.type.fab { element = { calcium = 1; carbon = 3; }; cost = {power = 200}; flag = {print=true}; time = {print=5}; }; mass = 4; rarity = 1; }) B.part.link('starlit_building:insulation', { name = 'Insulation'; desc = 'An aerogel that traps heat very effectively.'; img = 'starlit-item-insulation.png'; ................................................................................ B.part.link('starlit_building:panel', { name = 'Panel'; desc = 'A sheet of aluminum suitable for use as a wall or floor panel.'; img = 'starlit-item-panel.png'; fab = starlit.type.fab { element = { aluminum = 4; }; cost = {power = 300}; flag = {print=true}; time = {print=15}; }; mass = 4; rarity = 1; }) B.part.link('starlit_building:pipe', { name = 'Pipe'; desc = 'A pipe suitable for conveying liquids or gasses.'; img = 'starlit-item-pipe.png'; |
Modified mods/starlit-building/stages/arch.lua from [3af63c8d88] to [1fcd279ec2].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
local lib = starlit.mod.lib local B = starlit.mod.building B.stage.link('starlit_building:stage_foundation', { tex = { 'starlit-node-concrete.png'; }; begin = { part = { 'starlit_building:concrete'; }; }; build = { part = { ['starlit_building:insulation'] = 'starlit_building:stage_foundation_insulation'; }; }; box = { type = 'fixed'; fixed = { -.5, -.5, -.5; .5, -.5 + (2/16), .5; }; }; }) B.stage.link('starlit_building:stage_foundation_insulation', { tex = { 'starlit-node-insulation-top.png'; 'starlit-node-concrete.png'; 'starlit-node-floor-panel-side.png'; }; build = { part = { ['starlit_building:insulation'] = 'starlit_building:stage_foundation_insulation_x2'; ['starlit_building:cable_electric'] = 'starlit_building:stage_foundation_insulation_conduit'; }; }; box = { type = 'fixed'; fixed = { -.5, -.5, -.5; .5, -.5 + (6/16), .5; }; }; }) B.stage.link('starlit_building:stage_foundation_insulation_x2', { tex = { 'starlit-node-insulation-top.png'; 'starlit-node-concrete.png'; 'starlit-node-floor-panel-side.png'; }; build = { part = { ['starlit_building:panel'] = 'starlit_building:floor'; }; }; box = { type = 'fixed'; fixed = { -.5, -.5, -.5; .5, -.5 + (14/16), .5; }; }; }) B.stage.link('starlit_building:stage_foundation_insulation_conduit', { tex = { 'starlit-node-insulation-cable-top.png'; 'starlit-node-concrete.png'; 'starlit-node-floor-panel-side-conduit.png'; }; groups = { conduit = 1; }; build = { part = { ['starlit_building:insulation'] = 'starlit_building:stage_foundation_insulated_conduit'; }; }; box = { type = 'fixed'; fixed = { -.5, -.5, -.5; .5, -.5 + (8/16), .5; }; }; }) B.stage.link('starlit_building:stage_foundation_insulated_conduit', { tex = { 'starlit-node-insulation-top.png'; 'starlit-node-concrete.png'; 'starlit-node-floor-panel-side-conduit.png'; }; build = { part = { ['starlit_building:panel'] = 'starlit_building:conduit'; }; }; groups = { conduit = 1; }; box = { type = 'fixed'; fixed = { -.5, -.5, -.5; .5, -.5 + (14/16), .5; }; }; }) B.stage.link('starlit_building:conduit', { tex = { 'starlit-node-floor-panel-top.png'; 'starlit-node-concrete.png'; 'starlit-node-floor-panel-side-conduit.png'; }; groups = { conduit = 1; }; }) B.stage.link('starlit_building:floor', { tex = { 'starlit-node-floor-panel-top.png'; 'starlit-node-concrete.png'; 'starlit-node-floor-panel-side.png'; }; }) |
> > > > > > > | > > | < < < < < < < < < < < < < < < < < < < < < < < | < < < < < < < < < < < < < < < < < < < < < < < > > > > > > > > | | > > | > > > > > | < < > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | > > > > > > > > > > > > > > > > > > > > > > > | | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | > > > > > > | > > > > > > > > > > > > > > > > > > > > > > > > > > | > | > > > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 |
local lib = starlit.mod.lib local B = starlit.mod.building local function fabFor(x) local def = ItemStack(x):get_definition() assert(def ~= nil, 'invalid item ID ' .. tostring(x)) return (def._starlit and def._starlit.recover) or starlit.type.fab {} end B.stage.link('starlit_building:foundation', { tex = { 'starlit-node-concrete.png'; }; begin = { part = { 'starlit_building:concrete'; }; }; build = { part = { ['starlit_building:insulation'] = 'starlit_building:stage_foundation_insulation'; ['starlit_building:concrete'] = 'starlit_building:step_concrete'; }; }; recover = fabFor 'starlit_building:concrete'; box = { type = 'fixed'; fixed = { -.5, -.5, -.5; .5, -.5 + (2/16), .5; }; }; }) B.stage.link('starlit_building:step_concrete', { tex = { 'starlit-node-concrete.png'; }; build = { part = { ['starlit_building:concrete'] = 'starlit_building:pillar_concrete'; }; }; recover = fabFor 'starlit_building:concrete' * 2; box = { type = 'fixed'; fixed = { -.5, -.5, -.5; .5, -.5 + (8/16), .5; }; }; }) B.stage.link('starlit_building:pillar_concrete', { tex = { 'starlit-node-concrete.png'; }; recover = fabFor 'starlit_building:concrete' * 3; }) B.stage.link('starlit_building:stage_foundation_insulation', { tex = { 'starlit-node-insulation-top.png'; 'starlit-node-concrete.png'; 'starlit-node-floor-panel-side.png'; }; recover = fabFor 'starlit_building:concrete' + fabFor 'starlit_building:insulation'; build = { part = { ['starlit_building:panel'] = 'starlit_building:floor'; }; tool = { object = { speed = 2; drop = 'starlit_building:insulation'; swap = 'starlit_building:foundation'; }; }; }; box = { type = 'fixed'; fixed = { -.5, -.5, -.5; .5, -.5 + (12/16), .5; }; }; }) B.panelRun = lib.registry.mk 'starlit_building:panelRun' B.panelRun.foreach('starlit_building:runGen', {}, function(id, run) local F = string.format assert(run.name, 'missing name for panelrun') local name = run.name local buildPart = ItemStack(run.buildPart):get_name() local plugItem = ItemStack(run.plugItem):get_name() local floorStageRaw = id .. '_floor_open' local floorStage = id .. '_floor' local floorStagePlug = id .. '_floor_plug' local wallStageRaw = id .. '_wall_open' local wallStage = id .. '_wall' local wallStagePlug = id .. '_wall_plug' local texRun = run.run or F('starlit-node-%s-run.png', name) local texPlug = run.plug or F('starlit-node-%s-plug.png', name) local imgRun = lib.image(texRun) local imgPlug = lib.image(texPlug) local baseMat = fabFor(run.buildPart) + fabFor 'starlit_building:insulation' local floorMat = baseMat + fabFor 'starlit_building:concrete' local wallMat = baseMat + fabFor 'starlit_building:panel' ------------------ -- floor stages -- ------------------ B.stage.link(floorStageRaw, { tex = { imgRun:blit(lib.image 'starlit-node-insulation-top.png'):render(); 'starlit-node-concrete.png'; imgPlug:blit(lib.image 'starlit-node-floor-panel-side.png'):render(); }; recover = floorMat; build = { part = { ['starlit_building:panel'] = floorStage; }; tool = { object = { speed = 1; drop = run.buildPart; swap = floorStageRaw; }; }; }; box = { type = 'fixed'; fixed = { -.5, -.5, -.5; .5, -.5 + (12/16), .5; }; }; }) local floorBasis = run.floorBasis or 'starlit_building:stage_foundation_insulation' B.pathLink(floorBasis, 'part', buildPart, floorStageRaw) mat = floorMat + fabFor 'starlit_building:panel'; B.stage.link(floorStage, { tex = { 'starlit-node-floor-panel-top.png'; 'starlit-node-concrete.png'; imgPlug:blit(lib.image 'starlit-node-floor-panel-side.png'):render(); }; recover = floorMat + fabFor 'starlit_building:panel'; build = { part = { [plugItem] = floorStagePlug; }; tool = { unscrew = { speed = 1; drop = 'starlit_building:panel'; swap = floorBasis; }; }; }; groups = run.groups; }) if run.plugGroups then B.stage.link(floorStagePlug, { tex = { imgPlug:blit(lib.image 'starlit-node-floor-panel-top.png'):render(); 'starlit-node-concrete.png'; imgPlug:blit(lib.image 'starlit-node-floor-panel-side.png'):render(); }; recover = floorMat + fabFor(run.plugItem); build = { tool = { unscrew = { speed = 1; drop = run.plugItem; swap = floorStage; }; }; }; groups = run.plugGroups; }) end ----------------- -- wall stages -- ----------------- local imgPanel = lib.image 'starlit-node-insulated-panels.png' B.stage.link(wallStageRaw, { tex = { imgPlug:blit(imgPanel):render(); imgPlug:blit(imgPanel):render(); imgPlug:blit(imgPanel:transform 'R270'):render(); imgPlug:blit(imgPanel:transform 'R90'):render(); imgRun:blit(lib.image 'starlit-node-insulation-top.png'):render(); 'starlit-node-floor-panel-top.png'; }; recover = wallMat; build = { part = { ['starlit_building:panel'] = wallStage; }; }; groups = run.groups; paramtype2 = '4dir'; box = { type = 'fixed'; fixed = { -.5, -.5, -.5; 0.5, 0.5, -.5 + (12/16); }; }; }) local wallBasis = run.wallBasis or 'starlit_building:stage_wall_insulation' B.pathLink(wallBasis, 'part', buildPart, wallStageRaw) B.stage.link(wallStage, { tex = { imgPlug:blit(imgPanel):render(); imgPlug:blit(imgPanel):render(); imgPlug:blit(imgPanel:transform 'R270'):render(); imgPlug:blit(imgPanel:transform 'R90'):render(); 'starlit-node-floor-panel-top.png'; 'starlit-node-floor-panel-top.png'; }; recover = wallMat + fabFor 'starlit_building:panel'; build = { part = { [plugItem] = wallStagePlug; }; }; paramtype2 = '4dir'; groups = run.groups; }) if run.plugGroups then B.stage.link(wallStagePlug, { tex = { imgPlug:blit(imgPanel):render(); imgPlug:blit(imgPanel):render(); imgPlug:blit(imgPanel:transform 'R270'):render(); imgPlug:blit(imgPanel:transform 'R90'):render(); 'starlit-node-floor-panel-top.png'; imgPlug:blit(lib.image 'starlit-node-floor-panel-top.png'):render(); }; recover = wallMat + fabFor(plugItem); build = { }; paramtype2 = '4dir'; groups = run.plugGroups; }) end end) B.stage.link('starlit_building:floor', { tex = { 'starlit-node-floor-panel-top.png'; 'starlit-node-concrete.png'; 'starlit-node-floor-panel-side.png'; }; recover = fabFor 'starlit_building:concrete' + fabFor 'starlit_building:insulation' + fabFor 'starlit_building:panel'; build = { tool = { unscrew = { speed = 2; drop = 'starlit_building:panel'; swap = 'starlit_building:stage_foundation_insulation'; }; }; }; }) B.stage.link('starlit_building:stage_wall_panel', { tex = { 'starlit-node-insulated-panels.png'; 'starlit-node-insulated-panels.png'; 'starlit-node-insulated-panels.png^[transformR270'; 'starlit-node-insulated-panels.png^[transformR90'; 'starlit-node-floor-panel-top.png'; }; recover = fabFor 'starlit_building:panel'; begin = { part = {'starlit_building:panel'}; }; build = { part = { ['starlit_building:insulation'] = 'starlit_building:stage_wall_insulation'; }; }; paramtype2 = '4dir'; box = { type = 'fixed'; fixed = { -.5, -.5, -.5; 0.5, 0.5, -.5 + (2/16); }; }; }) B.stage.link('starlit_building:stage_wall_insulation', { tex = { 'starlit-node-insulated-panels.png'; 'starlit-node-insulated-panels.png'; 'starlit-node-insulated-panels.png^[transformR270'; 'starlit-node-insulated-panels.png^[transformR90'; 'starlit-node-insulation-top.png'; 'starlit-node-floor-panel-top.png'; }; recover = fabFor 'starlit_building:panel' + fabFor 'starlit_building:insulation'; build = { part = { ['starlit_building:panel'] = 'starlit_building:wall'; }; }; paramtype2 = '4dir'; box = { type = 'fixed'; fixed = { -.5, -.5, -.5; 0.5, 0.5, -.5 + (12/16); }; }; }) B.stage.link('starlit_building:wall', { tex = { 'starlit-node-insulated-panels.png'; 'starlit-node-insulated-panels.png'; 'starlit-node-insulated-panels.png^[transformR270'; 'starlit-node-insulated-panels.png^[transformR90'; 'starlit-node-floor-panel-top.png'; 'starlit-node-floor-panel-top.png'; }; recover = (fabFor 'starlit_building:panel' * 2) + fabFor 'starlit_building:insulation'; build = { }; paramtype2 = '4dir'; }) B.panelRun.link('starlit_building:conduit_power', { name = 'cable'; buildPart = 'starlit_building:cable_electric'; plugItem = 'starlit_building:electrode'; groups = { conduit_power = 1; conduit_data = 1; }; plugGroups = { conduit_power = 2; conduit_data = 2; }; }) B.panelRun.link('starlit_building:conduit_fluid', { name = 'pipe'; buildPart = 'starlit_building:pipe'; plugItem = 'starlit_building:pipe'; groups = { conduit_fluid = 1; }; plugGroups = { conduit_fluid = 2; }; }) |
Modified mods/starlit/fab.lua from [f85992f960] to [06631e46d8].
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 |
for cat, vals in pairs(b) do if not new[cat] then new[cat] = lib.tbl.copy(vals) else local f = fields[cat].op for k,v in pairs(vals) do local n = f(new[cat][k], v, 1) new[cat][k] = n > 0 and n or nil end end end return new end; __mul = function(x,n) local new = fab {} for cat, vals in pairs(x) do new[cat] = {} local f = fields[cat].op for k,v in pairs(vals) do local num = f(v,nil,n) new[cat][k] = num > 0 and num or nil end end return new end; __div = function(x,n) return x * (1/n) end; } starlit.type.fab = fab |
> | > > > | |
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 |
for cat, vals in pairs(b) do if not new[cat] then new[cat] = lib.tbl.copy(vals) else local f = fields[cat].op for k,v in pairs(vals) do local n = f(new[cat][k], v, 1) if type(n) == 'number' and n < 0 then n = nil end new[cat][k] = n end end end return new end; __mul = function(x,n) if n == 1 then return fab.clone(x) end local new = fab {} if n == 0 then return new end for cat, vals in pairs(x) do new[cat] = {} local f = fields[cat].op for k,v in pairs(vals) do local num = f(v,nil,n) if type(num) == 'number' and n < 0 then n = nil end new[cat][k] = num end end return new end; __div = function(x,n) return x * (1/n) end; } starlit.type.fab = fab |
Modified mods/starlit/terrain.lua from [5c8125f149] to [eeb268d7fe].
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
...
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
|
recover = starlit.type.fab { time = { shred = 3; }; cost = { shredPower = 3; }; }; recover_vary = function(rng, ctx) return starlit.type.fab { element = { aluminum = rng:int(0,4); potassium = rng:int(0,2); calcium = rng:int(0,2); } }; end; }) ................................................................................ dist = { kind = 'sheet'; among = 'starlit:mineral_feldspar'; height = {-200,30}; sheetCols = {1, 16}; }; recover = starlit.type.fab { time = { shred = 3.5; }; cost = { shredPower = 8; }; }; recover_vary = function(rng, ctx) return starlit.type.fab { element = { iron = rng:int(0,4); magnesium = rng:int(0,2); titanium = rng:int(0,1); } }; end; }) starlit.world.mineral.link('starlit:mineral_cuprite', { name = T 'Cuprite'; |
|
|
|
|
|
|
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
...
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
|
recover = starlit.type.fab { time = { shred = 3; }; cost = { shredPower = 3; }; }; recover_vary = function(rng, ctx) return starlit.type.fab { element = { aluminum = rng:int(0,16); potassium = rng:int(0,2); calcium = rng:int(0,2); } }; end; }) ................................................................................ dist = { kind = 'sheet'; among = 'starlit:mineral_feldspar'; height = {-200,30}; sheetCols = {1, 16}; }; recover = starlit.type.fab { time = { shred = 3.3; }; cost = { shredPower = 8; }; }; recover_vary = function(rng, ctx) return starlit.type.fab { element = { iron = rng:int(0,16); magnesium = rng:int(0,8); titanium = rng:int(0,2); } }; end; }) starlit.world.mineral.link('starlit:mineral_cuprite', { name = T 'Cuprite'; |