forked from github/server
Merge branch 'master' into develop
Conflicts: .travis.yml scripts/eressea/cursed.lua
This commit is contained in:
commit
4c2a2e1289
|
@ -100,6 +100,7 @@
|
||||||
<param name="GiveRestriction" value="3"/>
|
<param name="GiveRestriction" value="3"/>
|
||||||
<param name="hunger.long" value="1"/>
|
<param name="hunger.long" value="1"/>
|
||||||
<param name="init_spells" value="0"/>
|
<param name="init_spells" value="0"/>
|
||||||
|
<param name="rules.ship.damage_drift" value="0.00"/> <!-- percent damage from drifting-->
|
||||||
<param name="rules.reserve.twophase" value="1"/>
|
<param name="rules.reserve.twophase" value="1"/>
|
||||||
<param name="rules.give.max_men" value="-1"/>
|
<param name="rules.give.max_men" value="-1"/>
|
||||||
<param name="rules.check_overload" value="0"/>
|
<param name="rules.check_overload" value="0"/>
|
||||||
|
@ -114,6 +115,7 @@
|
||||||
<param name="rules.economy.repopulate_maximum" value="500"/>
|
<param name="rules.economy.repopulate_maximum" value="500"/>
|
||||||
<param name="game.id" value="2"/>
|
<param name="game.id" value="2"/>
|
||||||
<param name="game.name" value="Eressea"/>
|
<param name="game.name" value="Eressea"/>
|
||||||
|
<param name="world.era" value="2"/>
|
||||||
</game>
|
</game>
|
||||||
<strings>
|
<strings>
|
||||||
<string name="mailto">
|
<string name="mailto">
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
require 'bit32'
|
local function bitset(flags, bit)
|
||||||
|
-- TODO: use bit32 when we no longer have to consider lua 5.1 compatibility
|
||||||
|
local x = flags % (bit*2)
|
||||||
|
return x >= bit
|
||||||
|
end
|
||||||
|
|
||||||
local function curse(file)
|
local function curse(file)
|
||||||
for line in file:lines() do
|
for line in file:lines() do
|
||||||
f = get_faction(line)
|
f = get_faction(line)
|
||||||
if not f then
|
if not f then
|
||||||
print("no such faction: " .. line)
|
print("no such faction: " .. line)
|
||||||
elseif bit32.band(16, f.flags)==0 then
|
elseif not bitset(f.flags, 16) then
|
||||||
print("cursing " .. tostring(f))
|
print("cursing " .. tostring(f))
|
||||||
f.flags = f.flags + 16
|
f.flags = f.flags + 16
|
||||||
else
|
else
|
||||||
|
@ -17,7 +21,6 @@ end
|
||||||
local cursed = {}
|
local cursed = {}
|
||||||
|
|
||||||
function cursed.init()
|
function cursed.init()
|
||||||
print("curses!")
|
|
||||||
local f = io.open("cursed.txt", "r")
|
local f = io.open("cursed.txt", "r")
|
||||||
if f then
|
if f then
|
||||||
print("found cursed.txt")
|
print("found cursed.txt")
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#define VERSION_MAJOR 3
|
#define VERSION_MAJOR 3
|
||||||
#define VERSION_MINOR 6
|
#define VERSION_MINOR 6
|
||||||
#define VERSION_BUILD 1
|
#define VERSION_BUILD 2
|
||||||
|
|
|
@ -1539,7 +1539,7 @@ report_computer(const char *filename, report_context * ctx, const char *charset)
|
||||||
fprintf(F, "%d;Basis\n", 36);
|
fprintf(F, "%d;Basis\n", 36);
|
||||||
fprintf(F, "%d;Runde\n", turn);
|
fprintf(F, "%d;Runde\n", turn);
|
||||||
fprintf(F, "%d;Zeitalter\n", era);
|
fprintf(F, "%d;Zeitalter\n", era);
|
||||||
fprintf(F, "%d.%d.%d;Build\n", VERSION_MAJOR, VERSION_MINOR, VERSION_BUILD);
|
fprintf(F, "\"%d.%d.%d\";Build\n", VERSION_MAJOR, VERSION_MINOR, VERSION_BUILD);
|
||||||
if (mailto != NULL) {
|
if (mailto != NULL) {
|
||||||
fprintf(F, "\"%s\";mailto\n", mailto);
|
fprintf(F, "\"%s\";mailto\n", mailto);
|
||||||
fprintf(F, "\"%s\";mailcmd\n", LOC(f->locale, "mailcmd"));
|
fprintf(F, "\"%s\";mailcmd\n", LOC(f->locale, "mailcmd"));
|
||||||
|
|
Loading…
Reference in New Issue