Skip to content

Actions rebased #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
623cb71
print commmands with -hb/-hc
stm2 Aug 13, 2020
bb8d3a1
fixed help (-R)
stm2 Aug 14, 2020
b5adbc8
added missing items and fixed English item names
stm2 Aug 13, 2020
9f80d4d
BREED is actually called GROW
stm2 Aug 13, 2020
6fd1a6d
message spelling fixed
stm2 Aug 17, 2020
e77728b
fixed English herb names
stm2 Aug 13, 2020
5981477
removed BELAGERE
stm2 Aug 14, 2020
a471368
removed deprecated commands
stm2 Aug 14, 2020
98f8237
fixed options
stm2 Aug 14, 2020
fb5129a
check ZERSTOERE
stm2 Aug 13, 2020
a21fcd8
HELP FIGHT, FACTIONSTEALTH not for e3
stm2 Aug 14, 2020
3223ea2
E3 races
stm2 Aug 14, 2020
f6e9095
fixed e3 files
stm2 Aug 14, 2020
eb99560
small adjustments
stm2 Aug 17, 2020
495013a
refactored testing, check CLAIM order parameters
stm2 Aug 15, 2020
65c3710
tests for e3, ALLIANZ
stm2 Aug 16, 2020
58be0a1
warn of too many parameters
stm2 Aug 16, 2020
9a2a62d
check PFLANZE
stm2 Aug 17, 2020
3be73b5
handle single quotes and quotes within quotes (partially)
stm2 Aug 17, 2020
d452782
check SPRACHE
stm2 Aug 17, 2020
1181b98
tweaks
stm2 Aug 20, 2020
2b1d245
fixed https://bugs.eressea.de/view.php?id=2555
stm2 Aug 20, 2020
9244f51
fixed https://bugs.eressea.de/view.php?id=2641
stm2 Aug 21, 2020
ef38813
added Steinkreis
stm2 Aug 21, 2020
a210756
fixed https://bugs.eressea.de/view.php?id=2547
stm2 Aug 21, 2020
b7441d2
fixed https://bugs.eressea.de/view.php?id=2522
stm2 Aug 21, 2020
9977e26
check for missing order start / accidental NEXT
stm2 Aug 21, 2020
1caca0c
fixed missing message, (wrong) caravanserei spelling, -P option
stm2 Aug 21, 2020
0cbe483
okay, server accepts PARTEI x "pw" as order start
stm2 Aug 22, 2020
2a10ce2
fixed whitespace errors
stm2 Aug 22, 2020
e917ef1
check LOCALE mismatch
stm2 Aug 23, 2020
2c3eb45
test actions
stm2 Aug 25, 2020
a37f5e2
fixed a few memory leaks
stm2 Aug 29, 2020
2574c6f
tests for breed
stm2 Aug 29, 2020
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
1 change: 1 addition & 0 deletions e2/de/messages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ MISSINGNUMRECRUITS, Anzahl Rekruten fehlt
MISSINGOFFER, Geldgebot fehlt
MISSINGPARAMETERS, Parameter STUFE oder REGION fehlt
MISSINGPASSWORD, Kein Passwort angeben
MISSINGSTART, ERESSEA partei-nummer "Passwort" fehlt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rückgängig gemacht in commit 417a5e9 weil es nicht damit klar kam, dass in der ersten Zeile ein BOM steht.

