18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-27 23:57:09 +01:00
Commit Graph

2 Commits

Author SHA1 Message Date
jerrrrycho
68c704e513 fix(config): a scenery switches a script runtime off as before, only switching it on is refused
keep() put python.enabled, luascreens.enabled, wasm.enabled and lua.fulllibraries back in either
direction, so a scenery with config python.enabled no endconfig, which the release honoured, was
overridden and got an error in the log. They are put back now only when the scenery turned them
on; switched off they stay so, silently.
2026-11-17 10:00:49 +01:00
jerrrrycho
3ae8d4e72e fix(scripting): typed scenery handles, sandbox keys from eu07.ini only, GCC 13 build
- the scenery API (eu07.events) hands out a full userdata of its own locked
  metatable for each kind of object (event, track, isolated, vehicle,
  memcell), checked with luaL_checkudata: a handle of another kind, a light
  userdata or any other value is a Lua error, not an object taken for
  another. nil stays "no object". one object has one handle while the
  script holds it, so handles compare and key tables as before. event
  handlers get their handles built inside lua_cpcall, and nil for no
  activator
- memcell_values keeps its text as a std::string: the text of a number was
  read from a stack slot popped before use
- newproxy is gone from the sandboxed libraries
- a config block of a scenery no longer changes what only eu07.ini sets
  (lua.fulllibraries, execonexit, extcam.cmd/rec, screenshotsdir,
  network.server/client, zmq.address, motiontelemetry, uart, feedbackmode,
  feedbackport, python/luascreens/wasm.enabled): kept before its keys are
  read, put back before FinalizeConfig(), each attempt logged
- open_file_library() iterates luaL_Reg instead of a std::pair GCC 13
  deduces as a pair of an array and a function
2026-11-16 08:54:00 +01:00