You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
515 B
23 lines
515 B
|
1 year ago
|
#include "lua/modules/player.hpp"
|
||
|
|
|
||
|
|
#include <sol/sol.hpp>
|
||
|
|
|
||
|
|
#include "engine/point.hpp"
|
||
|
|
#include "lua/metadoc.hpp"
|
||
|
|
#include "player.h"
|
||
|
|
|
||
|
|
namespace devilution {
|
||
|
|
|
||
|
|
sol::table LuaPlayerModule(sol::state_view &lua)
|
||
|
|
{
|
||
|
|
sol::table table = lua.create_table();
|
||
|
|
SetDocumented(table, "walk_to", "(x: integer, y: integer)",
|
||
|
|
"Walk to the given coordinates",
|
||
|
|
[](int x, int y) {
|
||
|
|
NetSendCmdLoc(MyPlayerId, true, CMD_WALKXY, Point { x, y });
|
||
|
|
});
|
||
|
|
return table;
|
||
|
|
}
|
||
|
|
|
||
|
|
} // namespace devilution
|