File tree 2 files changed +13
-0
lines changed
2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,15 @@ int ModApiClient::l_set_last_run_mod(lua_State *L)
63
63
return 1 ;
64
64
}
65
65
66
+ // print(text)
67
+ int ModApiClient::l_print (lua_State *L)
68
+ {
69
+ NO_MAP_LOCK_REQUIRED;
70
+ std::string text = luaL_checkstring (L, 1 );
71
+ rawstream << text << std::endl;
72
+ return 0 ;
73
+ }
74
+
66
75
// display_chat_message(message)
67
76
int ModApiClient::l_display_chat_message (lua_State *L)
68
77
{
@@ -261,6 +270,7 @@ int ModApiClient::l_take_screenshot(lua_State *L)
261
270
void ModApiClient::Initialize (lua_State *L, int top)
262
271
{
263
272
API_FCT (get_current_modname);
273
+ API_FCT (print);
264
274
API_FCT (display_chat_message);
265
275
API_FCT (get_player_names);
266
276
API_FCT (set_last_run_mod);
Original file line number Diff line number Diff line change @@ -29,6 +29,9 @@ class ModApiClient : public ModApiBase
29
29
// get_current_modname()
30
30
static int l_get_current_modname (lua_State *L);
31
31
32
+ // print(text)
33
+ static int l_print (lua_State *L);
34
+
32
35
// display_chat_message(message)
33
36
static int l_display_chat_message (lua_State *L);
34
37
You can’t perform that action at this time.
0 commit comments