Merge tag '14.0-beta3' into jgrpp

# Conflicts:
#	regression/regression/result.txt
#	src/industrytype.h
#	src/network/core/config.h
#	src/network/core/network_game_info.cpp
#	src/network/core/network_game_info.h
#	src/network/core/packet.cpp
#	src/network/core/packet.h
#	src/network/core/tcp.cpp
#	src/network/core/tcp.h
#	src/network/core/tcp_admin.cpp
#	src/network/core/tcp_content.cpp
#	src/network/core/tcp_coordinator.cpp
#	src/network/core/tcp_game.cpp
#	src/network/core/tcp_game.h
#	src/network/core/tcp_turn.cpp
#	src/network/core/udp.cpp
#	src/network/core/udp.h
#	src/network/network_admin.cpp
#	src/network/network_client.cpp
#	src/network/network_client.h
#	src/network/network_command.cpp
#	src/network/network_content.cpp
#	src/network/network_internal.h
#	src/network/network_query.cpp
#	src/network/network_query.h
#	src/network/network_server.cpp
#	src/network/network_server.h
#	src/network/network_turn.cpp
#	src/network/network_udp.cpp
#	src/rail_gui.cpp
#	src/road_gui.cpp
This commit is contained in:
Jonathan G Rennison
2024-02-19 17:57:05 +00:00
67 changed files with 1463 additions and 1297 deletions

View File

@@ -10,8 +10,6 @@
#ifndef INDUSTRYTYPE_H
#define INDUSTRYTYPE_H
#include <array>
#include <vector>
#include "map_type.h"
#include "slope_type.h"
#include "industry_type.h"
@@ -19,6 +17,9 @@
#include "cargo_type.h"
#include "newgrf_animation_type.h"
#include "newgrf_commons.h"
#include <array>
#include <vector>
#include <variant>
enum IndustryCleanupType {
CLEAN_RANDOMSOUNDS, ///< Free the dynamically allocated sounds table
@@ -113,7 +114,7 @@ struct IndustrySpec {
IndustryType conflicting[3]; ///< Industries this industry cannot be close to
byte check_proc; ///< Index to a procedure to check for conflicting circumstances
std::array<CargoID, INDUSTRY_NUM_OUTPUTS> produced_cargo{};
std::array<CargoLabel, INDUSTRY_NUM_OUTPUTS> produced_cargo_label{};
std::array<std::variant<CargoLabel, MixedCargoType>, INDUSTRY_NUM_OUTPUTS> produced_cargo_label{};
std::array<byte, INDUSTRY_NUM_OUTPUTS> production_rate{};
/**
* minimum amount of cargo transported to the stations.
@@ -121,7 +122,7 @@ struct IndustrySpec {
*/
byte minimal_cargo;
std::array<CargoID, INDUSTRY_NUM_INPUTS> accepts_cargo{}; ///< 16 accepted cargoes.
std::array<CargoLabel, INDUSTRY_NUM_INPUTS> accepts_cargo_label{};
std::array<std::variant<CargoLabel, MixedCargoType>, INDUSTRY_NUM_INPUTS> accepts_cargo_label{};
uint16_t input_cargo_multiplier[INDUSTRY_NUM_INPUTS][INDUSTRY_NUM_OUTPUTS]; ///< Input cargo multipliers (multiply amount of incoming cargo for the produced cargoes)
IndustryLifeType life_type; ///< This is also known as Industry production flag, in newgrf specs
byte climate_availability; ///< Bitmask, giving landscape enums as bit position
@@ -158,7 +159,7 @@ struct IndustrySpec {
*/
struct IndustryTileSpec {
std::array<CargoID, INDUSTRY_NUM_INPUTS> accepts_cargo; ///< Cargo accepted by this tile
std::array<CargoLabel, INDUSTRY_NUM_INPUTS> accepts_cargo_label;
std::array<std::variant<CargoLabel, MixedCargoType>, INDUSTRY_NUM_INPUTS> accepts_cargo_label;
std::array<int8_t, INDUSTRY_NUM_INPUTS> acceptance; ///< Level of acceptance per cargo type (signed, may be negative!)
Slope slopes_refused; ///< slope pattern on which this tile cannot be built
byte anim_production; ///< Animation frame to start when goods are produced