Skip to content
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
pch: 1
archive-success: basic-build
dont_skip_data_only_changes: 1
mods: --mods=magiclysm
mods: magiclysm|xedra_evolved,
title: Basic Build and Test (Clang oldest supported, Ubuntu, Curses)
ccache_limit: 4.5G
ccache_key: linux-llvm-13
Expand Down
4 changes: 3 additions & 1 deletion build-scripts/gha_test_only.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ else
parallel -j "$num_test_jobs" ${parallel_opts} "run_test './tests/cata_test' '('{}')=> ' --user-dir=test_user_dir_{#} {}" ::: "[slow] ~starting_items" "~[slow] ~[.],starting_items"
if [ -n "$MODS" ]
then
parallel -j "$num_test_jobs" ${parallel_opts} "run_test './tests/cata_test' 'Mods-('{}')=> ' $(printf %q "${MODS}") --user-dir=modded_{#} {}" ::: "[slow] ~starting_items" "~[slow] ~[.],starting_items"
for MODSET in ${MODS//|/ }; do
parallel -j "$num_test_jobs" ${parallel_opts} "run_test './tests/cata_test' 'Mods-('{}')=> ' --mods=$(printf %q "${MODSET}") --user-dir=modded_{#} {}" ::: "[slow] ~starting_items" "~[slow] ~[.],starting_items"
done
fi

if [ -n "$TEST_STAGE" ]
Expand Down
20 changes: 20 additions & 0 deletions src/npctalk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "avatar.h"
#include "bionics.h"
#include "bodypart.h"
#include "cached_options.h"
#include "calendar.h"
#include "cata_lazy.h"
#include "cata_path.h"
Expand Down Expand Up @@ -6404,6 +6405,25 @@ talk_effect_fun_t::func f_run_eoc_selector( const JsonObject &jo, std::string_vi
translation title = to_translation( "Select an option." );
jo.read( "title", title );

// Selector dialog can't be initialized in tests, so either cancel or activate first eoc
if( test_mode ) {
return [eocs, context, allow_cancel]( dialogue & d ) {
if( allow_cancel ) {
return;
}

dialogue newDialog( d );
if( !context.empty() ) {
for( const auto &val : context[0] ) {
newDialog.set_value( val.first, val.second.evaluate( d ) );
}
}
const effect_on_condition_id first_eoc =
eocs[0].var ? effect_on_condition_id( eocs[0].var->evaluate( d ) ) : eocs[0].id;
first_eoc->activate( newDialog );
};
}

return [eocs, context, title, eoc_names, eoc_keys, eoc_descriptions,
hide_failing, allow_cancel, hilight_disabled]( dialogue & d ) {
uilist eoc_list;
Expand Down
Loading