Skip to content

String fixes #918

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 36 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
a6f00c6
fix NOTLOST items lost in battle
stm2 Sep 12, 2018
889b111
fix tests for parsing single-letter keywords.
ennorehling Jun 16, 2020
bc66965
remove legacy filereader code
ennorehling Jun 7, 2020
11c489e
Bug 2670 trim   and others from strings.
ennorehling Jun 7, 2020
8666ab9
bug 2673 ignore commands that have fewer than 2 characters.
ennorehling Jun 15, 2020
ceb4560
update default version number
ennorehling Jun 15, 2020
d271efc
install lunitx only once
ennorehling Jun 26, 2020
00f2182
Durch GIB "leer" gewordene Schiffe können nicht sinken.
ennorehling Jun 27, 2020
ec5dcda
bug 2674 send message to player, not monsters
ennorehling Jun 27, 2020
90837b3
bug 2674 fix null-ptr deref
ennorehling Jun 27, 2020
656248c
Lighthouse shows roads in both CR and NR.
ennorehling Jun 27, 2020
c2823e1
accept some selected changes from stm2's script rewrite.
ennorehling Jun 27, 2020
0c87bc9
delete obsolete scripts, shellcheck the rest
ennorehling Jun 27, 2020
8b1ecf9
make coverity understand that there is no buffer overflow here.
ennorehling Jun 27, 2020
0037a26
stop showing unhandled keycodes in status
ennorehling Jun 27, 2020
cf84a95
bug 2678: fix trade_needs_castle
ennorehling Jul 4, 2020
4ea08e5
Merge pull request #915 from eressea/bug-2678
ennorehling Jul 4, 2020
aecbe41
Merge branch 'develop' of github.com:eressea/server into develop
ennorehling Jul 4, 2020
9a72403
Bug 2679: Nur Bergwächter bewachen Eisen.
ennorehling Jul 5, 2020
4052487
Merge pull request #916 from eressea/bug-2679
ennorehling Jul 5, 2020
300f46a
Bug 2680: shapeshift spell cannot be cast twice.
ennorehling Jul 7, 2020
d173d48
Merge pull request #917 from eressea/bug-2680
ennorehling Jul 9, 2020
885037d
empty convoys cannot be built on.
ennorehling Jul 12, 2020
a946037
Merge branch 'develop' of github.com:eressea/server into develop
ennorehling Jul 12, 2020
25e9498
Bug 2683: fix buildings with size 0
ennorehling Jul 16, 2020
69d6e27
Bug 2668 Spruchstärke Ritual der Aufnahme
ennorehling Jul 16, 2020
23e5738
make it impossible to create buildings with size 0
ennorehling Jul 17, 2020
a58831d
fake wormhole in test had negative size
ennorehling Jul 17, 2020
ed2d83c
Allow alternative names for some spells.
ennorehling Jul 17, 2020
b8738ed
Finish spell renaming, remove wdw leftovers.
ennorehling Jul 18, 2020
e5e9a9d
reviewed all strings
stm2 Jul 16, 2020
1af5456
edited strings that affect the user
stm2 Jul 16, 2020
dd49c05
edited a few spells
stm2 Jul 16, 2020
6250eb9
amend edit spell
stm2 Jul 18, 2020
c1b1205
reviewed all messages
stm2 Jul 17, 2020
0e62db8
odds and ends
stm2 Jul 18, 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 .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ indent_size = 4

[*.{xml,json}]
charset = utf-8
indent_size = 2

# Tab indentation (no size specified)
[Makefile]
Expand Down
26 changes: 17 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
# What is this?

