kinda implemented export
This commit is contained in:
parent
d095488c74
commit
e450020cda
@ -9,7 +9,10 @@ function App() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="text-white">
|
<div className="text-white">
|
||||||
<MenuBar />
|
<MenuBar onExport={()=>{
|
||||||
|
const exportString = retakesConfig.toCvar()
|
||||||
|
console.log(exportString)
|
||||||
|
}} />
|
||||||
<AllDecks retakesConfig={retakesConfig} onChange={(newConfig)=>setRetakesConfig(newConfig)} />
|
<AllDecks retakesConfig={retakesConfig} onChange={(newConfig)=>setRetakesConfig(newConfig)} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -13,7 +13,7 @@ class Card {
|
|||||||
this.items = items
|
this.items = items
|
||||||
}
|
}
|
||||||
|
|
||||||
public toString(): string {
|
public toCvar(): string {
|
||||||
return `${this.title},${bToS(this.armor)},${bToS(this.helmet)},${this.items.join(",")}`
|
return `${this.title},${bToS(this.armor)},${bToS(this.helmet)},${this.items.join(",")}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,8 +9,8 @@ class CardGroup {
|
|||||||
this.cards = cards
|
this.cards = cards
|
||||||
}
|
}
|
||||||
|
|
||||||
public toString(): string {
|
public toCvar(): string {
|
||||||
return `${this.numInDeck};${this.cards.map(e => e.toString()).join(";")}`
|
return `${this.numInDeck};${this.cards.map(e => e.toCvar()).join(";")}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@ class Deck {
|
|||||||
this.cardGroups = cardGroups
|
this.cardGroups = cardGroups
|
||||||
}
|
}
|
||||||
|
|
||||||
public toString(): string {
|
public toCvar(): string {
|
||||||
return `${this.numDefusers}|${this.cardGroups.map(e => e.toString()).join("|")}`
|
return `${this.numDefusers}|${this.cardGroups.map(e => e.toCvar()).join("|")}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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(",")}"
|
||||||
|
`
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user