aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/diplomacy
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2024-01-09 11:58:25 +0100
committer GitHub <noreply@github.com>2024-01-09 11:58:25 +0100
commit1d0dc5660040d03fd30168150f951ba98eaaa900 (patch)
treeb0b404a1826d455767b16d3e3ae1d6bf7516e06d /src/openvic-simulation/diplomacy
parent79b8b73304753fedab822e6aa859fa15673f52cc (diff)
parent83802dfead4938e6f98b4b9961b286e06ab78b18 (diff)
Merge pull request #123 from OpenVicProject/map_callback
Added map_callback and expect_item_dictionary_reserve_length
Diffstat (limited to 'src/openvic-simulation/diplomacy')
-rw-r--r--src/openvic-simulation/diplomacy/DiplomaticAction.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/openvic-simulation/diplomacy/DiplomaticAction.cpp b/src/openvic-simulation/diplomacy/DiplomaticAction.cpp
index c1aa3df..d10eda3 100644
--- a/src/openvic-simulation/diplomacy/DiplomaticAction.cpp
+++ b/src/openvic-simulation/diplomacy/DiplomaticAction.cpp
@@ -9,13 +9,12 @@
using namespace OpenVic;
DiplomaticActionType::DiplomaticActionType(DiplomaticActionType::Initializer&& initializer)
- : commit_action_caller { std::move(initializer.commit) },
- allowed_to_commit { std::move(initializer.allowed) }, get_acceptance { std::move(initializer.get_acceptance) } {}
+ : commit_action_caller { std::move(initializer.commit) },
+ allowed_to_commit { std::move(initializer.allowed) }, get_acceptance { std::move(initializer.get_acceptance) } {}
CancelableDiplomaticActionType::CancelableDiplomaticActionType(CancelableDiplomaticActionType::Initializer&& initializer)
: allowed_to_cancel{std::move(initializer.allowed_cancel)}, DiplomaticActionType(std::move(initializer)) {}
-
DiplomaticActionManager::DiplomaticActionManager() {}
bool DiplomaticActionManager::add_diplomatic_action(
@@ -49,7 +48,7 @@ DiplomaticActionTickCache DiplomaticActionManager::create_diplomatic_action_tick
result.acceptance = type.get_acceptance(result.argument);
}
});
-
+
return result;
}
@@ -78,38 +77,38 @@ bool DiplomaticActionManager::setup_diplomatic_actions() {
}
);
result &= add_diplomatic_action(
- "give_military_access",
+ "give_military_access",
{ [](Argument& arg) {} }
);
result &= add_diplomatic_action(
- "increase_relations",
+ "increase_relations",
{
.commit = [](Argument& arg) {},
.allowed = [](const Argument& arg) { return false; },
}
);
result &= add_diplomatic_action(
- "decrease_relations",
+ "decrease_relations",
{ [](Argument& arg) {} }
);
result &= add_diplomatic_action(
- "war_subsidies",
+ "war_subsidies",
{ [](Argument& arg) {} }
);
result &= add_diplomatic_action(
- "declare_war",
+ "declare_war",
{ [](Argument& arg) {} }
);
result &= add_diplomatic_action(
- "offer_peace",
+ "offer_peace",
{ [](Argument& arg) {} }
);
result &= add_diplomatic_action(
- "command_units",
+ "command_units",
{ [](Argument& arg) {} }
);
result &= add_diplomatic_action(
- "discredit",
+ "discredit",
{ [](Argument& arg) {} }
);
result &= add_diplomatic_action(