Project

Profile

Help

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 #782719

Detect huts by cause, not by category

Added by Alexandro Ignatiev over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Category:
General
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Related #780730, #775572, continuation of #775424. Code changed in svn r30918 (commit) was ill-advised, it iterates over all bonus-type extra on a tile but is actually called only on tiles with a hut cause extra, that in theory can lead to an unexpected behaviour. We don't want to hut_enter ruins. This tiny patch changes only server/unittools.c, the static struct extra_type_list *category_extra[ECAT_COUNT]; in common/extras.c and related stuff is not used anywhere else but is preserved for possible future uses.

Also, this patch adds second parameter to hut_enter callback (hut rulename) in server/scripting/script_server.c since the generator supports placing different huts but they could not be used in different ways.

huts2_6.patch (1.37 KB) huts2_6.patch patch into server/ directory Alexandro Ignatiev, 2018-10-29 06:01 PM
0002-Consider-extras-with-cause-Hut-enterable.patch (6.51 KB) 0002-Consider-extras-with-cause-Hut-enterable.patch master Marko Lindqvist, 2018-11-09 10:22 PM
0001-Consider-extras-with-cause-Hut-enterable.patch (6.54 KB) 0001-Consider-extras-with-cause-Hut-enterable.patch S3_0 Marko Lindqvist, 2018-11-09 10:22 PM
0001-Consider-extras-with-cause-Hut-enterable.patch (6.6 KB) 0001-Consider-extras-with-cause-Hut-enterable.patch S2_6 Marko Lindqvist, 2018-11-09 10:22 PM

History

#1 Updated by Marko Lindqvist over 2 years ago

Also, this patch adds second parameter to hut_enter callback (hut rulename) in server/scripting
/script_server.c since the generator supports placing different huts but they could not be used in different
ways.

This does not belong to this ticket. One change / ticket. Also, it can't be made to S2_6 at all due to format freeze. Even in later branches "hut_enter" should not be changed (it should behave as before when loading older scenario) but it should be deprecated and a new signal with the new fingerprint added.

#2 Updated by Alexandro Ignatiev over 2 years ago

The second parameter for the callback seemed to me a close thing to what was intended by that unfortunate patch, and this does not behave different if the parameter is omitted; but well, let's keep the rules. Then, can that patch be just reverted now?

#3 Updated by Alexandro Ignatiev over 2 years ago

The second parameter for the callback seemed to me a close thing to what was intended by that unfortunate patch, and this does not behave different if the parameter is omitted; but well, let's keep the rules. Then, can that patch be just reverted now?

#4 Updated by Marko Lindqvist over 2 years ago

The codebase has lived so that 'git revert' ends to merge conflict. Patches for manual revert attached.

#5 Updated by Marko Lindqvist over 2 years ago

  • Status changed from Resolved to Closed
  • Assignee set to Marko Lindqvist

Also available in: Atom PDF