Browse Source

bug #1777

tags/v0.9.1^2
Shaun 3 years ago
parent
commit
bd44c3c0e3
2 changed files with 5 additions and 10 deletions
  1. +4
    -9
      src/client/js/components/chest.js
  2. +1
    -1
      src/client/js/objects/objects.js

+ 4
- 9
src/client/js/components/chest.js View File

@@ -3,7 +3,7 @@ define([
], function (

) {
let colors = [
const colors = [
'929398',
'80f643',
'3fa7dd',
@@ -11,7 +11,7 @@ define([
'ffeb38'
];

let chances = [
const chances = [
0.0075,
0.02,
0.04,
@@ -19,7 +19,7 @@ define([
0.095
];

let indices = {
const indices = {
50: 0,
51: 1,
128: 2,
@@ -33,12 +33,7 @@ define([
ownerName: null,

init: function (blueprint) {
if (this.ownerName && (!window.player || window.player.name !== this.ownerName)) {
this.obj.sheetName = null;
return;
}

let index = indices[this.obj.cell] || 0;
const index = indices[this.obj.cell] || 0;

this.obj.addComponent('particles', {
chance: chances[index],


+ 1
- 1
src/client/js/objects/objects.js View File

@@ -137,7 +137,7 @@ define([
if (obj.sheetName)
obj.sprite = renderer.buildObject(obj);

if ((obj.name) && (obj.sprite)) {
if (obj.name && obj.sprite) {
obj.nameSprite = renderer.buildText({
layerName: 'effects',
text: obj.name,


Loading…
Cancel
Save