From 440a0b284eb1ba079eeb3bcfc8f6110e05518847 Mon Sep 17 00:00:00 2001 From: Crowns3bc <44653214+Crowns3bc@users.noreply.github.com> Date: Thu, 21 Aug 2025 14:49:24 -0600 Subject: [PATCH] fix spacing issue --- node/server_functions.js | 52 ++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/node/server_functions.js b/node/server_functions.js index 59191ed..e0fe560 100644 --- a/node/server_functions.js +++ b/node/server_functions.js @@ -3540,32 +3540,32 @@ function exchange(player, name, args) { } function chest_exchange(chest, name) { - var done = false; - var total = 0; - var current = 0; - D.drops[name].forEach(function (drop) { - total += drop[0]; - }); - result = Math.random() * total; - D.drops[name].forEach(function (drop) { - if (done) { - return; - } - current += drop[0]; - if (result <= current) { - done = true; - if (drop[1] == "gold") { - chest.gold += drop[2]; - } else if (drop[1] == "shells") { - chest.cash += drop[2]; - } else if (drop[1] == "empty") { - } else if (drop[1] == "open") { - chest_exchange(chest, drop[2]); - } else { - chest.items.push(create_new_item(drop[1], drop[2])); - } - } - }); + var done = false; + var total = 0; + var current = 0; + D.drops[name].forEach(function (drop) { + total += drop[0]; + }); + result = Math.random() * total; + D.drops[name].forEach(function (drop) { + if (done) { + return; + } + current += drop[0]; + if (result <= current) { + done = true; + if (drop[1] == "gold") { + chest.gold += drop[2]; + } else if (drop[1] == "shells") { + chest.cash += drop[2]; + } else if (drop[1] == "empty") { + } else if (drop[1] == "open") { + chest_exchange(chest, drop[2]); + } else { + chest.items.push(create_new_item(drop[1], drop[2])); + } + } + }); } var item_p_ignore = {