@@ -40,25 +40,29 @@ MP.Ruleset = SMODS.GameObject:extend({
4040})
4141
4242function MP .ApplyBans ()
43- if MP .LOBBY .code and MP .LOBBY .config .ruleset then
44- local ruleset = MP .Rulesets [MP .LOBBY .config .ruleset ]
45- local banned_tables = {
46- " jokers" ,
47- " consumables" ,
48- " vouchers" ,
49- " enhancements" ,
50- " tags" ,
51- " blinds" ,
52- }
53- for _ , table in ipairs (banned_tables ) do
54- for _ , v in ipairs (ruleset [" banned_" .. table ]) do
55- G .GAME .banned_keys [v ] = true
56- end
57- for k , v in pairs (MP .DECK [" BANNED_" .. string.upper (table )]) do
58- G .GAME .banned_keys [k ] = true
59- end
60- end
61- end
43+ if MP .LOBBY .code and MP .LOBBY .config .ruleset then
44+ local ruleset = MP .Rulesets [MP .LOBBY .config .ruleset ]
45+ local gamemode = MP .Gamemodes [" gamemode_mp_" .. MP .LOBBY .type ]
46+ local banned_tables = {
47+ " jokers" ,
48+ " consumables" ,
49+ " vouchers" ,
50+ " enhancements" ,
51+ " tags" ,
52+ " blinds" ,
53+ }
54+ for _ , table in ipairs (banned_tables ) do
55+ for _ , v in ipairs (ruleset [" banned_" .. table ]) do
56+ G .GAME .banned_keys [v ] = true
57+ end
58+ for _ , v in ipairs (gamemode [" banned_" .. table ]) do
59+ G .GAME .banned_keys [v ] = true
60+ end
61+ for k , v in pairs (MP .DECK [" BANNED_" .. string.upper (table )]) do
62+ G .GAME .banned_keys [k ] = true
63+ end
64+ end
65+ end
6266end
6367
6468-- This function writes any center rework data to G.P_CENTERS, where they will be used later in its specified ruleset
0 commit comments