MantisBT - VCMI
View Issue Details
0001712VCMIMechanics - Town structurespublic2014-02-11 20:072022-04-12 08:58
Ivan 
Ivan 
normalminoralways
closedfixed 
 
0.97 
0001712: Tests for possibility of building a structure should be recursive
It should not be possible to build a structure in town if one of its dependencies have unfulfilled dependencies - search must be recursive.

Most common example is town with built dwellings but without fort - in this case it is possible to upgrade dwellings & likely build new ones without building fort. This is the most obvious case, not the only one.


Solution: test for status of logical expressions should be recursive instead of testing presence of a building. But needs some care to make sure that there are no recursive dependencies.
No tags attached.
has duplicate 0001855closed  Upgrade trees in castles are just wrong... 
has duplicate 0001851closed  Upgrade tree not shown properly 
related to 0001734closed SXX City Hall/Capitol can be built if Tavern is unavailable for the town 
Issue History
2014-02-11 20:07IvanNew Issue
2014-02-11 20:07IvanStatusnew => assigned
2014-02-11 20:07IvanAssigned To => Ivan
2014-03-02 11:10IvanRelationship addedrelated to 0001734
2014-08-04 11:21IvanRelationship addedhas duplicate 0001855
2014-08-04 11:21IvanRelationship addedhas duplicate 0001851
2014-08-08 08:21IvanNote Added: 0004901
2014-08-08 08:21IvanStatusassigned => resolved
2014-08-08 08:21IvanFixed in Version => 0.97
2014-08-08 08:21IvanResolutionopen => fixed
2022-04-12 08:58PovelitelStatusresolved => closed

Notes
(0004901)
Ivan   
2014-08-08 08:21   
Largely resolved in this commit: https://github.com/vcmi/vcmi/commit/d1dd7eef48c3c528974a4d85bf5d404f305601be [^]

Some bits described in 0001851 are still missing - not sure if those can be safely fixed - fully recursive search may cause crash with incorrect dependencies (not possible in H3 but possible with mods.)