diff --git a/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.cpp b/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.cpp index 5ce57fced..12eebd0fd 100644 --- a/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.cpp +++ b/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.cpp @@ -42,9 +42,12 @@ std::map< NLMISC::CSheetId, CStaticLightCycle > CTimeDateSeasonManager::_StaticL void CTimeDateSeasonManager::init( uint32 /* startDay */, float /* startTime */) { // load light cycle sheet - string lightCycleFile = IService::getInstance()->WriteFilesDirectory; - lightCycleFile = lightCycleFile + string("light_cycles.packed_sheets"); - loadForm( "light_cycle", lightCycleFile, _StaticLightCyclesHours ); + packSheets(IService::getInstance()->WriteFilesDirectory); +} + +void CTimeDateSeasonManager::packSheets(const std::string &writeDirectory) +{ + loadForm("light_cycle", writeDirectory + "light_cycles.packed_sheets", _StaticLightCyclesHours); } diff --git a/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.h b/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.h index 1a0bd32bc..62b988ad7 100644 --- a/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.h +++ b/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.h @@ -36,6 +36,7 @@ class CTimeDateSeasonManager public: // init RyzomTime, date, weather static void init( uint32 startDay = RYZOM_START_DAY, float startTime = RYZOM_START_HOUR ); + static void packSheets(const std::string &writeDirectory); // tick update => update ryzom time static void tickUpdate(); diff --git a/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp b/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp index 3d3372302..eb735e02e 100644 --- a/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp +++ b/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp @@ -37,6 +37,7 @@ #include <gpm_service/sheets.h> #include <server_share/continent_container.h> #include <entities_game_service/egs_sheets/egs_sheets.h> +#include <game_share/time_weather_season/time_date_season_manager.h> // Project includes // ... @@ -68,7 +69,7 @@ int main(int nNbArg, char **ppArgs) // verify all params if (nNbArg < 6) { - // >sheets_packer_shard.exe L:\leveldesign L:\leveldesign\DFN R:\code\ryzom\server\data_shard\mirror_sheets T:\export\common\leveldesign\visual_slot_tab T:\test_shard + // sheets_packer_shard.exe L:\leveldesign L:\leveldesign\DFN R:\code\ryzom\server\data_shard\mirror_sheets T:\export\common\leveldesign\visual_slot_tab T:\test_shard nlinfo("ERROR : Wrong number of arguments\n"); nlinfo("USAGE : sheets_packer_shard <leveldesign> <dfn> <datasets> <tab> <build_packed_sheets>\n"); nlinfo("<tab> : Directory containing visual_slots.tab"); @@ -154,6 +155,11 @@ int main(int nNbArg, char **ppArgs) { CSheets::init(); } + + // CTimeDateSeasonManager + { + CTimeDateSeasonManager::packSheets(s_WriteDirectory); + } // and that's all folks return EXIT_SUCCESS;