pub struct PlayerRecord {
pub u: PlayerUpdates,
- pub ipl: IPlayerState,
+ pub ipl: IPlayer,
pub account: Arc<AccountName>,
}
#[derive(Debug,Clone,Serialize,Deserialize)]
-pub struct IPlayerState {
+pub struct IPlayer {
pub acctid: AccountId,
pub tokens_revealed: HashMap<TokenRevelationKey, TokenRevelationValue>,
pub tz: Timezone,
struct InstanceSaveAccesses<RawTokenStr, PiecesLoadedRef> {
ipieces: PiecesLoadedRef,
tokens_players: Vec<(RawTokenStr, PlayerId)>,
- aplayers: SecondarySlotMap<PlayerId, IPlayerState>,
+ aplayers: SecondarySlotMap<PlayerId, IPlayer>,
acl: Acl<TablePermission>,
#[serde(default)] pub links: Arc<LinksTable>,
}
/// caller is responsible for logging; threading it through
/// proves the caller has a log entry.
#[throws(MgmtError)]
- pub fn player_new(&mut self, gnew: GPlayer, inew: IPlayerState,
+ pub fn player_new(&mut self, gnew: GPlayer, inew: IPlayer,
account: Arc<AccountName>, logentry: LogEntry)
-> (PlayerId, PreparedUpdateEntry, LogEntry) {
// saving is fallible, but we can't attempt to save unless
pub fn players_remove(&mut self, old_players_set: &HashSet<PlayerId>)
->
Result<Vec<
- (Option<GPlayer>, Option<IPlayerState>, PreparedUpdateEntry)
+ (Option<GPlayer>, Option<IPlayer>, PreparedUpdateEntry)
>, InternalError>
{
// We have to filter this player out of everything
ag: &AccountsGuard,
g: &Instance,
gpl: &GPlayer,
- ipl: &IPlayerState,
+ ipl: &IPlayer,
token: AccessTokenInfo)
-> Result<AccessTokenReport, TDE>;
fn describe_html(&self) -> Html {
_ag: &AccountsGuard,
_g: &Instance,
_gpl: &GPlayer,
- _ipl: &IPlayerState,
+ _ipl: &IPlayer,
_token: AccessTokenInfo) -> AccessTokenReport {
AccessTokenReport { lines: vec![
"Player access not set, game not accessible to this player"
_ag: &AccountsGuard,
_g: &Instance,
_gpl: &GPlayer,
- _ipl: &IPlayerState,
+ _ipl: &IPlayer,
_token: AccessTokenInfo) -> AccessTokenReport {
AccessTokenReport { lines: vec![ "Fixed access token".to_string() ] }
}
_ag: &AccountsGuard,
_g: &Instance,
_gpl: &GPlayer,
- _ipl: &IPlayerState,
+ _ipl: &IPlayer,
token: AccessTokenInfo)
-> AccessTokenReport {
AccessTokenReport { lines: token.report() }
ag: &AccountsGuard,
g: &Instance,
gpl: &GPlayer,
- ipl: &IPlayerState,
+ ipl: &IPlayer,
token: AccessTokenInfo)
-> AccessTokenReport {
let sendmail = &config().sendmail;