Browse Source

added custom messages for workbenches

tags/v0.6^2
Shaun 4 years ago
parent
commit
05b61ed718
4 changed files with 5 additions and 1 deletions
  1. BIN
     
  2. BIN
     
  3. +4
    -1
      src/server/components/workbench.js
  4. +1
    -0
      src/server/items/generator.js

BIN
View File


BIN
View File


+ 4
- 1
src/server/components/workbench.js View File

@@ -8,8 +8,11 @@ module.exports = {

craftType: null,

noticeMessage: null,

init: function (blueprint) {
this.craftType = blueprint.type;
this.noticeMessage = blueprint.noticeMessage;

this.obj.instance.objects.buildObjects([{
properties: {
@@ -57,7 +60,7 @@ module.exports = {
if (!obj.player)
return;

let msg = `Press U to access the ${this.obj.name}`;
let msg = `Press U to ${this.noticeMessage || `access the ${this.obj.name}`}`;

obj.syncer.setArray(true, 'serverActions', 'addActions', {
key: 'u',


+ 1
- 0
src/server/items/generator.js View File

@@ -76,6 +76,7 @@ module.exports = {
item.noDrop = blueprint.noDrop || null;
item.noSalvage = blueprint.noSalvage || null;
item.noDestroy = blueprint.noDestroy || null;
item.quality = blueprint.quality || 0;
materialGenerators.forEach(g => g.generate(item, blueprint));
} else if (blueprint.type === 'mtx') {
item = extend({}, blueprint);


Loading…
Cancel
Save