This repository contains the source code for the Play-by-Mail strategy game [Eressea](http://www.eressea.de/).
This repository contains the source code for the Play-by-Mail
strategy game [Eressea](http://www.eressea.de/).

# Prerequisites

Eressea depends on a number of external libraries. On a recent Debian-based Linux system, this is the apt-get command to install all of them:
Eressea depends on a number of external libraries. On a recent
Debian-based Linux system, this is the apt-get command to
install all of them:

sudo apt-get install git cmake gcc make libxml2-dev liblua5.2-dev libtolua-dev libncurses5-dev libsqlite3-dev luarocks
sudo apt-get install git cmake gcc make luarocks libxml2-dev \
liblua5.2-dev libtolua-dev libncurses5-dev libsqlite3-dev

# How to check out and build the Eressea server

This repository relies heavily on the use of submodules, and it pulls in most of the code from those. The build system being used is cmake, which can create Makefiles on Unix, or Visual Studio project files on Windows. Here's how you clone and build the source on Ubuntu:
This repository relies heavily on the use of submodules, and it pulls in
most of the code from those. The build system being used is cmake, which
can create Makefiles on Unix, or Visual Studio project files on Windows.
Here's how you clone and build the source on Linux or macOS:

git clone --recursive git://github.com/eressea/server.git
cd server
./configure
./s/build
git clone --recursive git://github.com/eressea/server.git source
cd source
git submodule update --init
s/build

If you got this far and all went well, you have built a server (it is linked from the `game` subdirectory), and it will have passed some basic functionality tests.
If you got this far and all went well, you have built the server, and
it will have passed some basic functionality tests.

* [![Static Analysis](https://scan.coverity.com/projects/6742/badge.svg?flat=1)](https://scan.coverity.com/projects/6742/)
* [![Build Status](https://api.travis-ci.org/eressea/server.svg?branch=develop)](https://travis-ci.org/eressea/server)
Expand Down
53 changes: 44 additions & 9 deletions conf/e2/locales.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,46 @@
{
"include": [
"config://res/translations/strings.de.po",
"config://res/translations/strings-e2.de.po",
"config://res/translations/strings.en.po",
"config://res/translations/strings-e2.en.po",
"config://res/translations/messages.de.po",
"config://res/translations/messages.en.po",
"config://res/core/messages.xml"
]
"include": [
"config://res/translations/strings.de.po",
"config://res/translations/strings-e2.de.po",
"config://res/translations/strings.en.po",
"config://res/translations/strings-e2.en.po",
"config://res/translations/messages.de.po",
"config://res/translations/messages.en.po",
"config://res/core/messages.xml"
],
"aliases": {
"de": {
"spell::earthquake": [
"Beschwöre einen Erdelementar",
"Beschwörung eines Erdelementares"
],
"spell::goodwinds": [
"Beschwörung eines Wasserelementares",
"Beschwöre einen Wasserelementar"
],
"spell::stormwinds": [
"Beschwöre einen Sturmelementar",
"Beschwörung eines Sturmelementares"
],
"spell::summonfireelemental": [
"Beschwöre einen Hitzeelementar",
"Beschwörung eines Hitzeelementares"
]
},
"en": {
"spell::analyzedream": "Analyse Dreams",
"spell::antimagiczone": "Antimagic",
"spell::create_dreameye": "Create a Visioneye",
"spell::create_firesword": "Create a Flamesword",
"spell::create_focus": "Create an Aurafocus",
"spell::earthquake": "Summon Earth Elemental",
"spell::goodwinds": "Summon Water Elemental",
"spell::stormwinds": "Summon Storm Elemental",
"spell::summonfireelemental": "Summon Fire Elemental",
"spell::summonshadow": "Summon Shadowdemons",
"spell::summonshadowlords": "Summon Shadowmasters",
"spell::readmind": "Mind Probe",
"spell::migration": "Rit of Acceptance"
}
}
}
18 changes: 9 additions & 9 deletions conf/e3/locales.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"include": [
"config://res/translations/strings.de.po",
"config://res/translations/strings-e3.de.po",
"config://res/translations/messages.de.po",
"config://res/translations/strings.en.po",
"config://res/translations/strings-e3.en.po",
"config://res/translations/messages.en.po",
"config://res/core/messages.xml"
]
"include": [
"config://res/translations/strings.de.po",
"config://res/translations/strings-e3.de.po",
"config://res/translations/messages.de.po",
"config://res/translations/strings.en.po",
"config://res/translations/strings-e3.en.po",
"config://res/translations/messages.en.po",
"config://res/core/messages.xml"
]
}
2 changes: 1 addition & 1 deletion process/compress.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

addr=%(email)s
[ $# -ge 1 ] && addr=$1
[ -z $addr ] || send-%(compression)s-report $addr '%(gamename)s Report #%(turn)s' %(files)s
[ -z $addr ] || $ERESSEA/server/bin/send-%(compression)s-report $addr '%(gamename)s Report #%(turn)s' %(files)s
"""

turn = argv[1]
Expand Down
6 changes: 4 additions & 2 deletions process/compress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ if [ -z "$ERESSEA" ]; then
exit 2
fi

BINDIR="$ERESSEA/server/bin"

GAME="$ERESSEA/game-$1"
GAME_NAME=$(grep -w name "$GAME/eressea.ini" | sed 's/.*=\s*//')
GAME_NAME=$("$BINDIR/inifile" "$GAME/eressea.ini" get game:name)

TURN=$2
if [ -z "$TURN" ]
Expand All @@ -20,6 +22,6 @@ if [ ! -d "$GAME/reports" ]; then
fi

cd "$GAME/reports" || exit
"$ERESSEA/server/bin/compress.py" "$TURN" "$GAME_NAME"
"$BINDIR/compress.py" "$TURN" "$GAME_NAME"
cd - || exit

14 changes: 11 additions & 3 deletions process/cron/orders.cron
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,19 @@
# this here script to make a non-blocking syntax check and reject or
# accept the order file.

if [ "yes" != "$CONFIRM" ] ; then
if [ "no" == "$CONFIRM" ] ; then
exit
fi

for GAME in $*
if [ -z "$ERESSEA" ] ; then
ERESSEA="$HOME/eressea"
echo "The ERESSEA environment variable is not set. Assuming $ERESSEA."
fi

cd "$ERESSEA" || exit

for GAME in "$@"
do
$HOME/eressea/orders-php/check-orders.sh $GAME
orders-php/check-orders.sh "$GAME"
done

2 changes: 1 addition & 1 deletion process/cron/preview.cron
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[ "$PREVIEW" != "yes" ] && exit
[ -z "${ERESSEA}" ] && ERESSEA="$HOME/eressea"

eval $(luarocks path)
eval "$(luarocks path)"
branch="develop"
if [ -e "${ERESSEA}/build/.preview" ]; then
branch=$(cat "${ERESSEA}/build/.preview")
Expand Down
44 changes: 22 additions & 22 deletions process/cron/run-eressea.cron
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
#!/bin/bash

eval $(luarocks path)
eval "$(luarocks path)"
GAME=$1
(
[ "$ENABLED" != "yes" ] && exit
[ -z ${ERESSEA} ] && ERESSEA=$HOME/eressea
[ "$ENABLED" == "no" ] && exit
[ -z "$ERESSEA" ] && ERESSEA="$HOME/eressea"

export ERESSEA
BIN=$ERESSEA/server/bin
TURN=$(cat $ERESSEA/game-$GAME/turn)
if [ ! -e $ERESSEA/game-$GAME/data/$TURN.dat ]; then
BIN="$ERESSEA/server/bin"
TURN=$(cat "$ERESSEA/game-$GAME/turn")
if [ ! -e "$ERESSEA/game-$GAME/data/$TURN.dat" ]; then
echo "data file $TURN is missing, cannot run turn for game $GAME"
exit 1
fi
REPORTS=$ERESSEA/game-$GAME/reports
if [ -d $REPORTS ]; then
rm -rf $REPORTS
REPORTS="$ERESSEA/game-$GAME/reports"
if [ -d "$REPORTS" ]; then
rm -rf "$REPORTS"
fi
mkdir $REPORTS
mkdir "$REPORTS"

cd $ERESSEA/game-$GAME
cd "$ERESSEA/game-$GAME" || exit

if [ -d test ]; then
touch test/execute.lock
fi

$BIN/create-orders $GAME $TURN
if [ ! -s $ERESSEA/game-$GAME/orders.$TURN ]; then
"$BIN/create-orders" "$GAME" "$TURN"
if [ ! -s "$ERESSEA/game-$GAME/orders.$TURN" ]; then
echo "server did not create orders for turn $TURN in game $GAME"
exit 2
fi

$BIN/backup-eressea $GAME $TURN
"$BIN/backup-eressea" "$GAME" "$TURN"
rm -f execute.lock
$BIN/run-turn $GAME $TURN
"$BIN/run-turn" "$GAME" "$TURN"
touch execute.lock

if [ ! -s $REPORTS/reports.txt ]; then
if [ ! -s "$REPORTS/reports.txt" ]; then
echo "server did not create reports.txt in game $GAME"
exit 4
fi
$BIN/backup-eressea $GAME $TURN
"$BIN/backup-eressea" "$GAME" "$TURN"
let TURN=$TURN+1
if [ ! -s $ERESSEA/game-$GAME/data/$TURN.dat ]; then
if [ ! -s "$ERESSEA/game-$GAME/data/$TURN.dat" ]; then
echo "server did not create data for turn $TURN in game $GAME"
exit 3
fi
echo "sending reports for game $GAME, turn $TURN"
$BIN/compress.sh $GAME $TURN
$BIN/sendreports.sh $GAME
$BIN/backup-eressea $GAME $TURN
"$BIN/compress.sh" "$GAME" "$TURN"
"$BIN/sendreports.sh" "$GAME"
"$BIN/backup-eressea" "$GAME" "$TURN"
rm -f test/execute.lock
) | tee -a $HOME/log/eressea.cron.log
) | tee -a "$HOME/log/eressea.cron.log"

5 changes: 3 additions & 2 deletions process/orders-process
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/sh
SCRIPT=$(readlink -f $0)
cd $(dirname $SCRIPT)
SCRIPT=$(readlink -f "$0")
SCRDIR=$(dirname "$SCRIPT")
cd "$SCRDIR" || exit

lockfile -r3 -l120 orders.queue.lock
python process-orders.py "$@"
Expand Down
1 change: 0 additions & 1 deletion process/received-mail.sh

This file was deleted.

2 changes: 0 additions & 2 deletions process/received.sh

This file was deleted.

25 changes: 8 additions & 17 deletions res/core/messages.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1299,6 +1299,14 @@
<arg name="race" type="race"/>
</type>
</message>
<message name="sp_shapeshift_twice" section="errors">
<type>
<arg name="unit" type="unit"/>
<arg name="region" type="region"/>
<arg name="command" type="order"/>
<arg name="target" type="unit"/>
</type>
</message>

<message name="sp_movecastle_fail_0" section="magic">
<type>
Expand Down Expand Up @@ -5451,13 +5459,6 @@
<arg name="alliance" type="alliance"/>
</type>
</message>
<message name="wdw_pyramidspell_found" section="events">
<type>
<arg name="unit" type="unit"/>
<arg name="region" type="region"/>
<arg name="command" type="order"/>
</type>
</message>

<message name="error_spell_on_ship_already" section="errors">
<type>
Expand All @@ -5477,16 +5478,6 @@
</type>
</message>

<message name="wdw_pyramidspell_notfound" section="events">
<type>
<arg name="unit" type="unit"/>
<arg name="region" type="region"/>
<arg name="command" type="order"/>
<arg name="mindist" type="int"/>
<arg name="maxdist" type="int"/>
</type>
</message>

<message name="wormhole_requirements" section="errors">
<type>
<arg name="unit" type="unit"/>
Expand Down
Loading