@@ -7,6 +7,7 @@ use crate::render_context::RenderContext;
7
7
use server:: action:: Action ;
8
8
use server:: content:: advances:: get_advance_by_name;
9
9
use server:: content:: custom_actions:: { CustomAction , CustomActionType } ;
10
+ use server:: game:: GameState ;
10
11
use server:: playing_actions:: { PlayingAction , PlayingActionType } ;
11
12
use server:: resource:: ResourceType ;
12
13
@@ -80,7 +81,7 @@ fn global_move(rc: &RenderContext) -> StateUpdate {
80
81
fn custom_action_tooltip ( custom_action_type : & CustomActionType ) -> String {
81
82
match custom_action_type {
82
83
CustomActionType :: ConstructWonder => "Construct a wonder" . to_string ( ) ,
83
- CustomActionType :: ForcedLabor => get_advance_by_name ( "Absolute Power" ) . description ,
84
+ CustomActionType :: AbsolutePower => get_advance_by_name ( "Absolute Power" ) . description ,
84
85
CustomActionType :: VotingIncreaseHappiness => get_advance_by_name ( "Voting" ) . description ,
85
86
CustomActionType :: FreeEconomyCollect => get_advance_by_name ( "Free Economy" ) . description ,
86
87
}
@@ -94,7 +95,7 @@ fn generic_custom_action(custom_action_type: &CustomActionType) -> Option<Custom
94
95
// handled explicitly
95
96
None
96
97
}
97
- CustomActionType :: ForcedLabor => Some ( CustomAction :: ForcedLabor ) ,
98
+ CustomActionType :: AbsolutePower => Some ( CustomAction :: ForcedLabor ) ,
98
99
}
99
100
}
100
101
@@ -104,10 +105,11 @@ pub fn base_or_custom_available(
104
105
custom : & CustomActionType ,
105
106
) -> bool {
106
107
rc. can_play_action ( action)
107
- || rc
108
- . game
109
- . get_available_custom_actions ( rc. shown_player . index )
110
- . contains ( custom)
108
+ || ( rc. game . state == GameState :: Playing
109
+ && rc
110
+ . game
111
+ . get_available_custom_actions ( rc. shown_player . index )
112
+ . contains ( custom) )
111
113
}
112
114
113
115
pub fn base_or_custom_action (
0 commit comments