Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Feature #656845 ยป LuaCalendarAccess.patch

Marko Lindqvist, 2017-05-02 12:08 PM

View differences:

common/scriptcore/api_game_methods.c (working copy)
21 21
/* common */
22 22
#include "achievements.h"
23 23
#include "actions.h"
24
#include "calendar.h"
24 25
#include "citizens.h"
25 26
#include "culture.h"
26 27
#include "game.h"
......
53 54
}
54 55

  
55 56
/*****************************************************************************
57
  Return the current year.
58
*****************************************************************************/
59
int api_methods_game_year(lua_State *L)
60
{
61
  LUASCRIPT_CHECK_STATE(L, FALSE);
62

  
63
  return game.info.year;
64
}
65

  
66
/*****************************************************************************
67
  Return the current year fragment.
68
*****************************************************************************/
69
int api_methods_game_year_fragment(lua_State *L)
70
{
71
  LUASCRIPT_CHECK_STATE(L, FALSE);
72

  
73
  return game.info.fragment_count;
74
}
75

  
76
/*****************************************************************************
77
  Return the current year fragment.
78
*****************************************************************************/
79
const char *api_methods_game_year_text(lua_State *L)
80
{
81
  LUASCRIPT_CHECK_STATE(L, FALSE);
82

  
83
  return calendar_text();
84
}
85

  
86
/*****************************************************************************
56 87
  Return the current turn, as if real turns started from 0.
57 88
*****************************************************************************/
58 89
int api_methods_game_turn_deprecated(lua_State *L)
common/scriptcore/api_game_methods.h (working copy)
26 26
/* Game */
27 27
int api_methods_game_turn(lua_State *L);
28 28
int api_methods_game_turn_deprecated(lua_State *L);
29
int api_methods_game_year(lua_State *L);
30
int api_methods_game_year_fragment(lua_State *L);
31
const char *api_methods_game_year_text(lua_State *L);
29 32
const char *api_methods_game_rulesetdir(lua_State *L);
30 33
const char *api_methods_game_ruleset_name(lua_State *L);
31 34

  
common/scriptcore/tolua_game.pkg (working copy)
121 121
  int api_methods_game_turn_deprecated
122 122
    @ turn (lua_State *L);
123 123

  
124
  int api_methods_game_year
125
    @ current_year (lua_State *L);
126

  
127
  int api_methods_game_year_fragment
128
    @ current_fragment (lua_State *L);
129

  
130
  const char *api_methods_game_year_text
131
    @ current_year_text (lua_State *L);
132

  
124 133
  const char *api_methods_game_rulesetdir
125 134
    @ rulesetdir (lua_State *L);
126 135

  
    (1-1/1)