Merge branch 'master' into 144-add-zone-support

Dieser Commit ist enthalten in:
Reinder Feenstra 2024-07-03 23:09:50 +02:00
Commit 8846630e48
9 geänderte Dateien mit 14 neuen und 45 gelöschten Zeilen

1
.gitattributes vendored
Datei anzeigen

@ -1,2 +1 @@
* text=auto
*.dll filter=lfs diff=lfs merge=lfs -text

Datei anzeigen

@ -97,13 +97,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
lfs: true
submodules: recursive
# All:
- name: Checkout LFS objects
run: git lfs checkout
# Windows only:
- name: Install Qt 5
if: startswith(matrix.config.os, 'windows')
@ -309,13 +304,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
lfs: true
submodules: recursive
# All:
- name: Checkout LFS objects
run: git lfs checkout
# Ubuntu only:
- name: apt update
if: startswith(matrix.config.os, 'ubuntu')
@ -436,12 +426,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
lfs: true
submodules: recursive
- name: Checkout LFS objects
run: git lfs checkout
- name: "Download artifact: lang"
uses: actions/download-artifact@v2
with:
@ -476,12 +462,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
lfs: true
submodules: recursive
- name: Checkout LFS objects
run: git lfs checkout
- name: Build language files
working-directory: ${{github.workspace}}/shared/translations
run: python3 json2lang.py
@ -502,12 +484,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
lfs: true
submodules: recursive
- name: Checkout LFS objects
run: git lfs checkout
- name: Install python packages
run: sudo pip3 install cmarkgfm
@ -531,12 +509,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
lfs: true
submodules: recursive
- name: Checkout LFS objects
run: git lfs checkout
- name: Build manual
working-directory: ${{github.workspace}}/manual
run: ./buildluadoc.py
@ -558,12 +532,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
lfs: true
submodules: recursive
- name: Checkout LFS objects
run: git lfs checkout
- name: Download artifacts 1/2
uses: actions/download-artifact@v2
with:

Datei anzeigen

