1
- use std:: time:: Duration ;
2
-
3
1
use serde:: Serialize ;
4
2
5
3
use crate :: game:: attack_power:: DefensePower ;
@@ -104,14 +102,15 @@ impl RoleStateImpl for Politician {
104
102
105
103
if self . state . countdown_started ( ) && actor_ref. alive ( game) {
106
104
//for skipping phases
107
- match phase {
108
- PhaseType :: Briefing | PhaseType :: Nomination | PhaseType :: Testimony |
109
- PhaseType :: Judgement | PhaseType :: FinalWords | PhaseType :: Recess => { }
105
+ // this litterally causes the entire server to crash
106
+ // match phase {
107
+ // PhaseType::Briefing | PhaseType::Nomination | PhaseType::Testimony |
108
+ // PhaseType::Judgement | PhaseType::FinalWords | PhaseType::Recess => {}
110
109
111
- PhaseType :: Obituary | PhaseType :: Discussion | PhaseType :: Dusk | PhaseType :: Night => {
112
- game. phase_machine . time_remaining = Duration :: from_secs ( 0 ) ;
113
- }
114
- }
110
+ // PhaseType::Obituary | PhaseType::Discussion | PhaseType::Dusk | PhaseType::Night => {
111
+ // game.phase_machine.time_remaining = Duration::from_secs(0);
112
+ // }
113
+ // }
115
114
116
115
match phase {
117
116
PhaseType :: Nomination => {
@@ -125,6 +124,7 @@ impl RoleStateImpl for Politician {
125
124
} ,
126
125
_ => { }
127
126
}
127
+
128
128
}
129
129
}
130
130
@@ -192,9 +192,10 @@ impl Politician {
192
192
fn start_countdown ( & mut self , game : & mut Game ) {
193
193
game. add_message_to_chat_group ( ChatGroup :: All , ChatMessageVariant :: PoliticianCountdownStarted ) ;
194
194
195
- if game. current_phase ( ) . phase ( ) != PhaseType :: Nomination {
196
- game. phase_machine . time_remaining = Duration :: from_secs ( 0 ) ;
197
- }
195
+ // causes the entire server to crash
196
+ // if game.current_phase().phase() != PhaseType::Nomination {
197
+ // game.phase_machine.time_remaining = Duration::from_secs(0);
198
+ // }
198
199
self . state = PoliticianState :: CountdownStarted ;
199
200
}
200
201
0 commit comments