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