HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...
Bug #775424
Detect hut by bonus type instead of cause
0%
Description
Playing the 'sandbox' in 3.0, you can't actually enter hermit's huts. The reason is that they have cause "Appear" instead of "Hut", and the code that invokes enter hut behaviour relies on extra cause instead of extra type. The workaround is: replace in too many places to list
tile_has_cause_extra(anything, EC_HUT)
on
tile_has_category_extra(anything, ECAT_BONUS)
(the latter function is to be written by mere replacement of 'cause' to 'category' in the former in common/tile.c).
Related issues
History
#1
Updated by Alexandro Ignatiev almost 4 years ago
- Make a flag EF_HUT in enum extra_flag_id in common/extras.h and test it everywhere (autoexplorers, barbarian placing...)
- Either remove extra after the callback is called (maybe consulting its result if we should do it), or inform the callback of the extra type.
#2
Updated by Alexandro Ignatiev almost 4 years ago
Or we just don't need to store the real cause which generated the extra, and can just add a parameter to the ruleset extra definition what to put in this property on any generation? Don't much like the logic, but it seems to be the fastest workaround.
#3
Updated by Marko Lindqvist almost 4 years ago
- Blocks Task #656466: S3_0 datafile format freeze (d3f) added
#4
Updated by Marko Lindqvist almost 4 years ago
The problem with EC_APPEARING is much more general. As it is, EC_APPEARING cause is rather limited as it cannot be combined with another cause without making the extra also appear because of that other cause. For example Roads, Bases, or Resources cannot be only appearing extras, as they would then have not their extension structures defined.
The whole appearing extras feature needs rethinking.
#5
Updated by Marko Lindqvist almost 4 years ago
- Priority changed from Normal to High
Increasing priority as this is real d3f blocker.
#6
Updated by Marko Lindqvist almost 4 years ago
In case of "Road" and "Base" one can enable equivalent cause and set Buildable = FALSE. While that is not the cleanest feature imaginable, that kind of thinking might be the best we can have in short term, meaning S3_0. By introducing 'Generated' property, similar to 'Buildable', for extras we could also handle Resources and Huts.
#7
Updated by Marko Lindqvist almost 4 years ago
- File 0005-Add-generated-property-for-extras.patch 0005-Add-generated-property-for-extras.patch added
- File 0002-Add-generated-property-for-extras.patch 0002-Add-generated-property-for-extras.patch added
- Status changed from New to Resolved
Patches that add 'generated' property.
#8
Updated by Marko Lindqvist almost 4 years ago
- Status changed from Resolved to Closed
- Assignee set to Marko Lindqvist