Moon Logic deprecated

by mk-fg

Adds Lua-programmable circuit network combinator. Based on Sandboxed LuaCombinator and LuaCombinator2 mods. Probably won't work in multiplayer games.

Content
2 years ago
1.0 - 1.1
4.97K
Circuit network

b [fixed] Slight gui bug when mousing over script save buttons containing lengthy code

4 years ago
(updated 4 years ago)

When I mouse over a script save button that contains code that is longer my screen's height, the tooltip goes off the screen. It might be best to snip the code after a certain amount of lines. Or have an option to allow the user to control what is shown. Or if there is a comment at the start of the program, only show that. Or combine those two ideas and have a keyword in a comment that is searched for and that is what is shown.

And the line about left/right clicking, probably should go at the top, before the code, and be colored/bolded for viability and to differentiate it from code/normal comments.

4 years ago
(updated 4 years ago)

And a delete confirmation would be nice when removing scripts from save slots to prevent accidents

4 years ago
(updated 4 years ago)

Yeah, current one is just

local function preset_help_tooltip(code)
  if not code
    then code = '-- [ left-click to save script here ] --'
    else code = code:match('^%s*(.-)%s*$')..
      '\n-- [ left-click - load, right-click - clear ] --' end
  return code
end

Guess I'll add matching for some short comment-tag-lines like "-- desc: ..." and print them all instead, and if none, snip the code.

Bold or otherwise rightlighted is also a good idea, but don't like confirmations of any kind myself - they are super-annoying, often look like a repeated insult to users' mental capacity on a daily basis, and destroy any kind of productivity for people who don't have the issue.
It's possible to make deletion work on ctrl+right-click or something complicated like that, but I think it's hard to mistake left from right mouse button already, so it shouldn't help much, if the issue is just people confusing load and delete actions.

I also think it's a problem that doesn't need solving - non-fatal mistakes make you learn really fast, like if you loose a lot of code due to lack of backups or clicking "delete all" accidentally, or compose an essay in a browser, etc - and protecting from them does no one (except rare people with legitimate disabilities) any favors.

4 years ago

Added bunch of highlights to the tooltip text in 0.0.29 and quick code that pulls "-- desc:" lines from it, if there are any, otherwise uses top-n lines of code (conf.code_tooltip_lines = 30).

New response