mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-17 18:55:10 +00:00
Only allow multiplayer bed skip if everyone's in bed
This commit is contained in:
parent
1eb89599bf
commit
2c282830b6
1 changed files with 2 additions and 2 deletions
|
@ -101,14 +101,14 @@ end
|
|||
local function update_formspecs(finished)
|
||||
local ges = #minetest.get_connected_players()
|
||||
local form_n
|
||||
local is_majority = (ges / 2) < player_in_bed
|
||||
local all_in_bed = ges == player_in_bed
|
||||
|
||||
if finished then
|
||||
form_n = beds.formspec .. "label[2.7,11; Good morning.]"
|
||||
else
|
||||
form_n = beds.formspec .. "label[2.2,11;" .. tostring(player_in_bed) ..
|
||||
" of " .. tostring(ges) .. " players are in bed]"
|
||||
if is_majority and is_night_skip_enabled() then
|
||||
if all_in_bed and is_night_skip_enabled() then
|
||||
form_n = form_n .. "button_exit[2,8;4,0.75;force;Force night skip]"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue