Ticket #45489

City disorder counter

Eröffnet am: 2022-08-28 08:08 Letztes Update: 2023-01-18 02:12

Auswertung:
Verantwortlicher:
(Keine)
Typ:
Status:
Offen
Komponente:
Meilenstein:
Priorität:
5 - Mittel
Schweregrad:
5 - Mittel
Lösung:
Keine
Datei:
4

Details

Add counter_behavior "Disorder" - increased if city is in disorder at turn change, otherwise zeroed.

Ticket-Verlauf (3/20 Historien)

2022-08-28 08:08 Aktualisiert von: cazfi
  • New Ticket "City disorder counter" created
2022-09-27 22:13 Aktualisiert von: lachu
2022-09-27 22:13 Aktualisiert von: lachu
  • File 0001-OSDN-45489-S-awomir-Lach-slawek-lach.art.pl.patch (File ID: 10413) is deleted
2022-09-27 22:13 Aktualisiert von: lachu
  • File 0002-OSDN-45489-S-awomir-Lach-slawek-lach.art.pl.patch (File ID: 10417) is attached
  • File 0002-OSDN-45489-S-awomir-Lach-slawek-lach.art.pl.patch (File ID: 10416) is attached
2022-09-27 22:13 Aktualisiert von: lachu
  • File 0002-OSDN-45489-S-awomir-Lach-slawek-lach.art.pl.patch (File ID: 10416) is deleted
2022-09-27 22:13 Aktualisiert von: lachu
  • File 0002-OSDN-45489-S-awomir-Lach-slawek-lach.art.pl.patch (File ID: 10417) is deleted
2022-09-27 23:56 Aktualisiert von: lachu
Kommentar

Probably done. It requires ticket 45488 .

2022-12-05 23:16 Aktualisiert von: lachu
Kommentar

Reply To cazfi

Add counter_behavior "Disorder" - increased if city is in disorder at turn change, otherwise zeroed.

I see my patches lands on master, but it tickets associates to it was not closed. I prepare new patch for unhappy/disorder, witch is similar to newer for celebrating. Applying these patches requires of reverts previously patches.

2022-12-05 23:35 Aktualisiert von: cazfi
Kommentar

Reply To lachu

I see my patches lands on master, but it tickets associates to it was not closed.

I don't know what you refer to. Maybe you have accidentally committed (or cherry-picked) to your local master?

2022-12-06 00:55 Aktualisiert von: lachu
Kommentar

Reply To cazfi

Reply To lachu

I see my patches lands on master, but it tickets associates to it was not closed.

I don't know what you refer to. Maybe you have accidentally committed (or cherry-picked) to your local master?

Ok. I will see in log. I work on other branch and do not merge to master on local. I will check this.

2022-12-10 05:18 Aktualisiert von: lachu
Kommentar

Ok. I see this patch did not apply on master. I download freeciv source code, create new branch from master and try to apply. fc_types.h do not have counter celebrates patch applied. Should I provide changes based on master, so there could been problems apply this patch, if you apply city's celebrating patch? Or just leave it as it is. I am not 100% sure if I am rebase it on master, it would not apply if celebration was applied. Git tracks commit history (for each patch stores parent patch, so maybe it will be solved automatically?). I am beginner in programing, who develop single-person projects for many years.

2022-12-11 11:08 Aktualisiert von: cazfi
Kommentar

Reply To lachu

Ok. I see this patch did not apply on master. I download freeciv source code, create new branch from master and try to apply. fc_types.h do not have counter celebrates patch applied. Should I provide changes based on master, so there could been problems apply this patch, if you apply city's celebrating patch? Or just leave it as it is. I am not 100% sure if I am rebase it on master, it would not apply if celebration was applied. Git tracks commit history (for each patch stores parent patch, so maybe it will be solved automatically?). I am beginner in programing, who develop single-person projects for many years.

Whether patch applies depends mostly if the context of the changes is there or not. Can't replace code that is not there to begin with. You can look at the patch file to see what is expects to find as the "original code" (any lines it wants to remove, and any lines it's not going to touch but still lists as the context of the changed lines)

If your patch depends on another one, either logically or textually (it wouldn't apply), you should just mention that dependency while submitting it.

2022-12-11 23:50 Aktualisiert von: lachu
Kommentar
0001-OSDN-45489-S-awomir-Lach-slawek-lach.art.pl.patch(1KB)
Change implementation. Previous patch needs to be reverted before apply.

I download branch master (redownload freeciv sources) and apply celebration + given above. All applies.

2022-12-12 02:02 Aktualisiert von: lachu
Kommentar

Reply To cazfi

Reply To lachu

Ok. I see this patch did not apply on master. I download freeciv source code, create new branch from master and try to apply. fc_types.h do not have counter celebrates patch applied. Should I provide changes based on master, so there could been problems apply this patch, if you apply city's celebrating patch? Or just leave it as it is. I am not 100% sure if I am rebase it on master, it would not apply if celebration was applied. Git tracks commit history (for each patch stores parent patch, so maybe it will be solved automatically?). I am beginner in programing, who develop single-person projects for many years.

Whether patch applies depends mostly if the context of the changes is there or not. Can't replace code that is not there to begin with. You can look at the patch file to see what is expects to find as the "original code" (any lines it wants to remove, and any lines it's not going to touch but still lists as the context of the changed lines) If your patch depends on another one, either logically or textually (it wouldn't apply), you should just mention that dependency while submitting it.

My patches in this ticket requires Celebrating Ticket to be applied.

There you are patch to sandbox, to test modifications:

2022-12-12 01:59 Updated by: lachu

File 0001-OSDN-TICKET-45489-S-awomir-Lach-slawek-lach.art.pl.patch (File ID: 11086) is attached

I have one question. When apply these patch, tile near city are colorized by red. It seems to work, because if city disorders for 6 turns, people stop working tile. When city was made content again, citizens working tiles again. I also discovered, that when terrain are red-colorized, I cannot assign citizens to any tile - there is no difference if counter/checkpoint requirement was fulfilled or not.

Maybe it is bug somewhere else?

2022-12-14 01:36 Aktualisiert von: lachu
Kommentar

There is some misclarification, when tile_workable is calculated. I think, that it is calculated, when city is build. But... It is calculated before client receives counters probably. How to made it recalculates, once city receive new counter values. I also do not known, if it is calculated before city's counter values' was allocated.

Could somebody look about this? Or maybe should I use other effect. I do not known, how to made player loose or government fall by effect.

2023-01-09 14:30 Aktualisiert von: cazfi
Kommentar

Reply To lachu

There is some misclarification, when tile_workable is calculated.

There are known issues with it; #44706 was just fixed, but #46425, #46424, and #46423 remain.

2023-01-18 02:12 Aktualisiert von: lachu
Kommentar

Reply To cazfi

Reply To lachu

There is some misclarification, when tile_workable is calculated.

There are known issues with it; #44706 was just fixed, but #46425, #46424, and #46423 remain.

I do not have to use Tile_Workable to just demonstrate counters. Maybe use just OutputBonus with negative number or similar effect?

Dateianhangliste

Bearbeiten

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Anmelden