diff --git a/noita-proxy/src/lib.rs b/noita-proxy/src/lib.rs index d9e98f3d..95d86ad7 100644 --- a/noita-proxy/src/lib.rs +++ b/noita-proxy/src/lib.rs @@ -87,6 +87,7 @@ pub struct GameSettings { health_lost_on_revive: u32, no_material_damage: bool, global_hp_loss: bool, + perk_ban_list: String, } impl Default for GameSettings { @@ -113,6 +114,7 @@ impl Default for GameSettings { health_lost_on_revive: 0, no_material_damage: false, global_hp_loss: false, + perk_ban_list: String::new(), } } } @@ -802,6 +804,10 @@ impl App { &mut game_settings.randomize_perks, tr("Have-perk-pools-be-independent-of-each-other"), ); + ui.horizontal(|ui| { + ui.text_edit_singleline(&mut game_settings.perk_ban_list); + ui.label("perk ban list, comma seperated"); + }); ui.add( Slider::new(&mut game_settings.enemy_hp_mult, 1.0..=1000.0) .logarithmic(true) diff --git a/noita-proxy/src/net.rs b/noita-proxy/src/net.rs index c36312cb..730eb63a 100644 --- a/noita-proxy/src/net.rs +++ b/noita-proxy/src/net.rs @@ -503,6 +503,7 @@ impl NetManager { state.try_ws_write_option("health_per_player", settings.health_per_player); state.try_ws_write_option("enemy_sync_interval", settings.enemy_sync_interval); state.try_ws_write_option("global_hp_loss", settings.global_hp_loss); + state.try_ws_write_option("perk_ban_list", settings.perk_ban_list.as_str()); state.try_ws_write_option("no_material_damage", settings.no_material_damage); state.try_ws_write_option("health_lost_on_revive", settings.health_lost_on_revive); let rgb = self.init_settings.player_color.player_main; diff --git a/quant.ew/files/core/net_handling.lua b/quant.ew/files/core/net_handling.lua index 81661c1f..15376ac5 100644 --- a/quant.ew/files/core/net_handling.lua +++ b/quant.ew/files/core/net_handling.lua @@ -183,10 +183,11 @@ end function net_handling.proxy.end_run(_, _) local entity = ctx.my_player.entity - if entity ~= nil and EntityGetIsAlive(entity) and not EntityHasTag(entity,"ew_notplayer") then + if entity ~= nil and EntityGetIsAlive(entity) and not EntityHasTag(entity, "ew_notplayer") then EntityInflictDamage(entity, 1000000, "DAMAGE_CURSE", "Run Ended", "NONE", 0, 0, GameGetWorldStateEntity()) end ctx.run_ended = true + EntityKill(entity) GameTriggerGameOver() end diff --git a/quant.ew/files/system/perk_patches/append/perks_common.lua b/quant.ew/files/system/perk_patches/append/perks_common.lua index d936c14c..093e25ec 100644 --- a/quant.ew/files/system/perk_patches/append/perks_common.lua +++ b/quant.ew/files/system/perk_patches/append/perks_common.lua @@ -35,4 +35,8 @@ patch_perk_2("LEGGY_FEET", function(entity_perk_item, entity_who_picked, item_na GameRemoveFlagRun("ATTACK_FOOT_CLIMBER") end orig_fn(entity_perk_item, entity_who_picked, item_name, pickup_count) -end) \ No newline at end of file +end) + +for _, perk in ipairs(util.string_split(ctx.proxy_opt.perk_ban_list)) do + hide_perk(perk) +end \ No newline at end of file