lua/wrappers/game/lua_game_object.cpp
/**
	 * Sets the map that the GameObject was originally on, can be nil.
	 * This is usually set automatically the first time a GameObject is
	 * added to a map. This is primarily used for reloading the GameObject
	 * and knowing where to find likely find any event handlers and additional
	 * information relating to the GameObject that is not stored directly on the
	 * GameObject.
	 *
	 * @param am.map map The map the GameObject was originally was on.
	 * @returns am.GameObject This
	 */
Sets the map that the GameObject was originally on, can be nil.
This is usually set automatically the first time a GameObject is
added to a map. This is primarily used for reloading the GameObject
and knowing where to find likely find any event handlers and additional
information relating to the GameObject that is not stored directly on the
GameObject.

@param am.map map The map the GameObject was originally was on.
Sets the map that the GameObject was originally on can be nil . This is usually set automatically the first time a GameObject is added to a map . This is primarily used for reloading the GameObject and knowing where to find likely find any event handlers and additional information relating to the GameObject that is not stored directly on the GameObject . @param am . map map The map the GameObject was originally was on .
int GameObject_original_map(lua_State *lua, GameObject *obj)
	{
		if (!obj)
		{
			return 0;
		}
		if (lua_gettop(lua) == 1)
		{
			Map *map = obj->getOriginalMap();
			if (map)
			{
				wrapRefObject<Map>(lua, map);
				return 1;
			}
			lua_pushnil(lua);
			return 1;
		}
		else if (lua_isnil(lua, 2))
		{
			obj->setOriginalMap(nullptr);
			lua_first(lua);
		}
		else
		{
			Map *map = castUData<Map>(lua, 2);
			if (map)
			{
				obj->setOriginalMap(map);
				lua_first(lua);
			}
		}
		return LuaState::expectedArgs(lua, "map", 2, "nil map", "am.map map");
	}
int GameObject_original_map ( lua_State * lua , GameObject * obj ) { if ( ! obj ) { return 0 ; } if ( lua_gettop ( lua ) == 1 ) { Map * map = obj -> getOriginalMap ( ) ; if ( map ) { wrapRefObject < Map > ( lua , map ) ; return 1 ; } lua_pushnil ( lua ) ; return 1 ; } else if ( lua_isnil ( lua , 2 ) ) { obj -> setOriginalMap ( nullptr ) ; lua_first ( lua ) ; } else { Map * map = castUData < Map > ( lua , 2 ) ; if ( map ) { obj -> setOriginalMap ( map ) ; lua_first ( lua ) ; } } return LuaState :: expectedArgs ( lua , " " , 2 , " " , " " ) ; }
Sets the map that the GameObject was originally on, can be nil.
Sets the map that the GameObject was originally on can be nil .
// Can be set to nil