This commit is contained in:
Enno Rehling 2014-08-24 17:11:32 +02:00
commit de5ef3f87b
6 changed files with 20 additions and 15 deletions

View File

@ -1,10 +1,6 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resources> <resources>
<resource name="money">
<item weight="1"/>
</resource>
<resource name="ao_healing" appearance="amulet"> <resource name="ao_healing" appearance="amulet">
<item weight="0" score="6000"/> <item weight="0" score="6000"/>
</resource> </resource>

3
res/items.xml Normal file
View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="iso-8859-1" ?>
<items>
</items>

View File

@ -1,8 +1,9 @@
#!/bin/bash #!/bin/bash
[ -z $ERESSEA ] && ERESSEA=$HOME/eressea
s/preview build master SRC=$ERESSEA/git
s/preview version $SRC/s/preview build master
$SRC/s/preview version
for game in 2 3 4 ; do for game in 2 3 4 ; do
s/preview -g $game run && \ $SRC/s/preview -g $game run && \
s/preview -g $game send $SRC/s/preview -g $game send
done done

View File

@ -2766,7 +2766,7 @@ static void breed_cmd(unit * u, struct order *ord)
(void)init_order(ord); (void)init_order(ord);
s = getstrtoken(); s = getstrtoken();
m = atoi((const char *)s); m = s ? atoi((const char *)s) : 0;
if (m != 0) { if (m != 0) {
/* first came a want-paramter */ /* first came a want-paramter */
s = getstrtoken(); s = getstrtoken();
@ -2775,7 +2775,7 @@ static void breed_cmd(unit * u, struct order *ord)
m = INT_MAX; m = INT_MAX;
} }
if (!s[0]) { if (!s || !s[0]) {
p = P_ANY; p = P_ANY;
} }
else { else {

View File

@ -544,7 +544,8 @@ char *write_order(const order * ord, char *buffer, size_t size)
keyword_t kwd = ORD_KEYWORD(ord); keyword_t kwd = ORD_KEYWORD(ord);
if (kwd == NOKEYWORD) { if (kwd == NOKEYWORD) {
const char *text = ORD_STRING(ord); const char *text = ORD_STRING(ord);
strlcpy(buffer, (const char *)text, size); if (text) strlcpy(buffer, (const char *)text, size);
else buffer[0] = 0;
} }
else { else {
get_command(ord, buffer, size); get_command(ord, buffer, size);

View File

@ -3923,10 +3923,14 @@ void defaultorders(void)
order *ord = *ordp; order *ord = *ordp;
if (getkeyword(ord) == K_DEFAULT) { if (getkeyword(ord) == K_DEFAULT) {
char lbuf[8192]; char lbuf[8192];
order *new_order; order *new_order = 0;
const char *s;
init_order(ord); init_order(ord);
strcpy(lbuf, getstrtoken()); s = getstrtoken();
new_order = parse_order(lbuf, u->faction->locale); if (s) {
strcpy(lbuf, s);
new_order = parse_order(lbuf, u->faction->locale);
}
*ordp = ord->next; *ordp = ord->next;
ord->next = NULL; ord->next = NULL;
free_order(ord); free_order(ord);