aboutsummaryrefslogtreecommitdiff
path: root/assets/img_large
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2019-06-18 21:03:21 +0200
committerorwell96 <orwell@bleipb.de>2019-12-05 10:15:54 +0100
commit02025f53aae8dcae757788dd6dd1378693587988 (patch)
tree4378786450d7f34374585fe82e7ce5cd399ef88a /assets/img_large
parent9c1d3565058799f21b6985c100ccf1abe045d3da (diff)
downloadadvtrains-02025f53aae8dcae757788dd6dd1378693587988.tar.gz
advtrains-02025f53aae8dcae757788dd6dd1378693587988.tar.bz2
advtrains-02025f53aae8dcae757788dd6dd1378693587988.zip
Move attachment positions down 1 node
Diffstat (limited to 'assets/img_large')
0 files changed, 0 insertions, 0 deletions
a id='n125' href='#n125'>125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
/*
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include "lua_api/l_nodetimer.h"
#include "lua_api/l_internal.h"
#include "environment.h"
#include "map.h"


int NodeTimerRef::gc_object(lua_State *L) {
	NodeTimerRef *o = *(NodeTimerRef **)(lua_touserdata(L, 1));
	delete o;
	return 0;
}

NodeTimerRef* NodeTimerRef::checkobject(lua_State *L, int narg)
{
	luaL_checktype(L, narg, LUA_TUSERDATA);
	void *ud = luaL_checkudata(L, narg, className);
	if(!ud) luaL_typerror(L, narg, className);
	return *(NodeTimerRef**)ud;  // unbox pointer
}

int NodeTimerRef::l_set(lua_State *L)
{
	NodeTimerRef *o = checkobject(L, 1);
	ServerEnvironment *env = o->m_env;
	if(env == NULL) return 0;