From 7834b4572e63c02431d794773deed68c9890f9f7 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sun, 5 Jun 2022 21:36:47 -0400 Subject: [PATCH] Remove explicit `String` casts, not needed in SE 3.3 --- resources/ttsdeck/Card.js | 4 ++-- resources/ttsdeck/TTSDeck.js | 8 ++++---- resources/ttsdeck/TTSJson.js | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/resources/ttsdeck/Card.js b/resources/ttsdeck/Card.js index d985505..dc03c92 100644 --- a/resources/ttsdeck/Card.js +++ b/resources/ttsdeck/Card.js @@ -75,9 +75,9 @@ Card.prototype.makeJSON = function makeJSON(card_id, description) { scaleY: 1.0, scaleZ: 1.0, }, - Nickname: String(this.component.getName()), + Nickname: this.component.getName(), CardID: card_id, - Description: String(description || ""), + Description: description || "", ColorDiffuse: { r: 0.713235259, g: 0.713235259, diff --git a/resources/ttsdeck/TTSDeck.js b/resources/ttsdeck/TTSDeck.js index 12f9d97..1fc50bf 100644 --- a/resources/ttsdeck/TTSDeck.js +++ b/resources/ttsdeck/TTSDeck.js @@ -139,8 +139,8 @@ TTSDeck.prototype.makeJSON = function makeJSON(nickname, description) { scaleY: 1.0, scaleZ: 1.0, }, - Nickname: String(nickname || ""), - Description: String(description || ""), + Nickname: nickname || "", + Description: description || "", ColorDiffuse: { r: 0.713239133, g: 0.713239133, @@ -154,8 +154,8 @@ TTSDeck.prototype.makeJSON = function makeJSON(nickname, description) { .reduce((acc, val) => acc.concat(val), []), CustomDeck: this.pages.reduce((acc, page, index) => { acc[String(index + 1)] = { - FaceURL: String(page.face_url), - BackURL: String(page.back_url), + FaceURL: page.face_url, + BackURL: page.back_url, NumWidth: page.columns, NumHeight: page.rows, BackIsHidden: true, diff --git a/resources/ttsdeck/TTSJson.js b/resources/ttsdeck/TTSJson.js index 2784399..6c48e40 100644 --- a/resources/ttsdeck/TTSJson.js +++ b/resources/ttsdeck/TTSJson.js @@ -2,7 +2,7 @@ exports.makeSavedObjectJSON = function makeSavedObjectJSON(objects, save_name) { return { - SaveName: String(save_name || ""), + SaveName: save_name || "", GameMode: "", Date: "", Table: "",