1
- use macroquad:: prelude:: * ;
2
- use server:: ability_initializer:: EventOrigin ;
3
- use server:: action:: Action ;
4
- use server:: city:: { City , MoodState } ;
5
- use server:: combat:: { active_attackers, active_defenders, CombatPhase } ;
6
- use server:: content:: advances:: { NAVIGATION , ROADS } ;
7
- use server:: content:: custom_phase_actions:: CustomPhaseRequest ;
8
- use server:: game:: { CulturalInfluenceResolution , CurrentMove , Game , GameState } ;
9
- use server:: position:: Position ;
10
- use server:: status_phase:: { StatusPhaseAction , StatusPhaseState } ;
11
-
12
1
use crate :: assets:: Assets ;
13
2
use crate :: client:: { Features , GameSyncRequest } ;
14
3
use crate :: collect_ui:: CollectResources ;
@@ -18,11 +7,21 @@ use crate::happiness_ui::IncreaseHappinessConfig;
18
7
use crate :: layout_ui:: FONT_SIZE ;
19
8
use crate :: log_ui:: { add_advance_help, advance_help} ;
20
9
use crate :: map_ui:: ExploreResolutionConfig ;
21
- use crate :: move_ui:: { MoveDestination , MoveIntent , MoveSelection } ;
10
+ use crate :: move_ui:: { MoveDestination , MoveIntent , MovePayment , MoveSelection } ;
22
11
use crate :: payment_ui:: Payment ;
23
12
use crate :: recruit_unit_ui:: { RecruitAmount , RecruitSelection } ;
24
13
use crate :: render_context:: RenderContext ;
25
14
use crate :: status_phase_ui:: ChooseAdditionalAdvances ;
15
+ use macroquad:: prelude:: * ;
16
+ use server:: ability_initializer:: EventOrigin ;
17
+ use server:: action:: Action ;
18
+ use server:: city:: { City , MoodState } ;
19
+ use server:: combat:: { active_attackers, active_defenders, CombatPhase } ;
20
+ use server:: content:: advances:: { NAVIGATION , ROADS } ;
21
+ use server:: content:: custom_phase_actions:: CustomPhaseRequest ;
22
+ use server:: game:: { CulturalInfluenceResolution , CurrentMove , Game , GameState } ;
23
+ use server:: position:: Position ;
24
+ use server:: status_phase:: { StatusPhaseAction , StatusPhaseState } ;
26
25
27
26
#[ derive( Clone ) ]
28
27
pub enum ActiveDialog {
@@ -40,6 +39,7 @@ pub enum ActiveDialog {
40
39
RecruitUnitSelection ( RecruitAmount ) ,
41
40
ReplaceUnits ( RecruitSelection ) ,
42
41
MoveUnits ( MoveSelection ) ,
42
+ MovePayment ( MovePayment ) ,
43
43
CulturalInfluence ,
44
44
CulturalInfluenceResolution ( CulturalInfluenceResolution ) ,
45
45
ExploreResolution ( ExploreResolutionConfig ) ,
@@ -78,6 +78,7 @@ impl ActiveDialog {
78
78
ActiveDialog :: RecruitUnitSelection ( _) => "recruit unit selection" ,
79
79
ActiveDialog :: ReplaceUnits ( _) => "replace units" ,
80
80
ActiveDialog :: MoveUnits ( _) => "move units" ,
81
+ ActiveDialog :: MovePayment ( _) => "move payment" ,
81
82
ActiveDialog :: CulturalInfluence => "cultural influence" ,
82
83
ActiveDialog :: CulturalInfluenceResolution ( _) => "cultural influence resolution" ,
83
84
ActiveDialog :: ExploreResolution ( _) => "explore resolution" ,
@@ -109,7 +110,9 @@ impl ActiveDialog {
109
110
"Click on a city to increase happiness" . to_string( ) ,
110
111
]
111
112
}
112
- ActiveDialog :: AdvancePayment ( _) | ActiveDialog :: ConstructionPayment ( _) => {
113
+ ActiveDialog :: AdvancePayment ( _)
114
+ | ActiveDialog :: ConstructionPayment ( _)
115
+ | ActiveDialog :: MovePayment ( _) => {
113
116
vec ! [ "Pay resources" . to_string( ) ]
114
117
}
115
118
ActiveDialog :: CollectResources ( collect) => collect. help_text ( rc. game ) ,
@@ -144,7 +147,7 @@ impl ActiveDialog {
144
147
vec ! [ "Click on a building to influence its culture" . to_string( ) ]
145
148
}
146
149
ActiveDialog :: CulturalInfluenceResolution ( c) => vec ! [ format!(
147
- "Pay {} culture tokens to influence {}" ,
150
+ "Pay {} to influence {}" ,
148
151
c. roll_boost_cost,
149
152
c. city_piece. name( )
150
153
) ] ,
@@ -509,7 +512,7 @@ impl State {
509
512
r. iter ( )
510
513
. map ( |p| {
511
514
Payment :: new (
512
- & p. options ,
515
+ & p. cost ,
513
516
& game. get_player ( game. active_player ( ) ) . resources ,
514
517
& p. name ,
515
518
p. optional ,
@@ -518,7 +521,7 @@ impl State {
518
521
. collect ( ) ,
519
522
) ,
520
523
CustomPhaseRequest :: Reward ( r) => {
521
- ActiveDialog :: CustomPhaseRewardRequest ( Payment :: new_gain ( & r. options , & r. name ) )
524
+ ActiveDialog :: CustomPhaseRewardRequest ( Payment :: new_gain ( & r. reward , & r. name ) )
522
525
}
523
526
} ;
524
527
}
0 commit comments