From ae0d3358627fa0ae5242bec7b8c39f44e63be24e Mon Sep 17 00:00:00 2001 From: liuzujun <307836273@qq.com> Date: Tue, 18 May 2021 16:36:26 +0800 Subject: [PATCH] 重置单一玩家 讨伐电台、代理拾荒、海港贸易 gm --- src/actions/GmAction.lua | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+), 0 deletions(-) diff --git a/src/actions/GmAction.lua b/src/actions/GmAction.lua index 11b1e71..ff45535 100644 --- a/src/actions/GmAction.lua +++ b/src/actions/GmAction.lua @@ -1027,4 +1027,49 @@ function _M.savegenius(role, pms) return "天赋点设置成功" end +table.insert(helpDes, {"清讨伐电台", "clear_radio", "id"}) +function _M.clear_radio(role, pms) + local id = pms.pm1 + local radioTask = role:getProperty("radioTask") + if id == 0 then + radioTask[id] = nil + else + radioTask = {} + end + + role:updateProperty({field = "radioTask", value = radioTask}) + + return "成功" +end + +table.insert(helpDes, {"清代理拾荒", "clear_adv_hang", "id"}) +function _M.clear_adv_hang(role, pms) + local id = pms.pm1 + local task = role:getProperty("advHang") + if id == 0 then + task[id] = nil + else + task = {} + end + + role:updateProperty({field = "advHang", value = task}) + + return "成功" +end + +table.insert(helpDes, {"清海港贸易", "clear_sea", "id"}) +function _M.clear_radio(role, pms) + local id = pms.pm1 + local task = role:getProperty("seaport") + if id == 0 then + task.collect[id] = nil + else + task.collect = {} + end + + role:updateProperty({field = "seaport", value = task}) + + return "成功" +end + return _M \ No newline at end of file -- libgit2 0.21.2