fix teleportitus on notplayer

This commit is contained in:
bgkillas 2024-10-29 12:56:17 -04:00
parent 072d3cf17c
commit a676ab07ea
3 changed files with 14 additions and 4 deletions

View file

@ -12,8 +12,6 @@ local perks_to_ignore = {
PERKS_LOTTERY = true,
REMOVE_FOG_OF_WAR = true,
MEGA_BEAM_STONE = true,
TELEPORTITIS = true,
TELEPORTITIS_DODGE = true,
ALWAYS_CAST = true,
EXTRA_SLOTS = true,
EXTRA_PERK = true,

View file

@ -139,8 +139,6 @@ local function allow_notplayer_perk(perk_id)
LUKKI_MINION = true,
CONTACT_DAMAGE = true,
FOOD_CLOCK = true, -- TODO, should carry over satiation buff
TELEPORTITIS = true, -- TODO: teleports to 0,0
TELEPORTITIS_DODGE = true,
}
return not ignored_perks[perk_id]
end

View file

@ -477,6 +477,20 @@ function rpc.remove_homing()
end
local function init_state()
EntityAddTag(ctx.my_player.entity, "teleportable")
EntityAddComponent2(ctx.my_player.entity, "SpriteComponent", {
_tags = "aiming_reticle",
alpha = 1,
image_file = "data/ui_gfx/mouse_cursor.png",
ui_is_parent = 0,
offset_x = 6,
offset_y = 35,
has_special_scale = 1,
special_scale_x = 1,
special_scale_y = 1,
z_index = -10000,
emissive = 1,
})
rpc.remove_homing()
if ctx.proxy_opt.no_material_damage then
local damage_model = EntityGetFirstComponentIncludingDisabled(ctx.my_player.entity, "DamageModelComponent")