LuaComb++


A programmable, quality-aware circuit combinator with a guided Lua editor for Factorio ispired by Moon Logic

Content
a month ago
2.0
110
Circuit network

b 2.1] Script disabled: "LuaEntity::minable is read only" (+ a small sandbox issue)

a day ago
(updated a day ago)

Hi, thanks for the mod!

  1. 2.1 crash

On Factorio 2.1 (Space Age), with info.json bumped to 2.1, every LuaComb++ combinator gets disabled on its first run with the error:

LuaEntity::minable is read only

No output signals are ever produced.

Cause: in 2.1, LuaEntity::minable became read-only, and minable_flag is now the setter. It's in configure_core() in control.lua:

core.minable = false

Fix:

core.minable_flag = false

minable_flag is also writable on 2.0, so no version check should be needed. With that one change plus "factorio_version": "2.1" / "base >= 2.1.0" in info.json, the combinators run normally for me, on a space platform, with blueprints and two combinators.

2.Step limit can be overwritten by scripts

The instruction budget counter __lcpp_left is a plain local in the compiled chunk, and only __lcpp_budget is in FORBIDDEN_IDENTIFIERS. A script like:

__lcpp_left = math.huge
while true do end

freezes the game. Adding ["__lcpp_left"] = true to FORBIDDEN_IDENTIFIERS in sandbox.lua fixes it. It only matters for scripts pasted from untrusted blueprints, but it's a one-line fix.

Related: the rep / format bans are token-based, and strings still carry the full string library, so ("x")[concat({"re","p"})] still reaches string.rep and can bypass the size limits.

New response