Implement CSV / TSV import (#45)

- add csv/tsv importer
- add `make_map` script function
- add `alt name` field property
- add `construction script` field property
- add `construction script` game property
This commit is contained in:
GenevensiS
2025-06-09 04:53:33 +02:00
committed by GitHub
parent 6cac4ae0dc
commit 87fbc0e80e
21 changed files with 521 additions and 63 deletions
+11 -1
View File
@@ -10,7 +10,8 @@
#include <gui/control/card_list.hpp>
#include <gui/control/card_list_column_select.hpp>
#include <gui/set/window.hpp> // for sorting all cardlists in a window
#include <gui/util.hpp>
#include <gui/util.hpp>
#include <gui/add_csv_window.hpp>
#include <data/game.hpp>
#include <data/field.hpp>
#include <data/field/choice.hpp>
@@ -180,6 +181,15 @@ bool CardListBase::doDelete() {
set->actions.addAction(make_unique<AddCardAction>(REMOVE, *set, cards_to_delete));
return true;
}
bool CardListBase::doAddCSV() {
AddCSVWindow wnd(this, set, true);
if (wnd.ShowModal() == wxID_OK) {
// The actual adding is done in this window's onOk function
return true;
}
return false;
}
// ----------------------------------------------------------------------------- : CardListBase : Building the list
+2 -1
View File
@@ -77,7 +77,8 @@ public:
bool doCopy() override;
bool doPaste() override;
bool doDelete() override;
bool doAddCSV();
// --------------------------------------------------- : Set actions
void onBeforeChangeSet() override;