lua/wrappers/game/lua_map_region.cpp
/**
	 * Creates a new map region instance.
	 *
	 * @param integer width Width of the region.
	 * @param integer height Height of the region.
	 * @param integer [0] initial_value The initial value of each block in the region.
	 */
Creates a new map region instance.
@param integer width Width of the region.
@param integer height Height of the region.
@param integer [0] initial_value The initial value of each block in the region.
Creates a new map region instance . @param integer width Width of the region . @param integer height Height of the region . @param integer [ 0 ] initial_value The initial value of each block in the region .
int MapRegion_ctor(lua_State *lua)
	{
		int args = lua_gettop(lua);
		if (lua_isnum(lua, 1) && lua_isnum(lua, 2) && (args == 2 ||(args > 2 && lua_isnum(lua, 3))))
		{
			MapRegion *region = nullptr;
			if (args == 2)
			{
				region = new MapRegion(lua_tointeger(lua, 1), lua_tointeger(lua, 2));
			}
			else
			{
				region = new MapRegion(lua_tointeger(lua, 1), lua_tointeger(lua, 2), lua_tointeger(lua, 3));
			}
			wrapRefObject<MapRegion>(lua, region);
			return 1;
		}
		return LuaState::expectedArgs(lua, "@new", "string partName, string [\"unknown_part\"] type");
	}
int MapRegion_ctor ( lua_State * lua ) { int args = lua_gettop ( lua ) ; if ( lua_isnum ( lua , 1 ) && lua_isnum ( lua , 2 ) && ( args == 2 || ( args > 2 && lua_isnum ( lua , 3 ) ) ) ) { MapRegion * region = nullptr ; if ( args == 2 ) { region = new MapRegion ( lua_tointeger ( lua , 1 ) , lua_tointeger ( lua , 2 ) ) ; } else { region = new MapRegion ( lua_tointeger ( lua , 1 ) , lua_tointeger ( lua , 2 ) , lua_tointeger ( lua , 3 ) ) ; } wrapRefObject < MapRegion > ( lua , region ) ; return 1 ; } return LuaState :: expectedArgs ( lua , " " , " \" \" " ) ; }
Creates a new map region instance.
Creates a new map region instance .