mirror of
https://github.com/Ratstail91/SANCTUM.git
synced 2025-11-29 02:24:27 +11:00
Graze prints upgrade details, fixed dialog bug
This commit is contained in:
@@ -34,8 +34,17 @@ exports.GenerateDialogFunction = function(dialogJson) {
|
||||
result = dialogJson[key];
|
||||
}
|
||||
|
||||
//handle no result
|
||||
if (typeof(result) === "undefined") {
|
||||
return dialogJson["noResult"];
|
||||
const noResult = dialogJson["noResult"];
|
||||
if (typeof(noResult) === "undefined") {
|
||||
return ""; //nothing at all to show
|
||||
}
|
||||
if (Array.isArray(noResult)) {
|
||||
result = noResult[Math.floor(Math.random() * noResult.length)];
|
||||
} else {
|
||||
result = noResult;
|
||||
}
|
||||
}
|
||||
|
||||
let counter = 0;
|
||||
|
||||
Reference in New Issue
Block a user