@ -127,13 +127,13 @@ BlockRailTile::BlockRailTile(World& world, std::string_view _id) :
{
if(!oldTrain->isStopped)
{
throw LogMessageException(LogMessage::E3003_CANT_REMOVE_TRAIN_TRAIN_MUST_BE_STOPPED_FIRST);
throw LogMessageException(LogMessage::E3005_CANT_REMOVE_TRAIN_TRAIN_MUST_BE_STOPPED_FIRST);
}
const auto self = shared_ptr<BlockRailTile>();
if(!oldTrain->blocks.empty() && self != (**oldTrain->blocks.begin()).block.value() && self != (**oldTrain->blocks.rbegin()).block.value())
{
throw LogMessageException(LogMessage::E3004_CANT_REMOVE_TRAIN_TRAIN_CAN_ONLY_BE_REMOVED_FROM_HEAD_OR_TAIL_BLOCK);
throw LogMessageException(LogMessage::E3006_CANT_REMOVE_TRAIN_TRAIN_CAN_ONLY_BE_REMOVED_FROM_HEAD_OR_TAIL_BLOCK);
}
status->destroy();

Datei anzeigen

@ -231,11 +231,11 @@ void Kernel::receive(const Message& message)
case SystemSubCommand::LocomotiveEmergencyStop:
if(m_decoderController && system.isResponse())
{
auto [success, protocol, address] = uidToProtocolAddress(system.uid());
auto [success, proto, addr] = uidToProtocolAddress(system.uid());
if(success)
{
EventLoop::call(
[this, protocol=protocol, address=address]()
[this, protocol=proto, address=addr]()
{
if(const auto& decoder = m_decoderController->getDecoder(protocol, address))
decoder->emergencyStop.setValueInternal(true);
@ -273,11 +273,11 @@ void Kernel::receive(const Message& message)
const auto& locomotiveSpeed = static_cast<const LocomotiveSpeed&>(message);
if(locomotiveSpeed.isResponse() && locomotiveSpeed.hasSpeed())
{
auto [success, protocol, address] = uidToProtocolAddress(locomotiveSpeed.uid());
auto [success, proto, addr] = uidToProtocolAddress(locomotiveSpeed.uid());
if(success)
{
EventLoop::call(
[this, protocol=protocol, address=address, throttle=Decoder::speedStepToThrottle(locomotiveSpeed.speed(), LocomotiveSpeed::speedMax)]()
[this, protocol=proto, address=addr, throttle=Decoder::speedStepToThrottle(locomotiveSpeed.speed(), LocomotiveSpeed::speedMax)]()
{
if(const auto& decoder = m_decoderController->getDecoder(protocol, address))
{
@ -296,7 +296,7 @@ void Kernel::receive(const Message& message)
const auto& locomotiveDirection = static_cast<const LocomotiveDirection&>(message);
if(locomotiveDirection.isResponse() && locomotiveDirection.hasDirection())
{
auto [success, protocol, address] = uidToProtocolAddress(locomotiveDirection.uid());
auto [success, proto, addr] = uidToProtocolAddress(locomotiveDirection.uid());
if(success)
{
Direction direction = Direction::Unknown;
@ -316,7 +316,7 @@ void Kernel::receive(const Message& message)
}
EventLoop::call(
[this, protocol=protocol, address=address, direction]()
[this, protocol=proto, address=addr, direction]()
{
if(const auto& decoder = m_decoderController->getDecoder(protocol, address))
decoder->direction.setValueInternal(direction);
@ -332,11 +332,11 @@ void Kernel::receive(const Message& message)
const auto& locomotiveFunction = static_cast<const LocomotiveFunction&>(message);
if(locomotiveFunction.isResponse() && locomotiveFunction.hasValue())
{
auto [success, protocol, address] = uidToProtocolAddress(locomotiveFunction.uid());
auto [success, proto, addr] = uidToProtocolAddress(locomotiveFunction.uid());
if(success)
{
EventLoop::call(
[this, protocol=protocol, address=address, number=locomotiveFunction.number(), value=locomotiveFunction.isOn()]()
[this, protocol=proto, address=addr, number=locomotiveFunction.number(), value=locomotiveFunction.isOn()]()
{
if(const auto& decoder = m_decoderController->getDecoder(protocol, address))
decoder->setFunctionValue(number, value);

Binäre Datei nicht angezeigt.

Binäre Datei nicht angezeigt.

Binäre Datei nicht angezeigt.

Datei anzeigen

@ -187,8 +187,8 @@ enum class LogMessage : uint32_t
E2024_UNKNOWN_LOCOMOTIVE_MFX_UID_X = LogMessageOffset::error + 2024,
E3001_CANT_DELETE_RAIL_VEHICLE_WHEN_IN_ACTIVE_TRAIN = LogMessageOffset::error + 3001,
E3002_CANT_DELETE_ACTIVE_TRAIN = LogMessageOffset::error + 3002,
E3003_CANT_REMOVE_TRAIN_TRAIN_MUST_BE_STOPPED_FIRST = LogMessageOffset::error + 3003,
E3004_CANT_REMOVE_TRAIN_TRAIN_CAN_ONLY_BE_REMOVED_FROM_HEAD_OR_TAIL_BLOCK = LogMessageOffset::error + 3004,
E3005_CANT_REMOVE_TRAIN_TRAIN_MUST_BE_STOPPED_FIRST = LogMessageOffset::error + 3005,
E3006_CANT_REMOVE_TRAIN_TRAIN_CAN_ONLY_BE_REMOVED_FROM_HEAD_OR_TAIL_BLOCK = LogMessageOffset::error + 3006,
E9001_X_DURING_EXECUTION_OF_X_EVENT_HANDLER = LogMessageOffset::error + 9001,
E9999_X = LogMessageOffset::error + 9999,

Datei anzeigen

@ -6309,11 +6309,11 @@
"fuzzy": 0
},
{
"term": "message:E3003",
"term": "message:E3005",
"definition": "Can't remove train, train must be stopped first."
},
{
"term": "message:E3004",
"term": "message:E3006",
"definition": "Can't remove train, train can only be removed from head or tail block."
},
{