-
Notifications
You must be signed in to change notification settings - Fork 0
Restore FilPag's authoritative coop implementation while preserving approved upstream features #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d2fed9e
04f9e24
2540033
fa920f0
3d3f9c0
49ce21e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -124,6 +124,8 @@ function MP.reset_game_states() | |
| ante_key = tostring(math.random()), | ||
| antes_keyed = {}, | ||
| prevent_eval = false, | ||
| round_ended = false, | ||
| duplicate_end = false, | ||
| misprint_display = "", | ||
| spent_total = 0, | ||
| spent_before_shop = 0, | ||
|
|
@@ -139,22 +141,22 @@ function MP.reset_game_states() | |
| pizza_discards = 0, | ||
| wait_for_enemys_furthest_blind = false, | ||
| disable_live_and_timer_hud = false, | ||
| timers_forgiven = 0, | ||
| stats = { | ||
| reroll_count = 0, | ||
| reroll_cost_total = 0, | ||
| -- Add more stats here in the future | ||
| }, | ||
| } | ||
|
|
||
| MP.LOBBY.ready_text = localize("b_ready") | ||
| MP.LOBBY.ready_to_start = false | ||
| end | ||
|
|
||
| MP.reset_game_states() | ||
|
|
||
| MP.LOBBY.username = MP.UTILS.get_username() | ||
| MP.LOBBY.blind_col = MP.UTILS.get_blind_col() | ||
|
|
||
| MP.LOBBY.config.weekly = MP.UTILS.get_weekly() | ||
|
|
||
| if not SMODS.current_mod.lovely then | ||
| G.E_MANAGER:add_event(Event({ | ||
| no_delete = true, | ||
|
|
@@ -185,6 +187,16 @@ SMODS.Atlas({ | |
|
|
||
| MP.load_mp_dir("compatibility") | ||
|
|
||
| MP.load_mp_file("networking/action_handlers.lua") | ||
|
|
||
| MP.load_mp_dir("ui/components") -- Gamemodes and rulesets need these | ||
|
|
||
| MP.load_mp_dir("rulesets") | ||
| if MP.LOBBY.config.weekly then -- this could be a function but why bother | ||
| MP.load_mp_file("rulesets/weeklies/"..MP.LOBBY.config.weekly..".lua") | ||
| end | ||
| MP.load_mp_dir("gamemodes") | ||
|
|
||
| MP.load_mp_dir("objects/editions") | ||
| MP.load_mp_dir("objects/enhancements") | ||
| MP.load_mp_dir("objects/stickers") | ||
|
|
@@ -193,18 +205,15 @@ MP.load_mp_dir("objects/decks") | |
| MP.load_mp_dir("objects/jokers") | ||
| MP.load_mp_dir("objects/consumables") | ||
| MP.load_mp_dir("objects/challenges") | ||
| MP.load_mp_dir("networking") | ||
| MP.load_mp_dir("gamemodes") | ||
| MP.load_mp_dir("rulesets") | ||
| MP.load_mp_dir("function_overrides") | ||
|
||
| MP.apply_rulesets() | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. keep
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Kept as requested in commit 49ce21e. |
||
|
|
||
| MP.load_mp_dir("ui") | ||
| MP.load_mp_dir("ui/generic") | ||
| MP.load_mp_dir("ui/game") | ||
| MP.load_mp_dir("ui/lobby") | ||
| MP.load_mp_dir("ui/main_menu") | ||
|
|
||
| MP.load_mp_dir("function_overrides") | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed |
||
|
|
||
| MP.load_mp_file("misc/disable_restart.lua") | ||
| MP.load_mp_file("misc/mod_hash.lua") | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,217 @@ | ||
| MP.Gamemode({ | ||
| key = "attrition", | ||
| get_blinds_by_ante = function(self, ante, choices) | ||
| if ante >= MP.LOBBY.config.pvp_start_round then | ||
| if not MP.LOBBY.config.normal_bosses then | ||
| return choices.Small, choices.Big, "bl_mp_nemesis" | ||
| else | ||
| G.GAME.round_resets.pvp_blind_choices.Boss = true | ||
| end | ||
| end | ||
| return choices.Small, choices.Big , choices.Boss | ||
| end, | ||
| key = "attrition", | ||
| get_blinds_by_ante = function(self, ante) | ||
| if ante >= MP.LOBBY.config.pvp_start_round then | ||
| if not MP.LOBBY.config.normal_bosses then | ||
| return nil, nil, "bl_mp_nemesis" | ||
| else | ||
| G.GAME.round_resets.pvp_blind_choices.Boss = true | ||
| end | ||
| end | ||
| return nil, nil, nil | ||
| end, | ||
| banned_jokers = { | ||
| "j_mr_bones", | ||
| "j_luchador", | ||
| "j_matador", | ||
| "j_chicot", | ||
| }, | ||
| banned_consumables = {}, | ||
| banned_vouchers = { | ||
| "v_hieroglyph", | ||
| "v_petroglyph", | ||
| "v_directors_cut", | ||
| "v_retcon", | ||
| }, | ||
| banned_enhancements = {}, | ||
| banned_tags = { | ||
| "tag_boss" | ||
| }, | ||
| banned_blinds = { | ||
| "bl_wall", | ||
| "bl_final_vessel" | ||
| }, | ||
| reworked_jokers = {}, | ||
| reworked_consumables = {}, | ||
| reworked_vouchers = {}, | ||
| reworked_enhancements = {}, | ||
| reworked_tags = {}, | ||
| reworked_blinds = {}, | ||
| create_info_menu = function() | ||
| return { | ||
| { | ||
| n = G.UIT.R, | ||
| config = { | ||
| align = "tm" | ||
| }, | ||
| nodes = { | ||
| { | ||
| n = G.UIT.T, | ||
| config = { | ||
| text = MP.UTILS.wrapText(localize("k_attrition_description"), 70), | ||
| scale = 0.6, | ||
| colour = G.C.UI.TEXT_LIGHT, | ||
| } | ||
| }, | ||
| }, | ||
| }, | ||
| { | ||
| n = G.UIT.R, | ||
| config = { | ||
| minw = 0.2, | ||
| minh = 0.2 | ||
| } | ||
| }, | ||
| { | ||
| n = G.UIT.R, | ||
| config = { | ||
| align = "cm", | ||
| padding = 0.3 | ||
| }, | ||
| nodes = { | ||
| { | ||
| n = G.UIT.C, | ||
| config = { | ||
| align = "cm" | ||
| }, | ||
| nodes = { | ||
| { | ||
| n = G.UIT.R, | ||
| config = { | ||
| align = "cm" | ||
| }, | ||
| nodes = { | ||
| MP.UI.BackgroundGrouping(localize({ type = "variable", key = "k_ante_number", vars = { "1" }}), { | ||
| { | ||
| n = G.UIT.O, | ||
| config = { | ||
| object = MP.UI.BlindChip.small() | ||
| } | ||
| }, | ||
| { | ||
| n = G.UIT.C, | ||
| config = { | ||
| minw = 0.2, | ||
| minh = 0.2 | ||
| } | ||
| }, | ||
| { | ||
| n = G.UIT.O, | ||
| config = { | ||
| object = MP.UI.BlindChip.big() | ||
| } | ||
| }, | ||
| { | ||
| n = G.UIT.C, | ||
| config = { | ||
| minw = 0.2, | ||
| minh = 0.2 | ||
| } | ||
| }, | ||
| { | ||
| n = G.UIT.O, | ||
| config = { | ||
| object = MP.UI.BlindChip.random() | ||
| } | ||
| }, | ||
| }, {text_scale = 0.6}), | ||
| } | ||
| }, | ||
| { | ||
| n = G.UIT.R, | ||
| config = { | ||
| minw = 0.2, | ||
| minh = 0.2 | ||
| } | ||
| }, | ||
| { | ||
| n = G.UIT.R, | ||
| config = { | ||
| align = "cm" | ||
| }, | ||
| nodes = { | ||
| MP.UI.BackgroundGrouping(localize({ type = "variable", key = "k_ante_min", vars = { "2" }}), { | ||
| { | ||
| n = G.UIT.O, | ||
| config = { | ||
| object = MP.UI.BlindChip.small() | ||
| } | ||
| }, | ||
| { | ||
| n = G.UIT.C, | ||
| config = { | ||
| minw = 0.2, | ||
| minh = 0.2 | ||
| } | ||
| }, | ||
| { | ||
| n = G.UIT.O, | ||
| config = { | ||
| object = MP.UI.BlindChip.big() | ||
| } | ||
| }, | ||
| { | ||
| n = G.UIT.C, | ||
| config = { | ||
| minw = 0.2, | ||
| minh = 0.2 | ||
| } | ||
| }, | ||
| { | ||
| n = G.UIT.O, | ||
| config = { | ||
| object = MP.UI.BlindChip.nemesis() | ||
| } | ||
| }, | ||
| }, {text_scale = 0.6}), | ||
| } | ||
| }, | ||
| }, | ||
| }, | ||
| { | ||
| n = G.UIT.C, | ||
| config = { | ||
| align = "cm" | ||
| }, | ||
| nodes = { | ||
| { | ||
| n = G.UIT.R, | ||
| config = { | ||
| align = "cm" | ||
| }, | ||
| nodes = { | ||
| MP.UI.BackgroundGrouping(localize("k_lives"), { | ||
| { | ||
| n = G.UIT.T, | ||
| config = { | ||
| text = "4", | ||
| scale = 1.5, | ||
| colour = G.C.UI.TEXT_LIGHT, | ||
| } | ||
| }, | ||
| }, {text_scale = 0.6}), | ||
| } | ||
| }, | ||
| } | ||
| } | ||
| }, | ||
| }, | ||
| { | ||
| n = G.UIT.R, | ||
| config = { | ||
| align = "bm" | ||
| }, | ||
| nodes = { | ||
| { | ||
| n = G.UIT.T, | ||
| config = { | ||
| text = localize("k_values_are_modifiable"), | ||
| scale = 0.4, | ||
| colour = G.C.UI.TEXT_LIGHT, | ||
| } | ||
| }, | ||
| }, | ||
| }, | ||
| } | ||
| end | ||
| }):inject() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kept as requested in commit 49ce21e.