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