diff --git a/src/components/App.tsx b/src/components/App.tsx index e5a8323..dd17ecc 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -9,7 +9,10 @@ function App() { return (
- + { + const exportString = retakesConfig.toCvar() + console.log(exportString) + }} /> setRetakesConfig(newConfig)} />
); diff --git a/src/types/Card.ts b/src/types/Card.ts index 5f281a4..8871ba5 100644 --- a/src/types/Card.ts +++ b/src/types/Card.ts @@ -13,7 +13,7 @@ class Card { this.items = items } - public toString(): string { + public toCvar(): string { return `${this.title},${bToS(this.armor)},${bToS(this.helmet)},${this.items.join(",")}` } } diff --git a/src/types/CardGroup.ts b/src/types/CardGroup.ts index f61f161..70cb226 100644 --- a/src/types/CardGroup.ts +++ b/src/types/CardGroup.ts @@ -9,8 +9,8 @@ class CardGroup { this.cards = cards } - public toString(): string { - return `${this.numInDeck};${this.cards.map(e => e.toString()).join(";")}` + public toCvar(): string { + return `${this.numInDeck};${this.cards.map(e => e.toCvar()).join(";")}` } } diff --git a/src/types/Deck.ts b/src/types/Deck.ts index 317222e..2ddf2e6 100644 --- a/src/types/Deck.ts +++ b/src/types/Deck.ts @@ -9,8 +9,8 @@ class Deck { this.cardGroups = cardGroups } - public toString(): string { - return `${this.numDefusers}|${this.cardGroups.map(e => e.toString()).join("|")}` + public toCvar(): string { + return `${this.numDefusers}|${this.cardGroups.map(e => e.toCvar()).join("|")}` } } diff --git a/src/types/RetakesConfig.ts b/src/types/RetakesConfig.ts index ecc222c..d684a54 100644 --- a/src/types/RetakesConfig.ts +++ b/src/types/RetakesConfig.ts @@ -59,8 +59,20 @@ class RetakesConfig { } } - public toCvar(){ - + public toCvar(): string{ + return `mp_retake_ct_loadout_default_pistol_round "${this.ctPistol.toCvar()}" +mp_retake_t_loadout_default_pistol_round "${this.tPistol.toCvar()}" +mp_retake_ct_loadout_upgraded_pistol_round "${this.ctUpgradedPistol.toCvar()}" +mp_retake_t_loadout_upgraded_pistol_round "${this.tUpgradedPistol.toCvar()}" +mp_retake_ct_loadout_light_buy_round "${this.ctLight.toCvar()}" +mp_retake_t_loadout_light_buy_round "${this.tLight.toCvar()}" +mp_retake_ct_loadout_full_buy_round "${this.ctFull.toCvar()}" +mp_retake_t_loadout_full_buy_round "${this.tFull.toCvar()}" +mp_retake_ct_loadout_bonus_card "${this.ctBonus.toCvar()}" +mp_retake_t_loadout_bonus_card "${this.tBonus.toCvar()}" +mp_retake_ct_loadout_bonus_card_availability "${this.ctBonusAvailability.join(",")}" +mp_retake_t_loadout_bonus_card_availability "${this.tBonusAvailability.join(",")}" +` } }