forked from github/server
Merge branch 'master' of https://github.com/eressea/server
This commit is contained in:
commit
308b5ca358
|
@ -1,4 +1,6 @@
|
||||||
eressea.ini
|
eressea.ini
|
||||||
|
Debug
|
||||||
|
Release
|
||||||
|
|
||||||
# SlickEdit
|
# SlickEdit
|
||||||
*.vtg
|
*.vtg
|
||||||
|
|
|
@ -79,6 +79,6 @@ add_subdirectory (iniparser)
|
||||||
add_subdirectory (quicklist)
|
add_subdirectory (quicklist)
|
||||||
add_subdirectory (critbit)
|
add_subdirectory (critbit)
|
||||||
add_subdirectory (src eressea)
|
add_subdirectory (src eressea)
|
||||||
install(DIRECTORY res core conf DESTINATION ${CMAKE_INSTALL_PREFIX} FILES_MATCHING PATTERN "*.xml")
|
install(DIRECTORY res conf DESTINATION ${CMAKE_INSTALL_PREFIX} FILES_MATCHING PATTERN "*.xml")
|
||||||
install(DIRECTORY scripts DESTINATION ${CMAKE_INSTALL_PREFIX} FILES_MATCHING PATTERN "*.lua")
|
install(DIRECTORY scripts DESTINATION ${CMAKE_INSTALL_PREFIX} FILES_MATCHING PATTERN "*.lua")
|
||||||
install(DIRECTORY core/scripts DESTINATION core FILES_MATCHING PATTERN "*.lua")
|
|
||||||
|
|
|
@ -3729,8 +3729,8 @@
|
||||||
<arg name="want" type="int"/>
|
<arg name="want" type="int"/>
|
||||||
</type>
|
</type>
|
||||||
<text locale="de">"$unit($unit) in $region($region) rekrutiert $int($amount) von $int($want) Personen."</text>
|
<text locale="de">"$unit($unit) in $region($region) rekrutiert $int($amount) von $int($want) Personen."</text>
|
||||||
<text locale="fr">"$unit($unit) in $region($region) recruits $int($amount) $int($want) people."</text>
|
<text locale="en">"$unit($unit) in $region($region) recruits
|
||||||
<text locale="en">"$unit($unit) in $region($region) recruits $int($amount) $int($want) people."</text>
|
$int($amount) of $int($want) people."</text>
|
||||||
</message>
|
</message>
|
||||||
<message name="siege_catapults" section="events">
|
<message name="siege_catapults" section="events">
|
||||||
<type>
|
<type>
|
||||||
|
@ -8054,7 +8054,8 @@
|
||||||
<arg name="race" type="race"/>
|
<arg name="race" type="race"/>
|
||||||
</type>
|
</type>
|
||||||
<text locale="de">"$unit($unit) in $region($region): $int($number) $race($race,$number) $if($eq($number,1),"verschwand", "verschwanden") über Nacht."</text>
|
<text locale="de">"$unit($unit) in $region($region): $int($number) $race($race,$number) $if($eq($number,1),"verschwand", "verschwanden") über Nacht."</text>
|
||||||
<text locale="en">"$unit($unit) in $region($region): $int($number) $race($race,$number) disappearedin the night."</text>
|
<text locale="en">"$unit($unit) in $region($region): $int($number)
|
||||||
|
$race($race,$number) disappeared in the night."</text>
|
||||||
</message>
|
</message>
|
||||||
|
|
||||||
<message name="forestfire_spread" section="events">
|
<message name="forestfire_spread" section="events">
|
||||||
|
|
|
@ -15,6 +15,7 @@ MACHINE=`uname -m`
|
||||||
[ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc"
|
[ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc"
|
||||||
BIN_DIR="build-$MACHINE-$CC-$BUILD"
|
BIN_DIR="build-$MACHINE-$CC-$BUILD"
|
||||||
mkdir -p $BIN_DIR
|
mkdir -p $BIN_DIR
|
||||||
|
ln -sf $BIN_DIR $BUILD
|
||||||
cd $BIN_DIR
|
cd $BIN_DIR
|
||||||
|
|
||||||
MACHINE=$(gcc -dumpmachine)
|
MACHINE=$(gcc -dumpmachine)
|
||||||
|
|
|
@ -16,4 +16,4 @@ BIN_DIR="build-$MACHINE-$CC-Debug"
|
||||||
|
|
||||||
cd $ROOT/$BIN_DIR
|
cd $ROOT/$BIN_DIR
|
||||||
make install
|
make install
|
||||||
cd $OLDPWD
|
|
||||||
|
|
42
s/setup
42
s/setup
|
@ -8,10 +8,11 @@ exit $2 # otherwise
|
||||||
|
|
||||||
function usage() {
|
function usage() {
|
||||||
cat <<USAGE
|
cat <<USAGE
|
||||||
Usage: $u [-hf] [-d DIR] [-g <game>] [-r <rules>] [-s DIR]
|
Usage: $u [-hfn] [-d DIR] [-g <game>] [-r <rules>] [-s DIR]
|
||||||
-h print this message
|
-h print this message
|
||||||
-f force overwrite of existing game
|
-f force overwrite of existing game
|
||||||
-g game id
|
-g game id
|
||||||
|
-n create new eressea.ini file
|
||||||
-r name of ruleset
|
-r name of ruleset
|
||||||
-s server installation directory
|
-s server installation directory
|
||||||
-d override directory name
|
-d override directory name
|
||||||
|
@ -21,13 +22,14 @@ USAGE
|
||||||
game=0
|
game=0
|
||||||
force=0
|
force=0
|
||||||
src=server
|
src=server
|
||||||
|
edit=1
|
||||||
while getopts :d:g:r:s:hf o; do
|
while getopts :d:g:r:s:hfn o; do
|
||||||
case "${o}" in
|
case "${o}" in
|
||||||
h) usage ; exit 0 ;;
|
h) usage ; exit 0 ;;
|
||||||
s) src=${OPTARG} ;;
|
s) src=${OPTARG} ;;
|
||||||
d) dir=${OPTARG} ;;
|
d) dir=${OPTARG} ;;
|
||||||
f) force=1 ;;
|
f) force=1 ;;
|
||||||
|
n) edit=0 ;;
|
||||||
g) game=${OPTARG} ;;
|
g) game=${OPTARG} ;;
|
||||||
r) rules=${OPTARG} ;;
|
r) rules=${OPTARG} ;;
|
||||||
*) echo "not implemented ${o} ${OPTARG}" ;;
|
*) echo "not implemented ${o} ${OPTARG}" ;;
|
||||||
|
@ -44,7 +46,7 @@ done
|
||||||
[ -e $TOOLS ] || TOOLS=$SOURCE/bin
|
[ -e $TOOLS ] || TOOLS=$SOURCE/bin
|
||||||
[ -z $INIFILE ] && INIFILE=$TOOLS/inifile
|
[ -z $INIFILE ] && INIFILE=$TOOLS/inifile
|
||||||
[ -e $INIFILE ] || INIFILE=$TOOLS/iniparser/inifile
|
[ -e $INIFILE ] || INIFILE=$TOOLS/iniparser/inifile
|
||||||
[ -e $INIFILE ] || abort "tool is not installed: $INIFILE"
|
#[ -e $INIFILE ] || abort "tool is not installed: $INIFILE"
|
||||||
|
|
||||||
cd $ERESSEA
|
cd $ERESSEA
|
||||||
if [ -d $dir ] ; then
|
if [ -d $dir ] ; then
|
||||||
|
@ -55,18 +57,38 @@ cd $dir || abort "could not chdir to game-$game"
|
||||||
mkdir -p data reports
|
mkdir -p data reports
|
||||||
|
|
||||||
function ini_sec() {
|
function ini_sec() {
|
||||||
|
if [ $edit -eq 1 ]; then
|
||||||
$INIFILE eressea.ini add $1
|
$INIFILE eressea.ini add $1
|
||||||
|
else
|
||||||
|
echo "[$1]" >> eressea.ini
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
function ini_add() {
|
function ini_add() {
|
||||||
$INIFILE eressea.ini add $1 $2
|
if [ $edit -eq 1 ]; then
|
||||||
|
$INIFILE eressea.ini add $1:$2 $3
|
||||||
|
else
|
||||||
|
echo "$2 = $3" >> eressea.ini
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
function ini_start() {
|
||||||
|
if [ -e eressea.ini ]; then
|
||||||
|
if [ ! -e $INIFILE ] && [ $edit -eq 1 ]; then
|
||||||
|
abort "missing editor for eressea.ini. use -n to create new file."
|
||||||
|
fi
|
||||||
|
rm -f eressea.ini
|
||||||
|
edit=0
|
||||||
|
else
|
||||||
|
edit=0
|
||||||
|
fi
|
||||||
touch eressea.ini
|
touch eressea.ini
|
||||||
|
}
|
||||||
|
|
||||||
|
ini_start
|
||||||
ini_sec eressea
|
ini_sec eressea
|
||||||
ini_add eressea:locales de,en
|
ini_add eressea locales de,en
|
||||||
ini_sec lua
|
ini_sec lua
|
||||||
ini_add lua:install $SOURCE
|
ini_add lua install $SOURCE
|
||||||
ini_add lua:install $SOURCE
|
ini_add lua paths $SOURCE/scripts:$SOURCE/lunit
|
||||||
ini_add lua:paths $SOURCE/scripts:$SOURCE/lunit
|
ini_add lua rules $rules
|
||||||
ini_add lua:rules $rules
|
|
||||||
|
|
||||||
ln -f $SOURCE/scripts/run-turn.lua
|
ln -f $SOURCE/scripts/run-turn.lua
|
||||||
|
|
Loading…
Reference in New Issue