diff --git a/init.lua b/init.lua index f722c7a..e3b944f 100644 --- a/init.lua +++ b/init.lua @@ -38,6 +38,7 @@ quikbild.storage = minetest.get_mod_storage() state_time = 0, artist = nil, word = '', + has_built = {}, word_list = {}, answer_list = {}, win_guesser = '', @@ -48,7 +49,6 @@ quikbild.storage = minetest.get_mod_storage() player_properties = { role = "", - has_built = false, score = 0, lang = 1, kickvotes = 0, diff --git a/minigame_manager.lua b/minigame_manager.lua index 42bd016..a10bab5 100644 --- a/minigame_manager.lua +++ b/minigame_manager.lua @@ -79,7 +79,7 @@ arena_lib.on_time_tick('quikbild', function(arena) --choose the artist local artist_canidates = {} for pl_name,stats in pairs(arena.players) do - if stats.has_built == false then + if arena.has_built[pl_name] ~= true then table.insert(artist_canidates,pl_name) end end @@ -129,7 +129,7 @@ arena_lib.on_time_tick('quikbild', function(arena) local rand_art_idx = math.random(1,#artist_canidates) arena.artist = artist_canidates[rand_art_idx] - arena.players[arena.artist].has_built = true --indicate that they were the artist + arena.has_built[arena.artist] = true --indicate that they were the artist arena.state = 'build_think' --change the arena state so we dont run this code again --send info messages arena_lib.HUD_send_msg("broadcast", arena.artist, S('You are the Artist. Build the word you see'), 4 ,nil,0xFF0000)