diff --git a/src/eressea/lua/eressea.cpp b/src/eressea/lua/eressea.cpp index 7f3c67865..0d309602c 100644 --- a/src/eressea/lua/eressea.cpp +++ b/src/eressea/lua/eressea.cpp @@ -9,6 +9,7 @@ // kernel includes #include +#include #include #include #include @@ -224,6 +225,14 @@ is_function(struct lua_State * luaState, const char * fname) return false; } +static const char * +get_season(void) +{ + gamedate gd; + get_gamedate(turn, &gd); + return seasonnames[gd.season]; +} + void bind_eressea(lua_State * L) { @@ -233,6 +242,7 @@ bind_eressea(lua_State * L) def("dice_roll", &dice_rand), def("equipment_setitem", &lua_addequipment), def("get_turn", &get_turn), + def("get_season", &get_season), def("get_nmrs", &get_nmrs), def("remove_empty_units", &remove_empty_units),