lua/wrappers/game/lua_map.cpp
/**
	 * Used to tell if the given game object can be placed at the given location.
	 * This uses the game objects passibility table to tell if it can be at the given location.
	 *
	 * @param am.game_object game_object The game object to test with.
	 * @param number position_x The x position to test at.
	 * @param number position_y The y position to test at.
	 * @returns boolean True if the given position is valid for the given game object.
	 */
Used to tell if the given game object can be placed at the given location.
This uses the game objects passibility table to tell if it can be at the given location.

@param am.game_object game_object The game object to test with.
@param number position_x The x position to test at.
@param number position_y The y position to test at.
@returns boolean True if the given position is valid for the given game object.
Used to tell if the given game object can be placed at the given location . This uses the game objects passibility table to tell if it can be at the given location . @param am . game_object game_object The game object to test with . @param number position_x The x position to test at . @param number position_y The y position to test at . @returns boolean True if the given position is valid for the given game object .
int Map_is_valid_location(lua_State *lua)
	{
		Map *map = castUData<Map>(lua, 1);
		if (map)
		{
			GameObject *obj = getGameObject(lua, 2);
			if (obj && lua_isnum(lua, 3) && lua_isnum(lua, 4))
			{
				lua_pushboolean(lua, map->isValidLocation(lua_tofloat(lua, 3), lua_tofloat(lua, 4), obj));
				return 1;
			}
			return LuaState::expectedArgs(lua, "is_valid_location", "am.game_object game_object, number x, number y");
		}
		return LuaState::expectedContext(lua, "is_valid_location", "am.map");
	}
int Map_is_valid_location ( lua_State * lua ) { Map * map = castUData < Map > ( lua , 1 ) ; if ( map ) { GameObject * obj = getGameObject ( lua , 2 ) ; if ( obj && lua_isnum ( lua , 3 ) && lua_isnum ( lua , 4 ) ) { lua_pushboolean ( lua , map -> isValidLocation ( lua_tofloat ( lua , 3 ) , lua_tofloat ( lua , 4 ) , obj ) ) ; return 1 ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Used to tell if the given game object can be placed at the given location.
Used to tell if the given game object can be placed at the given location .