- ugroup, erste Variante. Wird im Report noch nicht angezeigt.

Ungetestet. Committed, um ekelige Konflikte in messages.xml
  zu vermeiden.
This commit is contained in:
Christian Schlittchen 2001-04-28 12:01:17 +00:00
parent 9750b3f22b
commit 1444fe66d4
6 changed files with 84 additions and 11 deletions

View File

@ -28,6 +28,7 @@
#include "overrideroads.h"
#include "otherfaction.h"
#include "racename.h"
#include "ugroup.h"
#ifdef AT_OPTION
# include "option.h"
#endif
@ -63,4 +64,5 @@ init_attributes(void)
#ifdef AT_OPTION
init_option();
#endif
init_ugroup();
}

View File

@ -203,7 +203,9 @@ const char *keywords[MAXKEYWORDS] =
"SORTIEREN",
"JIHAD",
"GM",
"INFO"
"INFO",
"JOINVERBAND",
"LEAVEVERBAND"
};
const char *report_options[MAX_MSG] =

View File

@ -412,6 +412,8 @@ enum {
K_SETJIHAD,
K_GM, /* perform GM commands */
K_INFO, /* set player-info */
K_JOINUGROUP,
K_LEAVEUGROUP,
MAXKEYWORDS,
NOKEYWORD = (keyword_t) - 1
};

View File

@ -41,6 +41,7 @@ typedef struct faction {
int options;
int no_units;
int karma;
struct ugroup *ugroups;
struct warning * warnings;
struct msglevel * msglevels;
struct ally *allies;

View File

@ -3762,6 +3762,74 @@
</locale>
</message>
<message name="error289">
<type>
<arg name="unit" type="unit"></arg>
<arg name="region" type="region"></arg>
<arg name="command" type="string"></arg>
</type>
<locale name="de">
<nr section="errors">
<text>"$unit($unit) in $region($region): '$command' - Wie sollen wir uns tarnen?"</text>
</nr>
</locale>
</message>
<message name="error290">
<param name="unit" type="unit"></param>
<param name="region" type="region"></param>
<param name="command" type="string"></param>
<locale name="de">
<nr section="de">
<text>"$unit in $region: '$command' - Eine Einheit kann nur in einem Verband Mitglied sein."</text>
</nr>
</locale>
</message>
<message name="error291">
<param name="unit" type="unit"></param>
<param name="region" type="region"></param>
<param name="command" type="string"></param>
<locale name="de">
<nr section="de">
<text>"$unit in $region: '$command' - Die Einheit ist in keinem Verband."</text>
</nr>
</locale>
</message>
<message name="error292">
<param name="unit" type="unit"></param>
<param name="region" type="region"></param>
<param name="command" type="string"></param>
<locale name="de">
<nr section="de">
<text>"$unit in $region: '$command' - Mit sich selbst kann man keinen Verband bilden."</text>
</nr>
</locale>
</message>
<message name="error293">
<param name="unit" type="unit"></param>
<param name="region" type="region"></param>
<param name="command" type="string"></param>
<locale name="de">
<nr section="de">
<text>"$unit in $region: '$command' - Verbände können nur zwischen Einheiten derselben Partei gebildet werden."</text>
</nr>
</locale>
</message>
<message name="error294">
<param name="unit" type="unit"></param>
<param name="region" type="region"></param>
<param name="command" type="string"></param>
<locale name="de">
<nr section="de">
<text>"$unit in $region: '$command' - Die Einheiten müssen sich im selben Schiff oder Gebäude aufhalten."</text>
</nr>
</locale>
</message>
<message name="msg_event">
<type>
<arg name="string" type="string"></arg>

View File

@ -16,15 +16,16 @@ import re
from Graph import *
class heer:
def __init__(self, rx, ry, f, o):
def __init__(self, rx, ry, f, p, o):
self.rx = rx
self.ry = ry
self.f = f
self.part = p
self.o = o
self.attacked = []
def toString(self):
return "("+self.f+","+str(self.rx)+","+str(self.ry)+")"
return "("+self.f+"/"+str(self.part)+","+str(self.rx)+","+str(self.ry)+")"
def dist(x1, y1, x2, y2):
@ -52,14 +53,11 @@ def is_neighbour(h, r1, r2):
return 0
heere = [
Node(heer(0,-2, 'D', 'A->C:1,-3')),
Node(heer(1,-3, 'D', '')),
Node(heer(1,-2, 'D', '')),
Node(heer(2,-3, 'D', 'A->C:1,-3')),
Node(heer(1,-2, 'C', 'L->D')),
Node(heer(1,-3, 'C', 'A->D:1,-2')),
Node(heer(0, 0, 'A', '')),
Node(heer(0, 0, 'B', 'L->A'))
Node(heer(0,0, 'A', 1, 'A->B:-1,1')),
Node(heer(0,0, 'A', 2, 'A->B:0,1')),
Node(heer(-1,1, 'B', 1, '')),
Node(heer(1,-1, 'B', 1, '')),
Node(heer(0,1, 'B', 1, ''))
]
def find_heer_node(x, y, f):