FreeKill/lua
Rintim 04f1009075
Provide hasMark methods (#180)
It provides two methods `Player:hasMark` and `Card:hasMark` for
determining if the player/card has the mark, which is more expressive
than `xxx:getMark` when only checking for the existence.

By the way, xxx:hasMark may directly determine a `Mark` in xxx.mark, for
which I added `table:hasKey` method in `util.lua`, but currently the
code still checks if the result of `xxx:getMark` is not 0.

---


提供了`Player:hasMark`和`Card:hasMark`两个方法,用于在只需要判断是否有标记时可以直接使用`xxx:hasMark`,相比使用`xxx:getMark`而言更加表达代码的作用。


顺带一提,`xxx:hasMark`应该可以直接判断`Mark`是否在`xxx.mark`里,我在`util.lua`里添加了`table:hasKey`的方法用于判断,但目前的代码还是判断`xxx:getMark`的结果是否不为0。
2023-06-09 17:23:24 +08:00
..
client Recorder (#178) 2023-06-09 01:10:16 +08:00
core Provide hasMark methods (#180) 2023-06-09 17:23:24 +08:00
lib Recorder (#178) 2023-06-09 01:10:16 +08:00
lsp Switch skill (#148) 2023-05-13 14:20:34 +08:00
server QML修改+bugfix (#181) 2023-06-09 17:23:02 +08:00
fk_ex.lua Enhancement (#170) 2023-06-04 19:39:20 +08:00
freekill.lua 新功能 (#141) 2023-04-30 18:51:05 +08:00
ui-util.lua Modify combo box (#140) 2023-04-30 00:52:39 +08:00