OoMrFlibble / oolite-debug-console-flibble

Debug console for Oolite.
http://wiki.alioth.net/index.php/Debug_OXP
1 stars 1 forks source link

Aliases are running amok #2

Open OoMrFlibble opened 3 months ago

OoMrFlibble commented 3 months ago

Created an alias called bang, to blow stuff up. Even with poll set to off, my ship is now a Gorgon with lasers. It seems to just run repeatedly.

When defined, polled is 'on' by default. Switched off poll, clicked Add again (to save change), and the status shows 'bang' unchanged. Close aliases, reopen, polled is still off, and status shows 'invalid definition'.

Tried defining it as a function. Still runs continuously.

Alias deleted.

Oocag commented 3 months ago

I sent a fix (I think). Github desktop says so but I had to create a fork (no perms). Hope that means something to you! We can always do old-school if this is holding you up.

OoMrFlibble commented 3 months ago

Nice try, but I think that somehow missed. Either that or I did :1st_place_medal:

So. To check. I pulled the diff. did a rebase locally. Checked that what you'd done had appeared locally, and ran it from my local. Then added this alias called bang with the usual PS.target.explode() content. Launched. Looked back.. lost the nearest dock in a puff of smoke.

So one thing's fixed. It wasn't set to poll by default!

OoMrFlibble commented 3 months ago

Fix (of symptom) uploaded. Cause yet to be established.

OoMrFlibble commented 3 months ago

Latest fix from Oocag now merged as properly as I can be sure.

Now:

  1. Aliases don't auto-poll on creation. (good)
  2. They don't like being called by name in console. (bad)
  3. They do fire when selected from the alias window, even if the intent is to edit. (ugly)

2: May be a misunderstanding on my part about how they should work in v2. 3: Can be worked around by the user either disconnecting from, or not loading Oolite before editing aliases.

Should the output from an alias appear only in the alias window? If so, should the window be resize-able so that output doesn't get cut off.

If all is as it should be, perhaps some basic documentation describing the scope and behaviour is in order.