diff options
author | hop311 <hop3114@gmail.com> | 2023-12-23 19:26:05 +0100 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2023-12-23 19:26:05 +0100 |
commit | 8a33982e543b7fb8c09be90ebadb33fe7f99b52f (patch) | |
tree | 0fb82e22b383996606ef6adc3e92c42d85bc6777 /src/openvic-simulation/misc/Decision.cpp | |
parent | 14e47d58b85f657ec1fed8abf88219f09bd3efbb (diff) |
Fixed TGC compatibility + misc cleanup
Diffstat (limited to 'src/openvic-simulation/misc/Decision.cpp')
-rw-r--r-- | src/openvic-simulation/misc/Decision.cpp | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/src/openvic-simulation/misc/Decision.cpp b/src/openvic-simulation/misc/Decision.cpp index f1f2b6c..d50a16a 100644 --- a/src/openvic-simulation/misc/Decision.cpp +++ b/src/openvic-simulation/misc/Decision.cpp @@ -4,18 +4,16 @@ using namespace OpenVic; using namespace OpenVic::NodeTools; Decision::Decision( - std::string_view new_identifier, bool new_alert, bool new_news, - std::string_view new_news_title, std::string_view new_news_desc_long, - std::string_view new_news_desc_medium, std::string_view new_news_desc_short, + std::string_view new_identifier, bool new_alert, bool new_news, std::string_view new_news_title, + std::string_view new_news_desc_long, std::string_view new_news_desc_medium, std::string_view new_news_desc_short, std::string_view new_picture ) : HasIdentifier { new_identifier }, alert { new_alert }, news { new_news }, news_title { new_news_title }, news_desc_long { new_news_desc_long }, news_desc_medium { new_news_desc_medium }, news_desc_short { new_news_desc_short }, picture { new_picture } {} bool DecisionManager::add_decision( - std::string_view identifier, bool alert, bool news, std::string_view news_title, - std::string_view news_desc_long, std::string_view news_desc_medium, - std::string_view news_desc_short, std::string_view picture + std::string_view identifier, bool alert, bool news, std::string_view news_title, std::string_view news_desc_long, + std::string_view news_desc_medium, std::string_view news_desc_short, std::string_view picture ) { if (identifier.empty()) { Logger::error("Invalid decision identifier - empty!"); @@ -35,14 +33,7 @@ bool DecisionManager::add_decision( } return decisions.add_item({ - identifier, - alert, - news, - news_title, - news_desc_long, - news_desc_medium, - news_desc_short, - picture + identifier, alert, news, news_title, news_desc_long, news_desc_medium, news_desc_short, picture }, duplicate_warning_callback); } @@ -65,9 +56,11 @@ bool DecisionManager::load_decision_file(ast::NodeCPtr root) { "effect", ONE_EXACTLY, success_callback, //TODO "ai_will_do", ZERO_OR_ONE, success_callback //TODO )(node); - ret &= add_decision(identifier, alert, news, news_title, news_desc_long, news_desc_medium, news_desc_short, picture); + ret &= add_decision( + identifier, alert, news, news_title, news_desc_long, news_desc_medium, news_desc_short, picture + ); return ret; } ) )(root); -}
\ No newline at end of file +} |