Stadium: back to the edition's block limits (Diamond 3.7: 96,000 places)
The extension to 144,000 places of 1.0.3 is withdrawn: the match broadcast of the original has no room for attendances of 100,000 and more and showed them wrongly. Limits, unit prices and construction weeks now come from the edition unchanged (3.7: 8/18/8/14 thousand per block, 30/37/30/25 weeks). A savegame with a larger stadium keeps its places but cannot extend such a block further. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
d9d408069e
commit
a503fff55f
6 files changed
+48
-50
No files matched your search
@@ -1,4 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// The stadium block limits come from the edition unchanged (Diamond 3.7: 96,000 places in total).
|
||||
// The file keeps its historical name: until 1.0.12 it tested the withdrawn 144,000 place extension.
|
||||
#include "game/stadium_blocks.hpp"
|
||||
#include "formats/le.hpp"
|
||||
#include <iostream>
|
||||
@@ -13,11 +15,12 @@ int main()try{
|
||||
const uint8_t original_max[]={8,18,8,14,8,18,8,14},original_weeks[]={30,37,30,25,30,37,30,25};
|
||||
for(uint32_t i=0;i<8;++i){image.patch(layout::CareerSession_Invalid_RuntimeField+i,original_max+i,1);image.patch(layout::CareerSession_DispatchStadium_RuntimeField2+(i+22)*5,original_weeks+i,1);const uint8_t price[]={0xe0,0x93,0x04,0};image.patch(layout::CareerSession_DispatchStadium_RuntimeField+(i+8)*4,price,4);}
|
||||
const auto constants=stadium_block_expansion_constants(image);
|
||||
check(constants.max_places==std::array<uint32_t,8>{14000,24000,14000,20000,14000,24000,14000,20000},"expanded block limits differ");
|
||||
check(std::accumulate(constants.max_places.begin(),constants.max_places.end(),0u)==144000,"full stadium does not reach144k");
|
||||
check(constants.weeks==std::array<uint8_t,8>{30,48,30,40,30,48,30,40},"larger block duration is not scaled with size");
|
||||
check(constants.max_places==std::array<uint32_t,8>{8000,18000,8000,14000,8000,18000,8000,14000},"block limits are not the edition's");
|
||||
check(std::accumulate(constants.max_places.begin(),constants.max_places.end(),0u)==96000,"a full Diamond 3.7 stadium does not have 96,000 places");
|
||||
check(constants.weeks==std::array<uint8_t,8>{30,37,30,25,30,37,30,25},"construction weeks are not the edition's");
|
||||
check(constants.price_per_1000[0]==300000&&constants.price_per_1000[7]==300000,"edition unit prices were replaced");
|
||||
const uint8_t custom=20;image.patch(layout::CareerSession_Invalid_RuntimeField,&custom,1);check(stadium_block_expansion_constants(image).max_places[0]==20000,"larger supplied custom stand was reduced");
|
||||
const uint8_t unsupported=255;image.patch(layout::CareerSession_Invalid_RuntimeField,&unsupported,1);bool rejected=false;try{stadium_block_expansion_constants(image);}catch(const FormatError&){rejected=true;}check(rejected,"unrepresentable capacity/duration accepted");
|
||||
std::cout<<"144k stadium policy, edition prices, capacity-based weeks, custom floors and saved byte limits passed\n";
|
||||
// an edition (or edited data) with other limits is taken as supplied
|
||||
const uint8_t custom=20;image.patch(layout::CareerSession_Invalid_RuntimeField,&custom,1);check(stadium_block_expansion_constants(image).max_places[0]==20000,"a supplied custom limit was changed");
|
||||
const uint8_t unsupported=255;image.patch(layout::CareerSession_Invalid_RuntimeField,&unsupported,1);bool rejected=false;try{stadium_block_expansion_constants(image);}catch(const FormatError&){rejected=true;}check(rejected,"limits beyond the saved capacity byte accepted");
|
||||
std::cout<<"96,000 place stadium of the edition, edition prices and weeks, custom limits and saved byte limit passed\n";
|
||||
}catch(const std::exception& error){std::cerr<<error.what()<<'\n';return 1;}
|
||||
Reference in new issue
Block a user