mirror of
https://github.com/gooba42/adventureland.git
synced 2026-10-14 10:33:47 -05:00
fix spacing issue
This commit is contained in:
+26
-26
@@ -3540,32 +3540,32 @@ function exchange(player, name, args) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function chest_exchange(chest, name) {
|
function chest_exchange(chest, name) {
|
||||||
var done = false;
|
var done = false;
|
||||||
var total = 0;
|
var total = 0;
|
||||||
var current = 0;
|
var current = 0;
|
||||||
D.drops[name].forEach(function (drop) {
|
D.drops[name].forEach(function (drop) {
|
||||||
total += drop[0];
|
total += drop[0];
|
||||||
});
|
});
|
||||||
result = Math.random() * total;
|
result = Math.random() * total;
|
||||||
D.drops[name].forEach(function (drop) {
|
D.drops[name].forEach(function (drop) {
|
||||||
if (done) {
|
if (done) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
current += drop[0];
|
current += drop[0];
|
||||||
if (result <= current) {
|
if (result <= current) {
|
||||||
done = true;
|
done = true;
|
||||||
if (drop[1] == "gold") {
|
if (drop[1] == "gold") {
|
||||||
chest.gold += drop[2];
|
chest.gold += drop[2];
|
||||||
} else if (drop[1] == "shells") {
|
} else if (drop[1] == "shells") {
|
||||||
chest.cash += drop[2];
|
chest.cash += drop[2];
|
||||||
} else if (drop[1] == "empty") {
|
} else if (drop[1] == "empty") {
|
||||||
} else if (drop[1] == "open") {
|
} else if (drop[1] == "open") {
|
||||||
chest_exchange(chest, drop[2]);
|
chest_exchange(chest, drop[2]);
|
||||||
} else {
|
} else {
|
||||||
chest.items.push(create_new_item(drop[1], drop[2]));
|
chest.items.push(create_new_item(drop[1], drop[2]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var item_p_ignore = {
|
var item_p_ignore = {
|
||||||
|
|||||||
Reference in New Issue
Block a user