Update the helper
This commit is contained in:
parent
cef613c265
commit
fb2651facf
2 changed files with 62 additions and 18 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
# NOTE
|
||||||
|
|
||||||
|
Current highest implemented generation: **Three**
|
||||||
|
**This file is automatically generated**
|
||||||
|
|
||||||
|
# About
|
||||||
|
|
||||||
|
This file is a checklist of what Pokemon are up to date with the implemented generations.
|
||||||
|
|
||||||
# Generation One
|
# Generation One
|
||||||
|
|
||||||
|
|
|
@ -95,6 +95,16 @@ class _main extends State<MainGen> {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
} else if (state == 4) {
|
} else if (state == 4) {
|
||||||
maxTasks += Pokemon.values.length;
|
maxTasks += Pokemon.values.length;
|
||||||
|
sb = StringBuilder();
|
||||||
|
sb.append("# NOTE\n");
|
||||||
|
sb.append(
|
||||||
|
"\nCurrent highest implemented generation: **${gen.name}**",
|
||||||
|
);
|
||||||
|
sb.append("\n**This file is automatically generated**\n\n");
|
||||||
|
sb.append("# About\n\n");
|
||||||
|
sb.append(
|
||||||
|
"This file is a checklist of what Pokemon are up to date with the implemented generations.\n",
|
||||||
|
);
|
||||||
state++;
|
state++;
|
||||||
setState(() {});
|
setState(() {});
|
||||||
} else if ((state - index) == 5) {
|
} else if ((state - index) == 5) {
|
||||||
|
@ -118,20 +128,40 @@ class _main extends State<MainGen> {
|
||||||
statusMessage =
|
statusMessage =
|
||||||
("- Analysis of pokemon ${pokemon.pokemonName} has begun");
|
("- Analysis of pokemon ${pokemon.pokemonName} has begun");
|
||||||
|
|
||||||
// TODO : This needs to check locations and dex entries to see if they are up to date with the latest generation.
|
bool upToDate = false;
|
||||||
// The future task should take into account the generation the pokemon was introduced in. (EX. If introduced in gen 2, it won't have data entries for gen 1).
|
|
||||||
|
for (var loc in pokemon.locations) {
|
||||||
|
if (loc.gameGen.index >= gen.index) {
|
||||||
|
upToDate = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool dexUpToDate = false;
|
||||||
|
|
||||||
|
for (var dex in pokemon.dexEntries) {
|
||||||
|
if (dex.gameGen.index >= gen.index) {
|
||||||
|
upToDate = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (pokemon.locations.isEmpty && pokemon.dexEntries.isEmpty) {
|
if (pokemon.locations.isEmpty && pokemon.dexEntries.isEmpty) {
|
||||||
sb.append("- [ ] ${pokemon.pokemonName}\n");
|
sb.append("- [ ] ${pokemon.pokemonName}\n");
|
||||||
} else {
|
} else {
|
||||||
if (pokemon.locations.isNotEmpty && pokemon.dexEntries.isNotEmpty) {
|
if (upToDate || dexUpToDate) {
|
||||||
sb.append("- [x] ${pokemon.pokemonName}\n");
|
if (pokemon.locations.isNotEmpty &&
|
||||||
} else if (pokemon.locations.isNotEmpty) {
|
pokemon.dexEntries.isNotEmpty) {
|
||||||
sb.append("- [ ] ${pokemon.pokemonName} (MISSING DEX ENTRIES)\n");
|
sb.append("- [x] ${pokemon.pokemonName}\n");
|
||||||
} else if (pokemon.dexEntries.isNotEmpty) {
|
} else if (pokemon.locations.isNotEmpty) {
|
||||||
sb.append(
|
sb.append(
|
||||||
"- [ ] ${pokemon.pokemonName} (MISSING LOCATION ENTRIES)\n",
|
"- [ ] ${pokemon.pokemonName} (MISSING DEX ENTRIES)\n",
|
||||||
);
|
);
|
||||||
|
} else if (pokemon.dexEntries.isNotEmpty) {
|
||||||
|
sb.append(
|
||||||
|
"- [ ] ${pokemon.pokemonName} (MISSING LOCATION ENTRIES)\n",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
sb.append("- [ ] ${pokemon.pokemonName} (OUT OF DATE DATA)\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
index++;
|
index++;
|
||||||
|
@ -170,14 +200,20 @@ class _main extends State<MainGen> {
|
||||||
title: Text("Data Generator"),
|
title: Text("Data Generator"),
|
||||||
backgroundColor: LibACFlutterConstants.TITLEBAR_COLOR,
|
backgroundColor: LibACFlutterConstants.TITLEBAR_COLOR,
|
||||||
),
|
),
|
||||||
body: Column(
|
body: Padding(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
padding: const EdgeInsets.all(8.0),
|
||||||
children: [
|
child: Column(
|
||||||
Text("Status: ${statusMessage}", style: TextStyle(fontSize: 24)),
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
Text("Progress: ${progress * 100}%", style: TextStyle(fontSize: 24)),
|
children: [
|
||||||
Text("Task ${state}/${maxTasks}", style: TextStyle(fontSize: 24)),
|
Text("Status: ${statusMessage}", style: TextStyle(fontSize: 24)),
|
||||||
LinearProgressIndicator(value: progress, minHeight: 30),
|
Text(
|
||||||
],
|
"Progress: ${progress * 100}%",
|
||||||
|
style: TextStyle(fontSize: 24),
|
||||||
|
),
|
||||||
|
Text("Task ${state}/${maxTasks}", style: TextStyle(fontSize: 24)),
|
||||||
|
LinearProgressIndicator(value: progress, minHeight: 30),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue