forked from github/server
fix test_process_turn failure.
move turn global to calendar. promote calendar module to kernel.
This commit is contained in:
parent
b5ea102372
commit
d15684a546
39 changed files with 290 additions and 265 deletions
|
@ -24,21 +24,31 @@ local function assert_file(filename, exists)
|
||||||
end
|
end
|
||||||
|
|
||||||
function test_process_turn()
|
function test_process_turn()
|
||||||
|
turn_begin()
|
||||||
turn = get_turn()
|
turn = get_turn()
|
||||||
|
turn_process()
|
||||||
|
turn_end()
|
||||||
|
assert_equal(turn, get_turn())
|
||||||
turn_begin()
|
turn_begin()
|
||||||
assert_equal(turn+1, get_turn())
|
assert_equal(turn+1, get_turn())
|
||||||
|
turn_process()
|
||||||
|
turn_end()
|
||||||
|
end
|
||||||
|
|
||||||
|
function test_write_reports()
|
||||||
|
turn_begin()
|
||||||
|
turn = get_turn()
|
||||||
u:add_order("NUMMER PARTEI 777")
|
u:add_order("NUMMER PARTEI 777")
|
||||||
turn_process()
|
turn_process()
|
||||||
assert_equal(0, init_reports())
|
assert_equal(0, init_reports())
|
||||||
assert_equal(0, write_reports())
|
assert_equal(0, write_reports())
|
||||||
assert_equal(0, eressea.write_game("test.dat"))
|
assert_file("reports/" .. turn .. "-777.nr")
|
||||||
assert_file("data/test.dat")
|
assert_file("reports/" .. turn .. "-777.cr")
|
||||||
assert_file("reports/" .. get_turn() .. "-777.nr")
|
assert_file("reports/" .. turn .. "-777.txt")
|
||||||
assert_file("reports/" .. get_turn() .. "-777.cr")
|
|
||||||
assert_file("reports/" .. get_turn() .. "-777.txt")
|
|
||||||
assert_file("reports/reports.txt")
|
assert_file("reports/reports.txt")
|
||||||
os.remove("reports")
|
os.remove("reports")
|
||||||
os.remove("data")
|
assert_equal(0, eressea.write_game("test.dat"))
|
||||||
|
assert_file("data/test.dat")
|
||||||
|
os.remove("data/test.dat")
|
||||||
turn_end()
|
turn_end()
|
||||||
assert_equal(turn+1, get_turn())
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -86,7 +86,6 @@ ENDIF()
|
||||||
|
|
||||||
set (ERESSEA_SRC
|
set (ERESSEA_SRC
|
||||||
vortex.c
|
vortex.c
|
||||||
calendar.c
|
|
||||||
move.c
|
move.c
|
||||||
piracy.c
|
piracy.c
|
||||||
spells.c
|
spells.c
|
||||||
|
@ -198,7 +197,6 @@ set(TESTS_SRC
|
||||||
academy.test.c
|
academy.test.c
|
||||||
alchemy.test.c
|
alchemy.test.c
|
||||||
battle.test.c
|
battle.test.c
|
||||||
calendar.test.c
|
|
||||||
creport.test.c
|
creport.test.c
|
||||||
direction.test.c
|
direction.test.c
|
||||||
donations.test.c
|
donations.test.c
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
#include "chaos.h"
|
#include "chaos.h"
|
||||||
|
|
||||||
|
#include <kernel/calendar.h>
|
||||||
#include <kernel/config.h>
|
#include <kernel/config.h>
|
||||||
#include <kernel/curse.h>
|
#include <kernel/curse.h>
|
||||||
#include <kernel/region.h>
|
#include <kernel/region.h>
|
||||||
|
|
|
@ -3,6 +3,28 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "bindings.h"
|
#include "bindings.h"
|
||||||
|
|
||||||
|
#include "kernel/calendar.h"
|
||||||
|
#include "kernel/config.h"
|
||||||
|
#include "kernel/alliance.h"
|
||||||
|
#include "kernel/building.h"
|
||||||
|
#include "kernel/curse.h"
|
||||||
|
#include "kernel/equipment.h"
|
||||||
|
#include "kernel/unit.h"
|
||||||
|
#include "kernel/terrain.h"
|
||||||
|
#include "kernel/messages.h"
|
||||||
|
#include "kernel/region.h"
|
||||||
|
#include "kernel/building.h"
|
||||||
|
#include "kernel/plane.h"
|
||||||
|
#include "kernel/race.h"
|
||||||
|
#include "kernel/item.h"
|
||||||
|
#include "kernel/order.h"
|
||||||
|
#include "kernel/ship.h"
|
||||||
|
#include "kernel/faction.h"
|
||||||
|
#include "kernel/save.h"
|
||||||
|
#include "kernel/spell.h"
|
||||||
|
#include "kernel/spellbook.h"
|
||||||
|
|
||||||
#include "bind_unit.h"
|
#include "bind_unit.h"
|
||||||
#include "bind_storage.h"
|
#include "bind_storage.h"
|
||||||
#include "bind_building.h"
|
#include "bind_building.h"
|
||||||
|
@ -13,33 +35,11 @@
|
||||||
#include "bind_ship.h"
|
#include "bind_ship.h"
|
||||||
#include "bind_gmtool.h"
|
#include "bind_gmtool.h"
|
||||||
#include "bind_region.h"
|
#include "bind_region.h"
|
||||||
|
|
||||||
#include "helpers.h"
|
#include "helpers.h"
|
||||||
#include "console.h"
|
#include "console.h"
|
||||||
#include "reports.h"
|
#include "reports.h"
|
||||||
#include "study.h"
|
#include "study.h"
|
||||||
#include "calendar.h"
|
|
||||||
|
|
||||||
#include <kernel/config.h>
|
|
||||||
|
|
||||||
#include <kernel/alliance.h>
|
|
||||||
#include <kernel/building.h>
|
|
||||||
#include <kernel/curse.h>
|
|
||||||
#include <kernel/equipment.h>
|
|
||||||
#include <kernel/unit.h>
|
|
||||||
#include <kernel/terrain.h>
|
|
||||||
#include <kernel/messages.h>
|
|
||||||
#include <kernel/region.h>
|
|
||||||
#include <kernel/building.h>
|
|
||||||
#include <kernel/plane.h>
|
|
||||||
#include <kernel/race.h>
|
|
||||||
#include <kernel/item.h>
|
|
||||||
#include <kernel/order.h>
|
|
||||||
#include <kernel/ship.h>
|
|
||||||
#include <kernel/faction.h>
|
|
||||||
#include <kernel/save.h>
|
|
||||||
#include <kernel/spell.h>
|
|
||||||
#include <kernel/spellbook.h>
|
|
||||||
|
|
||||||
#include "economy.h"
|
#include "economy.h"
|
||||||
#include "summary.h"
|
#include "summary.h"
|
||||||
#include "teleport.h"
|
#include "teleport.h"
|
||||||
|
|
|
@ -42,25 +42,26 @@ without prior permission by the authors of Eressea.
|
||||||
#include "teleport.h"
|
#include "teleport.h"
|
||||||
|
|
||||||
/* kernel includes */
|
/* kernel includes */
|
||||||
#include <kernel/alliance.h>
|
#include "kernel/alliance.h"
|
||||||
#include <kernel/ally.h>
|
#include "kernel/ally.h"
|
||||||
#include <kernel/connection.h>
|
#include "kernel/calendar.h"
|
||||||
#include <kernel/building.h>
|
#include "kernel/connection.h"
|
||||||
#include <kernel/curse.h>
|
#include "kernel/building.h"
|
||||||
#include <kernel/faction.h>
|
#include "kernel/curse.h"
|
||||||
#include <kernel/group.h>
|
#include "kernel/faction.h"
|
||||||
#include <kernel/item.h>
|
#include "kernel/group.h"
|
||||||
#include <kernel/messages.h>
|
#include "kernel/item.h"
|
||||||
#include <kernel/order.h>
|
#include "kernel/messages.h"
|
||||||
#include <kernel/plane.h>
|
#include "kernel/order.h"
|
||||||
#include <kernel/race.h>
|
#include "kernel/plane.h"
|
||||||
#include <kernel/region.h>
|
#include "kernel/race.h"
|
||||||
#include <kernel/resources.h>
|
#include "kernel/region.h"
|
||||||
#include <kernel/ship.h>
|
#include "kernel/resources.h"
|
||||||
#include <kernel/spell.h>
|
#include "kernel/ship.h"
|
||||||
#include <kernel/spellbook.h>
|
#include "kernel/spell.h"
|
||||||
#include <kernel/terrain.h>
|
#include "kernel/spellbook.h"
|
||||||
#include <kernel/unit.h>
|
#include "kernel/terrain.h"
|
||||||
|
#include "kernel/unit.h"
|
||||||
|
|
||||||
/* util includes */
|
/* util includes */
|
||||||
#include <util/attrib.h>
|
#include <util/attrib.h>
|
||||||
|
|
|
@ -36,7 +36,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include "monsters.h"
|
#include "monsters.h"
|
||||||
#include "morale.h"
|
#include "morale.h"
|
||||||
#include "reports.h"
|
#include "reports.h"
|
||||||
#include "calendar.h"
|
|
||||||
|
|
||||||
#include <attributes/reduceproduction.h>
|
#include <attributes/reduceproduction.h>
|
||||||
#include <attributes/racename.h>
|
#include <attributes/racename.h>
|
||||||
|
@ -45,23 +44,24 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include <spells/unitcurse.h>
|
#include <spells/unitcurse.h>
|
||||||
|
|
||||||
/* kernel includes */
|
/* kernel includes */
|
||||||
#include <kernel/ally.h>
|
#include "kernel/ally.h"
|
||||||
#include <kernel/building.h>
|
#include "kernel/building.h"
|
||||||
#include <kernel/curse.h>
|
#include "kernel/calendar.h"
|
||||||
#include <kernel/equipment.h>
|
#include "kernel/curse.h"
|
||||||
#include <kernel/faction.h>
|
#include "kernel/equipment.h"
|
||||||
#include <kernel/item.h>
|
#include "kernel/faction.h"
|
||||||
#include <kernel/messages.h>
|
#include "kernel/item.h"
|
||||||
#include <kernel/order.h>
|
#include "kernel/messages.h"
|
||||||
#include <kernel/plane.h>
|
#include "kernel/order.h"
|
||||||
#include <kernel/pool.h>
|
#include "kernel/plane.h"
|
||||||
#include <kernel/race.h>
|
#include "kernel/pool.h"
|
||||||
#include <kernel/region.h>
|
#include "kernel/race.h"
|
||||||
#include <kernel/resources.h>
|
#include "kernel/region.h"
|
||||||
#include <kernel/ship.h>
|
#include "kernel/resources.h"
|
||||||
#include <kernel/terrain.h>
|
#include "kernel/ship.h"
|
||||||
#include <kernel/terrainid.h>
|
#include "kernel/terrain.h"
|
||||||
#include <kernel/unit.h>
|
#include "kernel/terrainid.h"
|
||||||
|
#include "kernel/unit.h"
|
||||||
|
|
||||||
/* util includes */
|
/* util includes */
|
||||||
#include <util/attrib.h>
|
#include <util/attrib.h>
|
||||||
|
|
|
@ -1,29 +1,28 @@
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
#include "settings.h"
|
|
||||||
#include "eressea.h"
|
#include "eressea.h"
|
||||||
|
|
||||||
#include <kernel/config.h>
|
#include "kernel/calendar.h"
|
||||||
#include <util/log.h>
|
#include "kernel/config.h"
|
||||||
|
#include "kernel/curse.h"
|
||||||
|
#include "kernel/building.h"
|
||||||
|
#include "kernel/equipment.h"
|
||||||
|
#include "kernel/item.h"
|
||||||
|
#include "kernel/database.h"
|
||||||
|
|
||||||
#include <modules/museum.h>
|
#include "util/functions.h"
|
||||||
#include <triggers/triggers.h>
|
#include "util/language.h"
|
||||||
#include <util/language.h>
|
#include "util/log.h"
|
||||||
#include <util/functions.h>
|
#include "util/message.h"
|
||||||
#include <kernel/building.h>
|
|
||||||
#include <kernel/curse.h>
|
|
||||||
#include <kernel/equipment.h>
|
|
||||||
#include <kernel/item.h>
|
|
||||||
#include <kernel/database.h>
|
|
||||||
#include <modules/gmcmd.h>
|
|
||||||
#include <modules/xmas.h>
|
|
||||||
#include <items/xerewards.h>
|
|
||||||
#include <items/weapons.h>
|
|
||||||
|
|
||||||
#include <attributes/attributes.h>
|
#include "modules/gmcmd.h"
|
||||||
#include <util/message.h>
|
#include "modules/xmas.h"
|
||||||
#include <races/races.h>
|
#include "modules/museum.h"
|
||||||
|
#include "triggers/triggers.h"
|
||||||
|
#include "items/xerewards.h"
|
||||||
|
#include "items/weapons.h"
|
||||||
|
#include "attributes/attributes.h"
|
||||||
|
#include "races/races.h"
|
||||||
|
|
||||||
#include "calendar.h"
|
|
||||||
#include "chaos.h"
|
#include "chaos.h"
|
||||||
#include "items.h"
|
#include "items.h"
|
||||||
#include "creport.h"
|
#include "creport.h"
|
||||||
|
|
26
src/gmtool.c
26
src/gmtool.c
|
@ -23,18 +23,19 @@
|
||||||
#include <modules/museum.h>
|
#include <modules/museum.h>
|
||||||
#include <modules/autoseed.h>
|
#include <modules/autoseed.h>
|
||||||
|
|
||||||
#include <kernel/building.h>
|
#include "kernel/building.h"
|
||||||
#include <kernel/faction.h>
|
#include "kernel/calendar.h"
|
||||||
#include <kernel/item.h>
|
#include "kernel/faction.h"
|
||||||
#include <kernel/plane.h>
|
#include "kernel/item.h"
|
||||||
#include <kernel/race.h>
|
#include "kernel/plane.h"
|
||||||
#include <kernel/region.h>
|
#include "kernel/race.h"
|
||||||
#include <kernel/terrainid.h>
|
#include "kernel/region.h"
|
||||||
#include <kernel/unit.h>
|
#include "kernel/terrainid.h"
|
||||||
#include <kernel/resources.h>
|
#include "kernel/unit.h"
|
||||||
#include <kernel/save.h>
|
#include "kernel/resources.h"
|
||||||
#include <kernel/ship.h>
|
#include "kernel/save.h"
|
||||||
#include <kernel/terrain.h>
|
#include "kernel/ship.h"
|
||||||
|
#include "kernel/terrain.h"
|
||||||
|
|
||||||
#include <attributes/attributes.h>
|
#include <attributes/attributes.h>
|
||||||
#include <triggers/triggers.h>
|
#include <triggers/triggers.h>
|
||||||
|
@ -53,7 +54,6 @@
|
||||||
#include "console.h"
|
#include "console.h"
|
||||||
#include "listbox.h"
|
#include "listbox.h"
|
||||||
#include "wormhole.h"
|
#include "wormhole.h"
|
||||||
#include "calendar.h"
|
|
||||||
#include "teleport.h"
|
#include "teleport.h"
|
||||||
#include "xmlreader.h"
|
#include "xmlreader.h"
|
||||||
|
|
||||||
|
|
|
@ -11,36 +11,36 @@ without prior permission by the authors of Eressea.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
#include <kernel/config.h>
|
|
||||||
#include "jsonconf.h"
|
#include "jsonconf.h"
|
||||||
|
|
||||||
/* kernel includes */
|
/* kernel includes */
|
||||||
#include <kernel/building.h>
|
#include "kernel/building.h"
|
||||||
#include <kernel/equipment.h>
|
#include "kernel/calendar.h"
|
||||||
#include <kernel/item.h>
|
#include "kernel/config.h"
|
||||||
#include <kernel/messages.h>
|
#include "kernel/equipment.h"
|
||||||
#include <kernel/race.h>
|
#include "kernel/item.h"
|
||||||
#include <kernel/region.h>
|
#include "kernel/messages.h"
|
||||||
#include <kernel/resources.h>
|
#include "kernel/race.h"
|
||||||
#include <kernel/ship.h>
|
#include "kernel/region.h"
|
||||||
#include <kernel/terrain.h>
|
#include "kernel/resources.h"
|
||||||
#include <kernel/spell.h>
|
#include "kernel/ship.h"
|
||||||
#include <kernel/spellbook.h>
|
#include "kernel/terrain.h"
|
||||||
|
#include "kernel/spell.h"
|
||||||
|
#include "kernel/spellbook.h"
|
||||||
|
|
||||||
/* util includes */
|
/* util includes */
|
||||||
#include <util/attrib.h>
|
#include "util/attrib.h"
|
||||||
#include <util/crmessage.h>
|
#include "util/crmessage.h"
|
||||||
#include <util/functions.h>
|
#include "util/functions.h"
|
||||||
#include <util/language.h>
|
#include "util/language.h"
|
||||||
#include <util/log.h>
|
#include "util/log.h"
|
||||||
#include <util/message.h>
|
#include "util/message.h"
|
||||||
#include <util/nrmessage.h>
|
#include "util/nrmessage.h"
|
||||||
#include <util/path.h>
|
#include "util/path.h"
|
||||||
#include <util/strings.h>
|
#include "util/strings.h"
|
||||||
#include <util/xml.h>
|
#include "util/xml.h"
|
||||||
|
|
||||||
/* game modules */
|
/* game modules */
|
||||||
#include "calendar.h"
|
|
||||||
#include "direction.h"
|
#include "direction.h"
|
||||||
#include "keyword.h"
|
#include "keyword.h"
|
||||||
#include "move.h"
|
#include "move.h"
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
#include "util/language.h"
|
#include "util/language.h"
|
||||||
|
|
||||||
#include "calendar.h"
|
#include "kernel/calendar.h"
|
||||||
#include "direction.h"
|
#include "direction.h"
|
||||||
#include "keyword.h"
|
#include "keyword.h"
|
||||||
#include "move.h"
|
#include "move.h"
|
||||||
|
|
|
@ -7,6 +7,7 @@ ally.test.c
|
||||||
build.test.c
|
build.test.c
|
||||||
building.test.c
|
building.test.c
|
||||||
# callbacks.test.c
|
# callbacks.test.c
|
||||||
|
calendar.test.c
|
||||||
command.test.c
|
command.test.c
|
||||||
config.test.c
|
config.test.c
|
||||||
# connection.test.c
|
# connection.test.c
|
||||||
|
@ -49,6 +50,7 @@ ally.c
|
||||||
build.c
|
build.c
|
||||||
building.c
|
building.c
|
||||||
callbacks.c
|
callbacks.c
|
||||||
|
calendar.c
|
||||||
command.c
|
command.c
|
||||||
config.c
|
config.c
|
||||||
connection.c
|
connection.c
|
||||||
|
|
|
@ -11,19 +11,20 @@ without prior permission by the authors of Eressea.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
#include <kernel/config.h>
|
|
||||||
#include "alliance.h"
|
#include "alliance.h"
|
||||||
|
|
||||||
#include <attributes/key.h>
|
|
||||||
|
|
||||||
/* kernel includes */
|
/* kernel includes */
|
||||||
#include <kernel/building.h>
|
#include "calendar.h"
|
||||||
#include <kernel/faction.h>
|
#include "config.h"
|
||||||
#include <kernel/messages.h>
|
#include "building.h"
|
||||||
#include <kernel/order.h>
|
#include "faction.h"
|
||||||
#include <kernel/region.h>
|
#include "messages.h"
|
||||||
#include <kernel/unit.h>
|
#include "order.h"
|
||||||
#include <kernel/command.h>
|
#include "region.h"
|
||||||
|
#include "unit.h"
|
||||||
|
#include "command.h"
|
||||||
|
|
||||||
|
#include <attributes/key.h>
|
||||||
|
|
||||||
/* util includes */
|
/* util includes */
|
||||||
#include <util/attrib.h>
|
#include <util/attrib.h>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
|
|
||||||
|
#include <kernel/calendar.h>
|
||||||
#include <kernel/config.h>
|
#include <kernel/config.h>
|
||||||
#include <kernel/race.h>
|
#include <kernel/race.h>
|
||||||
#include <kernel/region.h>
|
#include <kernel/region.h>
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int turn = 0;
|
||||||
int first_month = 0;
|
int first_month = 0;
|
||||||
int weeks_per_month = 3;
|
int weeks_per_month = 3;
|
||||||
int months_per_year = 12;
|
int months_per_year = 12;
|
|
@ -17,6 +17,7 @@ extern "C" {
|
||||||
extern int months_per_year;
|
extern int months_per_year;
|
||||||
extern int *month_season;
|
extern int *month_season;
|
||||||
extern int first_month;
|
extern int first_month;
|
||||||
|
extern int turn;
|
||||||
|
|
||||||
extern char **weeknames;
|
extern char **weeknames;
|
||||||
extern char **weeknames2;
|
extern char **weeknames2;
|
|
@ -29,7 +29,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include "curse.h"
|
#include "curse.h"
|
||||||
#include "connection.h"
|
#include "connection.h"
|
||||||
#include "building.h"
|
#include "building.h"
|
||||||
#include "calendar.h"
|
|
||||||
#include "direction.h"
|
#include "direction.h"
|
||||||
#include "equipment.h"
|
#include "equipment.h"
|
||||||
#include "faction.h"
|
#include "faction.h"
|
||||||
|
@ -98,8 +97,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#endif
|
#endif
|
||||||
struct settings global;
|
struct settings global;
|
||||||
|
|
||||||
int turn = 0;
|
|
||||||
|
|
||||||
const char *parameters[MAXPARAMS] = {
|
const char *parameters[MAXPARAMS] = {
|
||||||
"LOCALE",
|
"LOCALE",
|
||||||
"ALLES",
|
"ALLES",
|
||||||
|
|
|
@ -141,8 +141,6 @@ extern "C" {
|
||||||
extern const char *parameters[];
|
extern const char *parameters[];
|
||||||
extern settings global;
|
extern settings global;
|
||||||
|
|
||||||
extern int turn;
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -17,8 +17,11 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
#include <kernel/config.h>
|
|
||||||
#include "faction.h"
|
#include "faction.h"
|
||||||
|
|
||||||
|
#include "calendar.h"
|
||||||
|
#include "config.h"
|
||||||
#include "alliance.h"
|
#include "alliance.h"
|
||||||
#include "ally.h"
|
#include "ally.h"
|
||||||
#include "curse.h"
|
#include "curse.h"
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include <kernel/ally.h>
|
#include <kernel/ally.h>
|
||||||
#include <kernel/alliance.h>
|
#include <kernel/alliance.h>
|
||||||
|
#include <kernel/calendar.h>
|
||||||
#include <kernel/faction.h>
|
#include <kernel/faction.h>
|
||||||
#include <kernel/item.h>
|
#include <kernel/item.h>
|
||||||
#include <kernel/plane.h>
|
#include <kernel/plane.h>
|
||||||
|
|
|
@ -17,12 +17,13 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
#include <kernel/config.h>
|
|
||||||
#include "region.h"
|
#include "region.h"
|
||||||
|
|
||||||
/* kernel includes */
|
/* kernel includes */
|
||||||
#include "alliance.h"
|
#include "alliance.h"
|
||||||
#include "building.h"
|
#include "building.h"
|
||||||
|
#include "calendar.h"
|
||||||
|
#include "config.h"
|
||||||
#include "connection.h"
|
#include "connection.h"
|
||||||
#include "curse.h"
|
#include "curse.h"
|
||||||
#include "equipment.h"
|
#include "equipment.h"
|
||||||
|
|
|
@ -25,6 +25,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include "alliance.h"
|
#include "alliance.h"
|
||||||
#include "ally.h"
|
#include "ally.h"
|
||||||
#include "building.h"
|
#include "building.h"
|
||||||
|
#include "calendar.h"
|
||||||
#include "connection.h"
|
#include "connection.h"
|
||||||
#include "equipment.h"
|
#include "equipment.h"
|
||||||
#include "faction.h"
|
#include "faction.h"
|
||||||
|
|
|
@ -22,6 +22,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
#include "ally.h"
|
#include "ally.h"
|
||||||
#include "building.h"
|
#include "building.h"
|
||||||
|
#include "calendar.h"
|
||||||
#include "faction.h"
|
#include "faction.h"
|
||||||
#include "group.h"
|
#include "group.h"
|
||||||
#include "connection.h"
|
#include "connection.h"
|
||||||
|
|
66
src/laws.c
66
src/laws.c
|
@ -41,43 +41,33 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include "prefix.h"
|
#include "prefix.h"
|
||||||
#include "reports.h"
|
#include "reports.h"
|
||||||
#include "teleport.h"
|
#include "teleport.h"
|
||||||
#include "calendar.h"
|
|
||||||
#include "guard.h"
|
#include "guard.h"
|
||||||
#include "volcano.h"
|
#include "volcano.h"
|
||||||
|
|
||||||
/* attributes includes */
|
|
||||||
#include <attributes/racename.h>
|
|
||||||
#include <attributes/raceprefix.h>
|
|
||||||
#include <attributes/seenspell.h>
|
|
||||||
#include <attributes/stealth.h>
|
|
||||||
|
|
||||||
#include <spells/buildingcurse.h>
|
|
||||||
#include <spells/regioncurse.h>
|
|
||||||
#include <spells/unitcurse.h>
|
|
||||||
|
|
||||||
/* kernel includes */
|
/* kernel includes */
|
||||||
#include <kernel/alliance.h>
|
#include "kernel/alliance.h"
|
||||||
#include <kernel/ally.h>
|
#include "kernel/ally.h"
|
||||||
#include <kernel/callbacks.h>
|
#include "kernel/calendar.h"
|
||||||
#include <kernel/connection.h>
|
#include "kernel/callbacks.h"
|
||||||
#include <kernel/curse.h>
|
#include "kernel/connection.h"
|
||||||
#include <kernel/building.h>
|
#include "kernel/curse.h"
|
||||||
#include <kernel/faction.h>
|
#include "kernel/building.h"
|
||||||
#include <kernel/group.h>
|
#include "kernel/faction.h"
|
||||||
#include <kernel/item.h>
|
#include "kernel/group.h"
|
||||||
#include <kernel/messages.h>
|
#include "kernel/item.h"
|
||||||
#include <kernel/order.h>
|
#include "kernel/messages.h"
|
||||||
#include <kernel/plane.h>
|
#include "kernel/order.h"
|
||||||
#include <kernel/pool.h>
|
#include "kernel/plane.h"
|
||||||
#include <kernel/race.h>
|
#include "kernel/pool.h"
|
||||||
#include <kernel/region.h>
|
#include "kernel/race.h"
|
||||||
#include <kernel/resources.h>
|
#include "kernel/region.h"
|
||||||
#include <kernel/ship.h>
|
#include "kernel/resources.h"
|
||||||
#include <kernel/spell.h>
|
#include "kernel/ship.h"
|
||||||
#include <kernel/spellbook.h>
|
#include "kernel/spell.h"
|
||||||
#include <kernel/terrain.h>
|
#include "kernel/spellbook.h"
|
||||||
#include <kernel/terrainid.h>
|
#include "kernel/terrain.h"
|
||||||
#include <kernel/unit.h>
|
#include "kernel/terrainid.h"
|
||||||
|
#include "kernel/unit.h"
|
||||||
|
|
||||||
/* util includes */
|
/* util includes */
|
||||||
#include <util/attrib.h>
|
#include <util/attrib.h>
|
||||||
|
@ -98,10 +88,20 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include <util/umlaut.h>
|
#include <util/umlaut.h>
|
||||||
#include <util/unicode.h>
|
#include <util/unicode.h>
|
||||||
|
|
||||||
|
/* attributes includes */
|
||||||
#include <attributes/otherfaction.h>
|
#include <attributes/otherfaction.h>
|
||||||
|
#include <attributes/racename.h>
|
||||||
|
#include <attributes/raceprefix.h>
|
||||||
|
#include <attributes/seenspell.h>
|
||||||
|
#include <attributes/stealth.h>
|
||||||
|
|
||||||
|
#include <spells/buildingcurse.h>
|
||||||
|
#include <spells/regioncurse.h>
|
||||||
|
#include <spells/unitcurse.h>
|
||||||
|
|
||||||
#include <selist.h>
|
#include <selist.h>
|
||||||
#include <iniparser.h>
|
#include <iniparser.h>
|
||||||
|
|
||||||
/* libc includes */
|
/* libc includes */
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include <kernel/ally.h>
|
#include <kernel/ally.h>
|
||||||
#include <kernel/alliance.h>
|
#include <kernel/alliance.h>
|
||||||
|
#include <kernel/calendar.h>
|
||||||
#include <kernel/config.h>
|
#include <kernel/config.h>
|
||||||
#include <kernel/building.h>
|
#include <kernel/building.h>
|
||||||
#include <kernel/faction.h>
|
#include <kernel/faction.h>
|
||||||
|
|
|
@ -20,6 +20,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <kernel/calendar.h>
|
||||||
#include <kernel/config.h>
|
#include <kernel/config.h>
|
||||||
#include <kernel/database.h>
|
#include <kernel/database.h>
|
||||||
#include <kernel/messages.h>
|
#include <kernel/messages.h>
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
#include <kernel/config.h>
|
|
||||||
|
|
||||||
#include "monsters.h"
|
#include "monsters.h"
|
||||||
|
|
||||||
|
@ -29,32 +28,27 @@
|
||||||
#include "laws.h"
|
#include "laws.h"
|
||||||
#include "keyword.h"
|
#include "keyword.h"
|
||||||
#include "study.h"
|
#include "study.h"
|
||||||
|
#include "move.h"
|
||||||
/* attributes includes */
|
|
||||||
#include <attributes/targetregion.h>
|
|
||||||
#include <attributes/hate.h>
|
|
||||||
|
|
||||||
#include <spells/regioncurse.h>
|
|
||||||
|
|
||||||
/* kernel includes */
|
/* kernel includes */
|
||||||
#include <kernel/build.h>
|
#include "kernel/build.h"
|
||||||
#include <kernel/building.h>
|
#include "kernel/building.h"
|
||||||
#include <kernel/curse.h>
|
#include "kernel/calendar.h"
|
||||||
#include <kernel/equipment.h>
|
#include "kernel/config.h"
|
||||||
#include <kernel/faction.h>
|
#include "kernel/curse.h"
|
||||||
#include <kernel/item.h>
|
#include "kernel/equipment.h"
|
||||||
#include <kernel/messages.h>
|
#include "kernel/faction.h"
|
||||||
#include <kernel/order.h>
|
#include "kernel/item.h"
|
||||||
#include <kernel/pathfinder.h>
|
#include "kernel/messages.h"
|
||||||
#include <kernel/pool.h>
|
#include "kernel/order.h"
|
||||||
#include <kernel/race.h>
|
#include "kernel/pathfinder.h"
|
||||||
#include <kernel/region.h>
|
#include "kernel/pool.h"
|
||||||
#include <kernel/ship.h>
|
#include "kernel/race.h"
|
||||||
#include <kernel/terrain.h>
|
#include "kernel/region.h"
|
||||||
#include <kernel/terrainid.h>
|
#include "kernel/ship.h"
|
||||||
#include <kernel/unit.h>
|
#include "kernel/terrain.h"
|
||||||
|
#include "kernel/terrainid.h"
|
||||||
#include <move.h>
|
#include "kernel/unit.h"
|
||||||
|
|
||||||
/* util includes */
|
/* util includes */
|
||||||
#include <util/attrib.h>
|
#include <util/attrib.h>
|
||||||
|
@ -68,6 +62,12 @@
|
||||||
#include <util/rng.h>
|
#include <util/rng.h>
|
||||||
#include <util/strings.h>
|
#include <util/strings.h>
|
||||||
|
|
||||||
|
/* attributes includes */
|
||||||
|
#include <attributes/targetregion.h>
|
||||||
|
#include <attributes/hate.h>
|
||||||
|
|
||||||
|
#include <spells/regioncurse.h>
|
||||||
|
|
||||||
#include <selist.h>
|
#include <selist.h>
|
||||||
|
|
||||||
/* libc includes */
|
/* libc includes */
|
||||||
|
|
17
src/morale.c
17
src/morale.c
|
@ -20,17 +20,18 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
#include "morale.h"
|
#include "morale.h"
|
||||||
|
|
||||||
#include <spells/regioncurse.h>
|
#include "kernel/calendar.h"
|
||||||
|
#include "kernel/config.h"
|
||||||
#include <kernel/config.h>
|
#include "kernel/curse.h"
|
||||||
#include <kernel/curse.h>
|
#include "kernel/region.h"
|
||||||
#include <kernel/region.h>
|
#include "kernel/faction.h"
|
||||||
#include <kernel/faction.h>
|
#include "kernel/race.h"
|
||||||
#include <kernel/race.h>
|
#include "kernel/building.h"
|
||||||
#include <kernel/building.h>
|
|
||||||
|
|
||||||
#include <util/rand.h>
|
#include <util/rand.h>
|
||||||
|
|
||||||
|
#include <spells/regioncurse.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
static double popularity(void)
|
static double popularity(void)
|
||||||
|
|
43
src/move.c
43
src/move.c
|
@ -20,7 +20,28 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
#endif
|
#endif
|
||||||
#include <kernel/config.h>
|
|
||||||
|
/* kernel includes */
|
||||||
|
#include "kernel/ally.h"
|
||||||
|
#include "kernel/build.h"
|
||||||
|
#include "kernel/building.h"
|
||||||
|
#include "kernel/calendar.h"
|
||||||
|
#include "kernel/config.h"
|
||||||
|
#include "kernel/connection.h"
|
||||||
|
#include "kernel/curse.h"
|
||||||
|
#include "kernel/faction.h"
|
||||||
|
#include "kernel/item.h"
|
||||||
|
#include "kernel/messages.h"
|
||||||
|
#include "kernel/order.h"
|
||||||
|
#include "kernel/plane.h"
|
||||||
|
#include "kernel/race.h"
|
||||||
|
#include "kernel/region.h"
|
||||||
|
#include "kernel/render.h"
|
||||||
|
#include "kernel/ship.h"
|
||||||
|
#include "kernel/terrain.h"
|
||||||
|
#include "kernel/terrainid.h"
|
||||||
|
#include "kernel/unit.h"
|
||||||
|
|
||||||
#include "move.h"
|
#include "move.h"
|
||||||
#include "guard.h"
|
#include "guard.h"
|
||||||
#include "laws.h"
|
#include "laws.h"
|
||||||
|
@ -44,28 +65,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include <attributes/stealth.h>
|
#include <attributes/stealth.h>
|
||||||
#include <attributes/targetregion.h>
|
#include <attributes/targetregion.h>
|
||||||
|
|
||||||
/* kernel includes */
|
|
||||||
#include <kernel/ally.h>
|
|
||||||
#include <kernel/build.h>
|
|
||||||
#include <kernel/building.h>
|
|
||||||
#include <kernel/connection.h>
|
|
||||||
#include <kernel/curse.h>
|
|
||||||
#include <kernel/faction.h>
|
|
||||||
#include <kernel/item.h>
|
|
||||||
#include <kernel/messages.h>
|
|
||||||
#include <kernel/order.h>
|
|
||||||
#include <kernel/plane.h>
|
|
||||||
#include <kernel/race.h>
|
|
||||||
#include <kernel/region.h>
|
|
||||||
#include <kernel/render.h>
|
|
||||||
#include <kernel/ship.h>
|
|
||||||
#include <kernel/terrain.h>
|
|
||||||
#include <kernel/terrainid.h>
|
|
||||||
#include <kernel/unit.h>
|
|
||||||
|
|
||||||
#include "teleport.h"
|
#include "teleport.h"
|
||||||
#include "direction.h"
|
#include "direction.h"
|
||||||
#include "calendar.h"
|
|
||||||
#include "skill.h"
|
#include "skill.h"
|
||||||
|
|
||||||
/* util includes */
|
/* util includes */
|
||||||
|
|
|
@ -2,10 +2,11 @@
|
||||||
#include <kernel/config.h>
|
#include <kernel/config.h>
|
||||||
#include "orderfile.h"
|
#include "orderfile.h"
|
||||||
|
|
||||||
#include <kernel/faction.h>
|
#include "kernel/calendar.h"
|
||||||
#include <kernel/unit.h>
|
#include "kernel/faction.h"
|
||||||
#include <kernel/order.h>
|
#include "kernel/messages.h"
|
||||||
#include <kernel/messages.h>
|
#include "kernel/order.h"
|
||||||
|
#include "kernel/unit.h"
|
||||||
|
|
||||||
#include <util/base36.h>
|
#include <util/base36.h>
|
||||||
#include <util/message.h>
|
#include <util/message.h>
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include "orderfile.h"
|
#include "orderfile.h"
|
||||||
|
|
||||||
|
#include <kernel/calendar.h>
|
||||||
#include <kernel/faction.h>
|
#include <kernel/faction.h>
|
||||||
#include <util/message.h>
|
#include <util/message.h>
|
||||||
|
|
||||||
|
|
50
src/report.c
50
src/report.c
|
@ -43,7 +43,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
/* gamecode includes */
|
/* gamecode includes */
|
||||||
#include "alchemy.h"
|
#include "alchemy.h"
|
||||||
#include "calendar.h"
|
|
||||||
#include "economy.h"
|
#include "economy.h"
|
||||||
#include "move.h"
|
#include "move.h"
|
||||||
#include "upkeep.h"
|
#include "upkeep.h"
|
||||||
|
@ -51,30 +50,31 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include "teleport.h"
|
#include "teleport.h"
|
||||||
|
|
||||||
/* kernel includes */
|
/* kernel includes */
|
||||||
#include <kernel/ally.h>
|
#include "kernel/ally.h"
|
||||||
#include <kernel/connection.h>
|
#include "kernel/calendar.h"
|
||||||
#include <kernel/build.h>
|
#include "kernel/connection.h"
|
||||||
#include <kernel/building.h>
|
#include "kernel/build.h"
|
||||||
#include <kernel/curse.h>
|
#include "kernel/building.h"
|
||||||
#include <kernel/faction.h>
|
#include "kernel/curse.h"
|
||||||
#include <kernel/group.h>
|
#include "kernel/faction.h"
|
||||||
#include <kernel/item.h>
|
#include "kernel/group.h"
|
||||||
#include <kernel/messages.h>
|
#include "kernel/item.h"
|
||||||
#include <kernel/objtypes.h>
|
#include "kernel/messages.h"
|
||||||
#include <kernel/order.h>
|
#include "kernel/objtypes.h"
|
||||||
#include <kernel/plane.h>
|
#include "kernel/order.h"
|
||||||
#include <kernel/pool.h>
|
#include "kernel/plane.h"
|
||||||
#include <kernel/race.h>
|
#include "kernel/pool.h"
|
||||||
#include <kernel/region.h>
|
#include "kernel/race.h"
|
||||||
#include <kernel/render.h>
|
#include "kernel/region.h"
|
||||||
#include <kernel/resources.h>
|
#include "kernel/render.h"
|
||||||
#include <kernel/ship.h>
|
#include "kernel/resources.h"
|
||||||
#include <kernel/spell.h>
|
#include "kernel/ship.h"
|
||||||
#include <kernel/spellbook.h>
|
#include "kernel/spell.h"
|
||||||
#include <kernel/terrain.h>
|
#include "kernel/spellbook.h"
|
||||||
#include <kernel/terrainid.h>
|
#include "kernel/terrain.h"
|
||||||
#include <kernel/unit.h>
|
#include "kernel/terrainid.h"
|
||||||
#include <kernel/alliance.h>
|
#include "kernel/unit.h"
|
||||||
|
#include "kernel/alliance.h"
|
||||||
|
|
||||||
/* util includes */
|
/* util includes */
|
||||||
#include <util/attrib.h>
|
#include <util/attrib.h>
|
||||||
|
|
|
@ -21,7 +21,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include "reports.h"
|
#include "reports.h"
|
||||||
|
|
||||||
#include "battle.h"
|
#include "battle.h"
|
||||||
#include "calendar.h"
|
#include "kernel/calendar.h"
|
||||||
#include "guard.h"
|
#include "guard.h"
|
||||||
#include "laws.h"
|
#include "laws.h"
|
||||||
#include "spells.h"
|
#include "spells.h"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
#include "reports.h"
|
#include "reports.h"
|
||||||
|
|
||||||
#include "calendar.h"
|
#include "kernel/calendar.h"
|
||||||
#include "keyword.h"
|
#include "keyword.h"
|
||||||
#include "lighthouse.h"
|
#include "lighthouse.h"
|
||||||
#include "laws.h"
|
#include "laws.h"
|
||||||
|
|
|
@ -21,11 +21,13 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#endif
|
#endif
|
||||||
#include <kernel/config.h>
|
#include <kernel/config.h>
|
||||||
#include "study.h"
|
#include "study.h"
|
||||||
|
|
||||||
#include "laws.h"
|
#include "laws.h"
|
||||||
#include "move.h"
|
#include "move.h"
|
||||||
#include "monsters.h"
|
#include "monsters.h"
|
||||||
#include "alchemy.h"
|
#include "alchemy.h"
|
||||||
#include "academy.h"
|
#include "academy.h"
|
||||||
|
#include "kernel/calendar.h"
|
||||||
|
|
||||||
#include <spells/regioncurse.h>
|
#include <spells/regioncurse.h>
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#include "summary.h"
|
#include "summary.h"
|
||||||
#include "laws.h"
|
#include "laws.h"
|
||||||
#include "monsters.h"
|
#include "monsters.h"
|
||||||
#include "calendar.h"
|
#include "kernel/calendar.h"
|
||||||
|
|
||||||
#include <kernel/alliance.h>
|
#include <kernel/alliance.h>
|
||||||
#include <kernel/faction.h>
|
#include <kernel/faction.h>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
|
|
||||||
#include "summary.h"
|
#include "summary.h"
|
||||||
#include "calendar.h"
|
#include "kernel/calendar.h"
|
||||||
|
|
||||||
#include <CuTest.h>
|
#include <CuTest.h>
|
||||||
#include "tests.h"
|
#include "tests.h"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include "keyword.h"
|
#include "keyword.h"
|
||||||
#include "prefix.h"
|
#include "prefix.h"
|
||||||
#include "reports.h"
|
#include "reports.h"
|
||||||
#include "calendar.h"
|
#include "kernel/calendar.h"
|
||||||
#include "vortex.h"
|
#include "vortex.h"
|
||||||
|
|
||||||
#include <kernel/config.h>
|
#include <kernel/config.h>
|
||||||
|
|
|
@ -29,7 +29,7 @@ without prior permission by the authors of Eressea.
|
||||||
#include "kernel/spellbook.h"
|
#include "kernel/spellbook.h"
|
||||||
|
|
||||||
#include "alchemy.h"
|
#include "alchemy.h"
|
||||||
#include "calendar.h"
|
#include "kernel/calendar.h"
|
||||||
#include "guard.h"
|
#include "guard.h"
|
||||||
#include "keyword.h"
|
#include "keyword.h"
|
||||||
#include "move.h"
|
#include "move.h"
|
||||||
|
|
Loading…
Reference in a new issue