summaryrefslogtreecommitdiff
path: root/server-beta/src
diff options
context:
space:
mode:
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()