MISSINGUNITNUMBER, Keine Einheitsnummer
MOVENOTPOSSIBLEWITHPAUSE, NACH geht nicht mit PAUSE
MSGTO, BOTSCHAFT PARTEI, BOTSCHAFT EINHEIT oder BOTSCHAFT REGION
Expand Down
1 change: 1 addition & 0 deletions e2/en/messages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ MISSINGNUMRECRUITS, Number of recruits missing
MISSINGOFFER, Missing offer
MISSINGPARAMETERS, LEVEL or REGION missing
MISSINGPASSWORD, Missing password
MISSINGSTART, ERESSEA faction-no "Password" not found
MISSINGUNITNUMBER, Missing unit number
MOVENOTPOSSIBLEWITHPAUSE, MOVE and PAUSE cannot be combined
MSGTO, MESSAGE TO FACTION, MESSAGE TO UNIT or MESSAGE TO REGION
Expand Down
1 change: 1 addition & 0 deletions e3/de/messages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ MISSINGNUMRECRUITS, Anzahl Rekruten fehlt
MISSINGOFFER, Geldgebot fehlt
MISSINGPARAMETERS, Parameter STUFE oder REGION fehlt
MISSINGPASSWORD, Kein Passwort angeben
MISSINGSTART, ERESSEA partei-nummer "Passwort" fehlt
MISSINGUNITNUMBER, Keine Einheitsnummer
MOVENOTPOSSIBLEWITHPAUSE, NACH geht nicht mit PAUSE
MSGTO, BOTSCHAFT PARTEI, BOTSCHAFT EINHEIT oder BOTSCHAFT REGION
Expand Down
1 change: 1 addition & 0 deletions e3/en/messages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ MISSINGNUMRECRUITS, Number of recruits missing
MISSINGOFFER, Missing offer
MISSINGPARAMETERS, LEVEL or REGION missing
MISSINGPASSWORD, Missing password
MISSINGSTART, ERESSEA faction-no "Password" not found
MISSINGUNITNUMBER, Missing unit number
MOVENOTPOSSIBLEWITHPAUSE, MOVE and PAUSE cannot be combined
MSGTO, MESSAGE TO FACTION, MESSAGE TO UNIT or MESSAGE TO REGION
Expand Down
12 changes: 11 additions & 1 deletion echeck.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,7 @@ enum {
MISSINGOFFER,
MISSINGPARAMETERS,
MISSINGPASSWORD,
MISSINGSTART,
MISSINGUNITNUMBER,
MOVENOTPOSSIBLEWITHPAUSE,
MSGTO,
Expand Down Expand Up @@ -765,6 +766,7 @@ static char *Errors[MAX_ERRORS] = {
"MISSINGOFFER",
"MISSINGPARAMETERS",
"MISSINGPASSWORD",
"MISSINGSTART",
"MISSINGUNITNUMBER",
"MOVENOTPOSSIBLEWITHPAUSE",
"MSGTO",
Expand Down Expand Up @@ -5281,7 +5283,7 @@ void check_OPTION(void)

void process_order_file(int *faction_count, int *unit_count)
{
int f = 0, next = 0;
int f = 0, next = 0, start_warning = 1;
t_region *r;
teach *t;
unit *u;
Expand Down Expand Up @@ -5420,6 +5422,7 @@ void process_order_file(int *faction_count, int *unit_count)
indent = next_indent = INDENT_FACTION;
porder();
next = 1;
start_warning = 1;

check_money(true); /* Check für Lerngeld, Handel usw.; true: dann Bewegung ausführen */
if (Regionen) {
Expand Down Expand Up @@ -5454,12 +5457,19 @@ void process_order_file(int *faction_count, int *unit_count)
cmd_unit = NULL;
order_unit = NULL;

get_order();
break;

default:
if (order_buf[0] == ';') {
check_comment();
} else {
if (f && order_buf[0])
awarning(errtxt[NOTEXECUTED], 1);
else if (start_warning && order_buf[0]) {
anerror(errtxt[MISSINGSTART]);
start_warning = 0;
}
}
get_order();
}
Expand Down
10 changes: 10 additions & 0 deletions tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,15 @@ static void test_process_faction(CuTest * tc)
CuAssertIntEquals(tc, 0, warning_count);
}

static void test_process_feressea(CuTest * tc)
{
error_count = warning_count = 0;
mock_input("FERESSEA 1 \"password\"\n");
process_order_file(0, 0);
CuAssertIntEquals(tc, 1, error_count);
CuAssertIntEquals(tc, 0, warning_count);
}

static void test_process_unit(CuTest * tc)
{
int faction_count = 0, unit_count = 0;
Expand Down Expand Up @@ -484,6 +493,7 @@ int AddTestSuites(CuSuite * suite, const char * args)
cs = CuSuiteNew();
SUITE_ADD_TEST(cs, test_process_nothing);
SUITE_ADD_TEST(cs, test_process_faction);
SUITE_ADD_TEST(cs, test_process_feressea);
SUITE_ADD_TEST(cs, test_process_unit);
CuSuiteAddSuite(suite, cs);
}
Expand Down