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
+4
View File
@@ -74,6 +74,7 @@ CardsPanel::CardsPanel(Window* parent, int id)
// NOTE: space after "Del" prevents wx from making del an accellerator
// otherwise we delete a card when delete is pressed inside the editor
// Adding a space never hurts, please keep it just to be safe.
add_menu_item(menuCard, ID_CARD_ADD_CSV, "card_add_multiple", _MENU_("add card csv") + _(" "), _HELP_("add card csv"));
add_menu_item(menuCard, ID_CARD_REMOVE, "card_del", _MENU_("remove card")+_(" "), _HELP_("remove card"));
menuCard->AppendSeparator();
auto menuRotate = new wxMenu();
@@ -311,6 +312,9 @@ void CardsPanel::onCommand(int id) {
case ID_CARD_ADD:
set->actions.addAction(make_unique<AddCardAction>(*set));
break;
case ID_CARD_ADD_CSV:
card_list->doAddCSV();
break;
case ID_CARD_REMOVE:
card_list->doDelete();
break;