Here's a patch, one that git should be happy to apply.

** Patch added: 
"0001-allow-Lua-functions-to-return-non-boolean-values-ala.patch"
   
https://bugs.launchpad.net/mudlet/+bug/1037410/+attachment/3460304/+files/0001-allow-Lua-functions-to-return-non-boolean-values-ala.patch

** Changed in: mudlet
     Assignee: (unassigned) => Vadim Peretokin (vperetokin)

** Changed in: mudlet
       Status: New => In Progress

-- 
You received this bug notification because you are a member of Mudlet
Makers, which is subscribed to Mudlet.
https://bugs.launchpad.net/bugs/1037410

Title:
  Non-boolean return values aren't accepted as true in Lua functions

Status in Mudlet the MUD client:
  In Progress

Bug description:
  Lua function pattern type requires an explicit boolean of 'true' to go
  off, while the notation in Lua is that just nil and false are false.
  It would be convenient to have the function accept things as true as
  Lua does, so you can shorten, for example:

  return line:find(vs.shiptarget, 1, true) and true or false

  Just to:

  return line:find(vs.shiptarget, 1, true)

  Which is shorter and more intuitive.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mudlet/+bug/1037410/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~mudlet-makers
Post to     : mudlet-makers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mudlet-makers
More help   : https://help.launchpad.net/ListHelp

Reply via email to