summaryrefslogtreecommitdiff
path: root/server-beta/src
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-09-20 10:06:42 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-09-20 10:06:42 +0800
commit624b0d5d4f9792570111dc34a578dfad68e96c12 (patch)
treebb35c84e459e4587ace97dbfc320441b83ae20d5 /server-beta/src
parent6f06d0da689881ffdb35596d678f089012f05ca6 (diff)
downloadlua-language-server-624b0d5d4f9792570111dc34a578dfad68e96c12.zip
重新建立酒馆
Diffstat (limited to 'server-beta/src')
-rw-r--r--server-beta/src/pub/init.lua (renamed from server-beta/src/boss.lua)4
-rw-r--r--server-beta/src/service.lua10
2 files changed, 7 insertions, 7 deletions
diff --git a/server-beta/src/boss.lua b/server-beta/src/pub/init.lua
index d9c87f70..a1bac3a8 100644
--- a/server-beta/src/boss.lua
+++ b/server-beta/src/pub/init.lua
@@ -14,9 +14,9 @@ local brave = require 'brave'
brave.register(%d)
]]
----@class boss
+---@class pub
local m = {}
-m.type = 'boss'
+m.type = 'pub'
m.braves = {}
--- 招募勇者,勇者会从公告板上领取任务,完成任务后到看板娘处交付任务
diff --git a/server-beta/src/service.lua b/server-beta/src/service.lua
index 122917fa..114ca6d0 100644
--- a/server-beta/src/service.lua
+++ b/server-beta/src/service.lua
@@ -1,4 +1,4 @@
-local boss = require 'boss'
+local pub = require 'pub'
local subprocess = require 'bee.subprocess'
local thread = require 'bee.thread'
local task = require 'task'
@@ -15,7 +15,7 @@ function m.listenProto()
io.stdout:setvbuf 'no'
task.create(function ()
while true do
- local proto = boss.task('loadProto')
+ local proto = pub.task('loadProto')
log.debug('proto:', utility.dump(proto))
end
end)
@@ -24,8 +24,8 @@ end
function m.listenPub()
task.create(function ()
while true do
- boss.checkDead()
- boss.recieve()
+ pub.checkDead()
+ pub.recieve()
task.sleep(0)
end
end)
@@ -43,7 +43,7 @@ function m.startTimer()
end
function m.start()
- boss.recruitBraves(4)
+ pub.recruitBraves(4)
task.setErrorHandle(log.error)
m.listenProto()
m.listenPub()