mirror of
https://github.com/chaoticbackup/chaoticbackup.github.io.git
synced 2026-08-21 16:14:37 -05:00
updated to work with condensed spreadsheet data
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -63,6 +63,10 @@ class API {
|
||||
}
|
||||
}
|
||||
|
||||
get tribes() {
|
||||
return ["Danian", "Generic", "Mipedian", "OverWorld", "UnderWorld"];
|
||||
}
|
||||
|
||||
// For the conversion of shorthand in database
|
||||
get sets() {
|
||||
return {
|
||||
@@ -149,38 +153,38 @@ class CollectionDB {
|
||||
});
|
||||
}
|
||||
|
||||
setupAttacks(tribe="Generic") {
|
||||
this.setup(this.api.urls.Attacks[tribe], "Attack", (data) => {
|
||||
setupAttacks(type="portal") {
|
||||
this.setup(this.api.urls.Attacks[type], "Attack", (data) => {
|
||||
this.attacks.insert(data);
|
||||
this.built.push("attacks_"+tribe);
|
||||
this.built.push("attacks_"+type);
|
||||
});
|
||||
}
|
||||
|
||||
setupBattlegear(tribe="Generic") {
|
||||
this.setup(this.api.urls.Battlegear[tribe], "Battlegear", (data) => {
|
||||
setupBattlegear(type="portal") {
|
||||
this.setup(this.api.urls.Battlegear[type], "Battlegear", (data) => {
|
||||
this.battlegear.insert(data);
|
||||
this.built.push("battlegear_"+tribe);
|
||||
this.built.push("battlegear_"+type);
|
||||
});
|
||||
}
|
||||
|
||||
setupCreatures(tribe="Generic") {
|
||||
this.setup(this.api.urls.Creatures[tribe], "Creature", (data) => {
|
||||
setupCreatures(type="portal") {
|
||||
this.setup(this.api.urls.Creatures[type], "Creature", (data) => {
|
||||
this.creatures.insert(data);
|
||||
this.built.push("creatures_"+tribe);
|
||||
this.built.push("creatures_"+type);
|
||||
});
|
||||
}
|
||||
|
||||
setupLocations(tribe="Generic") {
|
||||
this.setup(this.api.urls.Locations[tribe], "Location", (data) => {
|
||||
setupLocations(type="portal") {
|
||||
this.setup(this.api.urls.Locations[type], "Location", (data) => {
|
||||
this.locations.insert(data);
|
||||
this.built.push("locations_"+tribe);
|
||||
this.built.push("locations_"+type);
|
||||
});
|
||||
}
|
||||
|
||||
setupMugic(tribe="Generic") {
|
||||
this.setup(this.api.urls.Mugic[tribe], "Mugic", (data) => {
|
||||
setupMugic(type="portal") {
|
||||
this.setup(this.api.urls.Mugic[type], "Mugic", (data) => {
|
||||
this.mugic.insert(data);
|
||||
this.built.push("mugic_"+tribe);
|
||||
this.built.push("mugic_"+type);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ export default class Creatures extends React.Component {
|
||||
|
||||
// If there isn't a supported tribe,
|
||||
// Displays list of tribes
|
||||
if (!store.urls.Creatures.hasOwnProperty(tribe)) {
|
||||
if (!store.tribes.includes(tribe)) {
|
||||
return(
|
||||
<div>
|
||||
<Interactive as={Link} {...s.link}
|
||||
@@ -58,13 +58,13 @@ export default class Creatures extends React.Component {
|
||||
);
|
||||
}
|
||||
|
||||
if (!store.cards.built.includes("creatures_Cards")) {
|
||||
store.cards.setupCreatures("Cards");
|
||||
if (!store.cards.built.includes("creatures_cards")) {
|
||||
store.cards.setupCreatures("cards");
|
||||
return (<span>Loading...</span>);
|
||||
}
|
||||
|
||||
if (!store.portal.built.includes("creatures_"+tribe)) {
|
||||
store.portal.setupCreatures(tribe);
|
||||
if (!store.portal.built.includes("creatures_portal")) {
|
||||
store.portal.setupCreatures("portal");
|
||||
return (<span>Loading...</span>);
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ export default class Creatures extends React.Component {
|
||||
return (
|
||||
<div key={i}>
|
||||
<Interactive as={Link} {...s.link}
|
||||
to={'/portal/Creatures/'+tribe+'/'+creature.gsx$name}
|
||||
to={'/portal/'+tribe+'/Creatures/'+creature.gsx$name}
|
||||
>
|
||||
<span>{creature.gsx$name}</span><br />
|
||||
<img className="thumb" src={store.base_image + card_data.gsx$thumb}></img>
|
||||
|
||||
@@ -36,7 +36,7 @@ export default class Mugic extends React.Component {
|
||||
|
||||
// If there isn't a supported tribe,
|
||||
// Displays list of tribes
|
||||
if (!store.urls.Mugic.hasOwnProperty(tribe)) {
|
||||
if (!store.tribes.includes(tribe)) {
|
||||
return(
|
||||
<div>
|
||||
<Interactive as={Link} {...s.link}
|
||||
@@ -62,13 +62,13 @@ export default class Mugic extends React.Component {
|
||||
);
|
||||
}
|
||||
|
||||
if (!store.cards.built.includes("mugic_Cards")) {
|
||||
store.cards.setupMugic("Cards");
|
||||
if (!store.cards.built.includes("mugic_cards")) {
|
||||
store.cards.setupMugic("cards");
|
||||
return (<span>Loading...</span>);
|
||||
}
|
||||
|
||||
if (!store.portal.built.includes("mugic_"+tribe)) {
|
||||
store.portal.setupMugic(tribe);
|
||||
if (!store.portal.built.includes("mugic_portal")) {
|
||||
store.portal.setupMugic("portal");
|
||||
return (<span>Loading...</span>);
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ export default class Mugic extends React.Component {
|
||||
return (
|
||||
<div key={i}>
|
||||
<Interactive as={Link} {...s.link}
|
||||
to={'/portal/Mugic/'+tribe+'/'+single_mugic.gsx$name}
|
||||
to={'/portal/'+tribe+'/Mugic/'+single_mugic.gsx$name}
|
||||
>
|
||||
<span>{single_mugic.gsx$name}</span><br />
|
||||
{/* TODO <img className="thumb" src={store.base_image + card_data.gsx$thumb}></img> */}
|
||||
|
||||
@@ -38,17 +38,17 @@ export default class SingleCreature extends React.Component {
|
||||
return (<span>Loading...</span>);
|
||||
}
|
||||
|
||||
if (!store.urls.Creatures.hasOwnProperty(tribe)) {
|
||||
if (!store.tribes.includes(tribe)) {
|
||||
return (<span>Invalid Tribe: {tribe}</span>);
|
||||
}
|
||||
|
||||
if (!store.cards.built.includes("creatures_Cards")) {
|
||||
store.cards.setupCreatures("Cards");
|
||||
if (!store.cards.built.includes("creatures_cards")) {
|
||||
store.cards.setupCreatures("cards");
|
||||
return (<span>Loading...</span>);
|
||||
}
|
||||
|
||||
if (!store.portal.built.includes("creatures_"+tribe)) {
|
||||
store.portal.setupCreatures(tribe);
|
||||
if (!store.portal.built.includes("creatures_portal")) {
|
||||
store.portal.setupCreatures("portal");
|
||||
return (<span>Loading...</span>);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,17 +39,17 @@ export default class SingleMugic extends React.Component {
|
||||
return (<span>Loading...</span>);
|
||||
}
|
||||
|
||||
if (!store.urls.Mugic.hasOwnProperty(tribe)) {
|
||||
if (!store.tribes.includes(tribe)) {
|
||||
return (<span>Invalid Tribe: {tribe}</span>);
|
||||
}
|
||||
|
||||
if (!store.cards.built.includes("mugic_Cards")) {
|
||||
store.cards.setupMugic("Cards");
|
||||
if (!store.cards.built.includes("mugic_cards")) {
|
||||
store.cards.setupMugic("cards");
|
||||
return (<span>Loading...</span>);
|
||||
}
|
||||
|
||||
if (!store.portal.built.includes("mugic_"+tribe)) {
|
||||
store.portal.setupMugic(tribe);
|
||||
if (!store.portal.built.includes("mugic_portal")) {
|
||||
store.portal.setupMugic("portal");
|
||||
return (<span>Loading...</span>);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user