2023-04-09 05:35:35 +00:00
|
|
|
-- SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2022-03-30 08:33:56 +00:00
|
|
|
---@meta
|
|
|
|
|
2022-03-31 05:29:23 +00:00
|
|
|
---@class fk.Player
|
2022-03-30 08:33:56 +00:00
|
|
|
FPlayer = {}
|
|
|
|
|
2022-04-01 12:51:01 +00:00
|
|
|
---@return integer id
|
2022-03-30 08:33:56 +00:00
|
|
|
function FPlayer:getId()end
|
|
|
|
|
|
|
|
---@return string name
|
|
|
|
function FPlayer:getScreenName()end
|
|
|
|
|
|
|
|
---@return string avatar
|
|
|
|
function FPlayer:getAvatar()end
|
|
|
|
|
2023-06-23 14:18:11 +00:00
|
|
|
---@class fk.ServerPlayer : fk.Player
|
|
|
|
FServerPlayer = {}
|
|
|
|
|
2022-03-30 08:33:56 +00:00
|
|
|
--- Send a request to client, and allow client to reply within *timeout* seconds.
|
|
|
|
---
|
|
|
|
--- *timeout* must not be negative or **nil**.
|
|
|
|
---@param command string
|
|
|
|
---@param jsonData string
|
2022-04-01 12:51:01 +00:00
|
|
|
---@param timeout integer
|
2022-03-30 08:33:56 +00:00
|
|
|
function FServerPlayer:doRequest(command,jsonData,timeout)end
|
|
|
|
|
|
|
|
--- Wait for at most *timeout* seconds for reply from client.
|
|
|
|
---
|
|
|
|
--- If *timeout* is negative or **nil**, the function will wait forever until get reply.
|
2022-04-02 13:39:44 +00:00
|
|
|
---@param timeout integer @ seconds to wait
|
|
|
|
---@return string @ JSON data
|
2022-03-30 08:33:56 +00:00
|
|
|
---@overload fun()
|
|
|
|
function FServerPlayer:waitForReply(timeout)end
|
|
|
|
|
|
|
|
--- Notice the client.
|
|
|
|
---@param command string
|
|
|
|
---@param jsonData string
|
|
|
|
function FServerPlayer:doNotify(command,jsonData)end
|
2023-06-23 14:18:11 +00:00
|
|
|
|
|
|
|
function FServerPlayer:setBusy(_) end
|
|
|
|
function FServerPlayer:isBusy(_) end
|
|
|
|
function FServerPlayer:setThinking(_) end
|
|
|
|
|
|
|
|
function FServerPlayer:getState() end
|