瀏覽代碼

new event phase to set desc

tags/v0.4.2^2
Big Bad Waffle 4 年之前
父節點
當前提交
bb0c883367
共有 3 個文件被更改,包括 15 次插入2 次删除
  1. +9
    -0
      src/server/config/eventPhases/phaseSetDescription.js
  2. +5
    -2
      src/server/config/maps/sewer/events/plagueOfRats.js
  3. +1
    -0
      src/server/events/events.js

+ 9
- 0
src/server/config/eventPhases/phaseSetDescription.js 查看文件

@@ -0,0 +1,9 @@
module.exports = {
desc: null,

init: function (event) {
event.events.setEventDescription(event.config.name, this.desc);

this.end = true;
}
};

+ 5
- 2
src/server/config/maps/sewer/events/plagueOfRats.js 查看文件

@@ -16,7 +16,7 @@ const descriptionStrings = {
escapeCounter: 'Escapees: $ratEscapees$'
};

const idFirstSpawnPhase = 0;
const idFirstSpawnPhase = 6;

const ratTargetPos = {
x: 97,
@@ -111,7 +111,7 @@ const rat = {

module.exports = {
name: 'Plague of Rats',
description: 'Oh lawd, they comin\'',
description: descriptionStrings.leadup,
distance: -1,
cron: '* * * * *',

@@ -176,6 +176,9 @@ module.exports = {
}, {
type: 'despawnMob',
id: 'banditAlchemist'
}, {
type: 'setDescription',
desc: descriptionStrings.active
}, {
type: 'spawnMob',
mobs: [rat],


+ 1
- 0
src/server/events/events.js 查看文件

@@ -137,6 +137,7 @@ module.exports = {
let event = {
id: this.nextId++,
config: extend({}, config),
events: this,
variables: {},
phases: [],
participators: [],


Loading…
取消
儲存