local mod = get_mod("Bubblelicious")

mod.voicelines = {}

-- list of personalities & shield failing voicelines
-- *disabled voicelines that say "shield is dead" for example*
local voicelines = {
    ["psyker_female_a"] = { -- female loner
        "loc_psyker_female_a__ability_protectorate_stop_01", -- cannot, hold it
        "loc_psyker_female_a__ability_protectorate_stop_02", -- shield..failing
        "loc_psyker_female_a__ability_protectorate_stop_03", -- the shield is falling
        "loc_psyker_female_a__ability_protectorate_stop_04", -- cannot, keep going
        "loc_psyker_female_a__ability_protectorate_stop_05", -- I cannot do this all day
        "loc_psyker_female_a__ability_protectorate_stop_06", -- it's going! IT'S GOING!
        --"loc_psyker_female_a__ability_protectorate_stop_07", -- shield is down ##DISABLED
        "loc_psyker_female_a__ability_protectorate_stop_08", -- I can't..(sigh)
    },
    ["psyker_female_b"] = { -- female seer
        "loc_psyker_female_b__ability_protectorate_stop_01", -- can't go on!
        "loc_psyker_female_b__ability_protectorate_stop_02", -- oh no! it's coming apart
        "loc_psyker_female_b__ability_protectorate_stop_03", -- the shield's failing
        "loc_psyker_female_b__ability_protectorate_stop_04", -- the shield's going
        "loc_psyker_female_b__ability_protectorate_stop_05", -- I can't dream this shield forever
        "loc_psyker_female_b__ability_protectorate_stop_06", -- falling. falling. falling sorry!
        "loc_psyker_female_b__ability_protectorate_stop_07", -- oh no! my shield!
        --"loc_psyker_female_b__ability_protectorate_stop_08", -- shield's gone, don't yell at me! ##DISABLED
    },
    ["psyker_female_c"] = { -- female savant
        "loc_psyker_female_c__ability_protectorate_stop_01", -- shield..falling!
        "loc_psyker_female_c__ability_protectorate_stop_02", -- cannot..keep going! (sigh)
        "loc_psyker_female_c__ability_protectorate_stop_03", -- aegis faltering
        "loc_psyker_female_c__ability_protectorate_stop_04", -- aegis..failing!
        "loc_psyker_female_c__ability_protectorate_stop_05", -- collapse imminent
        "loc_psyker_female_c__ability_protectorate_stop_06", -- shield's going (sigh)
        "loc_psyker_female_c__ability_protectorate_stop_07", -- I cannot maintain this!
        --"loc_psyker_female_c__ability_protectorate_stop_08", -- Aegis cannot hold! ##DISABLED
    },
    ["psyker_male_a"] = { -- male loner
        "loc_psyker_male_a__ability_protectorate_stop_01", -- cannot hold it (sigh)
        "loc_psyker_male_a__ability_protectorate_stop_02", -- shield failing (sigh)
        "loc_psyker_male_a__ability_protectorate_stop_03", -- the shield is failing
        "loc_psyker_male_a__ability_protectorate_stop_04", -- cannot keep going (sigh)
        "loc_psyker_male_a__ability_protectorate_stop_05", -- I cannot do this all day!
        "loc_psyker_male_a__ability_protectorate_stop_06", -- it's going! IT'S GOING!
        --"loc_psyker_male_a__ability_protectorate_stop_07", -- shield is down! ##DISABLED
        "loc_psyker_male_a__ability_protectorate_stop_08", -- I can't! (sigh)
    },
    ["psyker_male_b"] = { -- male seer
        "loc_psyker_male_b__ability_protectorate_stop_01", -- can't go on!
        "loc_psyker_male_b__ability_protectorate_stop_02", -- oh no! it's coming apart!
        "loc_psyker_male_b__ability_protectorate_stop_03", -- the shield's failing!
        "loc_psyker_male_b__ability_protectorate_stop_04", -- the shield's going!
        "loc_psyker_male_b__ability_protectorate_stop_05", -- I can't dream this shield forever
        "loc_psyker_male_b__ability_protectorate_stop_06", -- falling. falling. falling. sorry
        "loc_psyker_male_b__ability_protectorate_stop_07", -- oh, no! my shield!
        --"loc_psyker_male_b__ability_protectorate_stop_08", -- shield's gone. don't yell at me! ##DISABLED
    },
    ["psyker_male_c"] = { -- male savant
        "loc_psyker_male_c__ability_protectorate_stop_01", -- (sigh) shield falling
        "loc_psyker_male_c__ability_protectorate_stop_02", -- cannot keep going
        "loc_psyker_male_c__ability_protectorate_stop_03", -- aegis faltering
        "loc_psyker_male_c__ability_protectorate_stop_04", -- aegis failing
        "loc_psyker_male_c__ability_protectorate_stop_05", -- collapse imminent
        "loc_psyker_male_c__ability_protectorate_stop_06", -- shield's going!
        "loc_psyker_male_c__ability_protectorate_stop_07", -- I cannot maintain this!
        --"loc_psyker_male_c__ability_protectorate_stop_08", -- aegis cannot hold ##DISABLED
    },
}


local get_catlen = function(vline_table, char_personality)
    return #vline_table[char_personality]
end

local get_char_personality = function()
	return Managers.player:local_player(1):profile().selected_voice
end

-- get random voice line matching current personality
mod.voicelines.get_random_voice_line = function()
    return voicelines[get_char_personality()][math.random(7)]
end