Quellcode durchsuchen

bug #1777

tags/v0.9.1^2
Shaun vor 3 Jahren
Ursprung
Commit
bd44c3c0e3
2 geänderte Dateien mit 5 neuen und 10 gelöschten Zeilen
  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 Datei anzeigen

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


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


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


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


init: function (blueprint) { 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', { this.obj.addComponent('particles', {
chance: chances[index], chance: chances[index],


+ 1
- 1
src/client/js/objects/objects.js Datei anzeigen

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


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


Laden…
Abbrechen
Speichern