Differences From
Artifact [aee56c43bb]:
- File
mods/starlit/init.lua
— part of check-in
[953151446f]
at
2024-05-05 19:31:39
on branch trunk
— better alarm LEDs, continue work on matter compiler UI, hack around gravitational horrorscape (i.e. stop shitting all over the server's `minetest.conf`), better stat interface, tweak some compute stats, be more generous with starting battery loadout, mercilessly squash numberless bugs beneath my jackbooted heel
(user:
lexi,
size: 13248)
[annotate]
[blame]
[check-ins using]
54 54 };
55 55
56 56 interface = lib.registry.mk 'starlit:interface';
57 57 item = {
58 58 food = lib.registry.mk 'starlit:food';
59 59 seed = lib.registry.mk 'starlit:seed';
60 60 };
61 +
62 + -- complex algorithms that cut across namespaces or don't belong anywhere else
63 + alg = {};
61 64
62 65 region = {
63 66 radiator = {
64 67 store = AreaStore();
65 68 emitters = {};
66 69 };
67 70 };
................................................................................
275 278
276 279 starlit.include 'fx/nano'
277 280
278 281 starlit.include 'element'
279 282
280 283 starlit.include 'terrain'
281 284 starlit.include 'interfaces'
285 +starlit.include 'compile'
282 286 starlit.include 'suit'
283 287
284 288 -- minetest.settings:set('movement_gravity', starlit.world.planet.gravity) -- ??? seriously???
285 289 -- THIS OVERRIDES THE GLOBAL SETTING *AND PERSISTS IT* WHAT IN THE SATANIC FUCK
286 290
287 291 ---------------
288 292 -- callbacks --
................................................................................
321 325 return starlit.ui.userMenuDispatch(user,fields)
322 326 end
323 327 local ui = starlit.interface.db[formid]
324 328 local state = starlit.activeUI[name] or {}
325 329 if formid == '__builtin:help_cmds'
326 330 or formid == '__builtin:help_privs'
327 331 then return false end
328 - assert(state.form == formid) -- sanity check
332 + if not (state.form == formid) then -- sanity check
333 + log.warn('user %s attempted to send form %s while %s was active', name, formid, state.form)
334 + return false
335 + end
329 336 user:onRespond(ui, state, fields)
330 337 if fields.quit then
331 338 starlit.activeUI[name] = nil
332 339 end
333 340 return true
334 341 end)
335 342
................................................................................
392 399 })
393 400 minetest.register_item("starlit:_hand_dig", {
394 401 type = "none",
395 402 wield_image = "wieldhand.png",
396 403 wield_scale = {x=1,y=1,z=2.5},
397 404 tool_capabilities = {
398 405 groupcaps = {
406 + object = {maxlevel=1, times = {.20,.10}};
399 407 plant = {maxlevel=1, times = {.50}};
400 408
401 409 -- sand, dirt, gravel
402 410 looseClump = {maxlevel=1, times = {1.5, 2.5}};
403 411 };
404 412 }
405 413 })