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