wait to close and other quality of life fixes
This commit is contained in:
parent
7f0f8bb5c1
commit
86656c4942
@ -448,6 +448,8 @@ class Game:
|
|||||||
player.game = None
|
player.game = None
|
||||||
if self.disconnect_bot and self.started:
|
if self.disconnect_bot and self.started:
|
||||||
player.is_bot = True
|
player.is_bot = True
|
||||||
|
if len([p for p in self.players if not p.is_bot]) == 0:
|
||||||
|
eventlet.sleep(5)
|
||||||
if len([p for p in self.players if not p.is_bot]) == 0:
|
if len([p for p in self.players if not p.is_bot]) == 0:
|
||||||
print(f'no players left in game {self.name}, shutting down')
|
print(f'no players left in game {self.name}, shutting down')
|
||||||
self.shutting_down = True
|
self.shutting_down = True
|
||||||
|
@ -153,7 +153,7 @@ html {
|
|||||||
#app {
|
#app {
|
||||||
margin: 4pt;
|
margin: 4pt;
|
||||||
margin-top: -16pt;
|
margin-top: -16pt;
|
||||||
zoom: 0.8;
|
zoom: 0.75;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
h1,h2,h3,h4,p,span,b,label{
|
h1,h2,h3,h4,p,span,b,label{
|
||||||
|
@ -17,6 +17,25 @@
|
|||||||
|
|
||||||
<!-- <div class="players-table"> -->
|
<!-- <div class="players-table"> -->
|
||||||
<!-- <div style="position: relative;width:260pt;height:400pt;"> -->
|
<!-- <div style="position: relative;width:260pt;height:400pt;"> -->
|
||||||
|
<!-- :style="p.style"/> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<div v-if="!started">
|
||||||
|
<h3>{{$t("expansions")}}</h3>
|
||||||
|
<div v-for="ex in expansionsStatus" v-bind:key="ex.id">
|
||||||
|
<PrettyCheck @click.native="toggleExpansions(ex.id)" :disabled="!isRoomOwner" :checked="ex.enabled" class="p-switch p-fill" style="margin-top:5px; margin-bottom:3px;">{{ex.name}}</PrettyCheck>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
<h3>{{$t('mods')}}</h3>
|
||||||
|
<PrettyCheck @click.native="toggleCompetitive" :disabled="!isRoomOwner" v-model="is_competitive" class="p-switch p-fill" style="margin-top:5px; margin-bottom:3px;">{{$t('mod_comp')}}</PrettyCheck>
|
||||||
|
<h3>{{$t('bots')}}</h3>
|
||||||
|
<input type="button" class="btn" :value="$t('add_bot')" :disabled="!isRoomOwner || players.length > 7" @click="(e)=>{this.$socket.emit('chat_message', '/addbot'); e.preventDefault()}"/>
|
||||||
|
<input type="button" class="btn" style="margin-left: 10pt;" :value="$t('remove_bot')" :disabled="!isRoomOwner || !isThereAnyBot" @click="(e)=>{this.$socket.emit('chat_message', '/removebot'); e.preventDefault()}"/>
|
||||||
|
<!-- <br> -->
|
||||||
|
<!-- <PrettyCheck @click.native="toggleReplaceWithBot" :disabled="!isRoomOwner" v-model="disconnect_bot" class="p-switch p-fill" style="margin-top:5px; margin-bottom:3px;">{{$t('disconnect_bot')}}</PrettyCheck> -->
|
||||||
|
<p v-if="players.length < 3" class="center-stuff" style="min-height: 19px;">{{$t('minimum_players')}}</p>
|
||||||
|
<p v-else style="min-height: 19px;"> </p>
|
||||||
|
</div>
|
||||||
<transition-group name="list" tag="div" class="players-table">
|
<transition-group name="list" tag="div" class="players-table">
|
||||||
<Card v-if="startGameCard" key="_start_game_" :donotlocalize="true" :card="startGameCard" @click.native="startGame"/>
|
<Card v-if="startGameCard" key="_start_game_" :donotlocalize="true" :card="startGameCard" @click.native="startGame"/>
|
||||||
<div v-for="p in playersTable" v-bind:key="p.card.name" style="position:relative;">
|
<div v-for="p in playersTable" v-bind:key="p.card.name" style="position:relative;">
|
||||||
@ -42,25 +61,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</transition-group>
|
</transition-group>
|
||||||
<!-- :style="p.style"/> -->
|
|
||||||
<!-- </div> -->
|
|
||||||
<!-- </div> -->
|
|
||||||
<div v-if="!started">
|
|
||||||
<p v-if="players.length < 3" class="center-stuff" style="min-height: 19px;">{{$t('minimum_players')}}</p>
|
|
||||||
<p v-else style="min-height: 19px;"> </p>
|
|
||||||
<h3>{{$t("expansions")}}</h3>
|
|
||||||
<div v-for="ex in expansionsStatus" v-bind:key="ex.id">
|
|
||||||
<PrettyCheck @click.native="toggleExpansions(ex.id)" :disabled="!isRoomOwner" :checked="ex.enabled" class="p-switch p-fill" style="margin-top:5px; margin-bottom:3px;">{{ex.name}}</PrettyCheck>
|
|
||||||
<br>
|
|
||||||
</div>
|
|
||||||
<h3>{{$t('mods')}}</h3>
|
|
||||||
<PrettyCheck @click.native="toggleCompetitive" :disabled="!isRoomOwner" v-model="is_competitive" class="p-switch p-fill" style="margin-top:5px; margin-bottom:3px;">{{$t('mod_comp')}}</PrettyCheck>
|
|
||||||
<h3>{{$t('bots')}}</h3>
|
|
||||||
<input type="button" class="btn" :value="$t('add_bot')" :disabled="!isRoomOwner || players.length > 7" @click="(e)=>{this.$socket.emit('chat_message', '/addbot'); e.preventDefault()}"/>
|
|
||||||
<input type="button" class="btn" style="margin-left: 10pt;" :value="$t('remove_bot')" :disabled="!isRoomOwner || !isThereAnyBot" @click="(e)=>{this.$socket.emit('chat_message', '/removebot'); e.preventDefault()}"/>
|
|
||||||
<!-- <br> -->
|
|
||||||
<!-- <PrettyCheck @click.native="toggleReplaceWithBot" :disabled="!isRoomOwner" v-model="disconnect_bot" class="p-switch p-fill" style="margin-top:5px; margin-bottom:3px;">{{$t('disconnect_bot')}}</PrettyCheck> -->
|
|
||||||
</div>
|
|
||||||
<div v-if="started">
|
<div v-if="started">
|
||||||
<deck :endTurnAction="()=>{wantsToEndTurn = true}"/>
|
<deck :endTurnAction="()=>{wantsToEndTurn = true}"/>
|
||||||
<player :isEndingTurn="wantsToEndTurn" :cancelEndingTurn="()=>{wantsToEndTurn = false}" :chooseCardFromPlayer="choose" :cancelChooseCardFromPlayer="()=>{hasToChoose=false}"/>
|
<player :isEndingTurn="wantsToEndTurn" :cancelEndingTurn="()=>{wantsToEndTurn = false}" :chooseCardFromPlayer="choose" :cancelChooseCardFromPlayer="()=>{hasToChoose=false}"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user