mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
increase safe effect on notplayer to player revive from 60f to 100f, since material damage is dealt with better now, remove homing on both notplayer to player and player to notplayer revive, display who has won in end fight, have hue slider only effect the color with the color picker out, or all if none are out
This commit is contained in:
parent
86505bc2a1
commit
a1cce5d6e6
6 changed files with 47 additions and 26 deletions
|
@ -805,6 +805,26 @@ impl App {
|
|||
ui.style_mut().spacing.slider_width = old;
|
||||
if old_hue != self.appearance.hue {
|
||||
let diff = self.appearance.hue - old_hue;
|
||||
match self.appearance.player_picker {
|
||||
PlayerPicker::PlayerAlt => {
|
||||
shift_hue(diff, &mut self.appearance.player_color.player_alt);
|
||||
}
|
||||
PlayerPicker::PlayerArm => {
|
||||
shift_hue(diff, &mut self.appearance.player_color.player_arm);
|
||||
}
|
||||
PlayerPicker::PlayerCape => {
|
||||
shift_hue(diff, &mut self.appearance.player_color.player_cape);
|
||||
}
|
||||
PlayerPicker::PlayerForearm => {
|
||||
shift_hue(diff, &mut self.appearance.player_color.player_forearm);
|
||||
}
|
||||
PlayerPicker::PlayerCapeEdge => {
|
||||
shift_hue(diff, &mut self.appearance.player_color.player_cape_edge);
|
||||
}
|
||||
PlayerPicker::PlayerMain => {
|
||||
shift_hue(diff, &mut self.appearance.player_color.player_main);
|
||||
}
|
||||
PlayerPicker::None => {
|
||||
shift_hue(diff, &mut self.appearance.player_color.player_main);
|
||||
shift_hue(diff, &mut self.appearance.player_color.player_alt);
|
||||
shift_hue(diff, &mut self.appearance.player_color.player_arm);
|
||||
|
@ -812,6 +832,8 @@ impl App {
|
|||
shift_hue(diff, &mut self.appearance.player_color.player_cape);
|
||||
shift_hue(diff, &mut self.appearance.player_color.player_cape_edge);
|
||||
}
|
||||
}
|
||||
}
|
||||
ui.horizontal(|ui| {
|
||||
display_player_skin(ui, self);
|
||||
player_select_current_color_slot(ui, self);
|
||||
|
|
|
@ -100,6 +100,7 @@ function rpc.try_kill(x, y)
|
|||
end
|
||||
end
|
||||
end)
|
||||
GamePrintImportant(ctx.rpc_player_data.name .. " has won")
|
||||
end
|
||||
|
||||
local function remove_fire(entity)
|
||||
|
|
|
@ -23,6 +23,17 @@ function module.on_player_died(player_entity)
|
|||
-- Also inventory items seem to be borked.
|
||||
end
|
||||
|
||||
rpc.opts_everywhere()
|
||||
function rpc.remove_homing()
|
||||
local x, y = EntityGetTransform(ctx.rpc_player_data.entity)
|
||||
for _, proj in pairs(EntityGetInRadiusWithTag(x, y, 512, "player_projectile")) do
|
||||
local homing = EntityGetFirstComponentIncludingDisabled(proj, "HomingComponent")
|
||||
if homing ~= nil and ComponentGetValue2(homing, "target_tag") ~= "ew_peer" then
|
||||
EntitySetComponentIsEnabled(proj, homing, false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function set_camera_free(enable, entity, dont)
|
||||
local cam = EntityGetFirstComponentIncludingDisabled(entity, "PlatformShooterPlayerComponent")
|
||||
if cam ~= nil then
|
||||
|
@ -147,6 +158,7 @@ local function player_died()
|
|||
if ctx.my_player.entity == nil then
|
||||
return
|
||||
end
|
||||
rpc.remove_homing()
|
||||
-- Serialize inventory, perks, and max_hp, we'll need to copy it over to notplayer.
|
||||
local item_data = inventory_helper.get_item_data(ctx.my_player)
|
||||
remove_inventory()
|
||||
|
@ -317,6 +329,7 @@ ctx.cap.health = {
|
|||
on_poly_death = function()
|
||||
local notplayer_active = GameHasFlagRun("ew_flag_notplayer_active")
|
||||
if notplayer_active then
|
||||
rpc.remove_homing()
|
||||
if GameHasFlagRun("ending_game_completed") and not GameHasFlagRun("ew_kill_player") then
|
||||
return
|
||||
end
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<GameEffectComponent
|
||||
effect="PROTECTION_ALL"
|
||||
frames="60"
|
||||
frames="100"
|
||||
disable_movement="0"
|
||||
>
|
||||
</GameEffectComponent >
|
||||
|
|
|
@ -449,19 +449,6 @@ local function fire_wand(enable)
|
|||
end
|
||||
end
|
||||
|
||||
local rpc = net.new_rpc_namespace()
|
||||
|
||||
rpc.opts_everywhere()
|
||||
function rpc.remove_homing()
|
||||
local x, y = EntityGetTransform(ctx.rpc_player_data.entity)
|
||||
for _, proj in pairs(EntityGetInRadiusWithTag(x, y, 512, "player_projectile")) do
|
||||
local homing = EntityGetFirstComponentIncludingDisabled(proj, "HomingComponent")
|
||||
if homing ~= nil and ComponentGetValue2(homing, "target_tag") ~= "ew_peer" then
|
||||
EntitySetComponentIsEnabled(proj, homing, false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function init_state()
|
||||
EntityAddTag(ctx.my_player.entity, "teleportable")
|
||||
EntityAddComponent2(ctx.my_player.entity, "SpriteComponent", {
|
||||
|
@ -477,7 +464,6 @@ local function init_state()
|
|||
z_index = -10000,
|
||||
emissive = 1,
|
||||
})
|
||||
rpc.remove_homing()
|
||||
local damage_model = EntityGetFirstComponentIncludingDisabled(ctx.my_player.entity, "DamageModelComponent")
|
||||
if ctx.proxy_opt.no_material_damage then
|
||||
ComponentSetValue2(damage_model, "materials_damage", false)
|
||||
|
@ -1234,7 +1220,7 @@ local function find_target()
|
|||
local root_id = ctx.my_player.entity
|
||||
local pos_x, pos_y = EntityGetTransform(root_id)
|
||||
for _, id in pairs(EntityGetInRadiusWithTag(pos_x, pos_y, 256, "mortal")) do
|
||||
if EntityGetComponent(id, "GenomeDataComponent") ~= nil and EntityGetComponent(root_id, "GenomeDataComponent") ~= nil and EntityGetHerdRelation(root_id, id) < -100 then
|
||||
if EntityGetComponent(id, "GenomeDataComponent") ~= nil and EntityGetComponent(root_id, "GenomeDataComponent") ~= nil and EntityGetHerdRelation(root_id, id) < -10 then
|
||||
local t_x, t_y = EntityGetTransform(id)
|
||||
local did_hit, _, _ = RaytracePlatforms(x, y, t_x, t_y)
|
||||
local dx = x - t_x
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
dofile_once("data/scripts/lib/utilities.lua")
|
||||
|
||||
function collision_trigger()
|
||||
if not GameHasFlagRun("ew_flag_this_is_host") then
|
||||
return
|
||||
end
|
||||
|
||||
local entity_id = GetUpdatedEntityID()
|
||||
local pos_x, pos_y = EntityGetTransform( entity_id )
|
||||
if GameHasFlagRun("ew_flag_this_is_host") then
|
||||
EntityLoad( "mods/quant.ew/files/system/patch_dragon_boss/dragon_boss_extra.xml", pos_x, pos_y )
|
||||
end
|
||||
EntityLoad( "data/entities/particles/image_emitters/magical_symbol_fast.xml", pos_x, pos_y )
|
||||
|
||||
EntityKill( entity_id )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue