diff --git a/arena.lua b/arena.lua index 52309c5..3b6c629 100644 --- a/arena.lua +++ b/arena.lua @@ -545,7 +545,7 @@ function Arena:quit() trigger:after(2.5, function() self.build_text = Text2{group = self.ui, x = 40, y = 20, force_update = true, lines = {{text = "[wavy_mid, fg]your build", font = pixul_font, alignment = 'center'}}} for i, unit in ipairs(self.units) do - CharacterPart{group = self.ui, x = 40, y = 40 + (i-1)*19, character = unit.character, level = unit.level, force_update = true, parent = self} + CharacterPart{group = self.ui, x = 40, y = 40 + (i-1)*19, character = unit.character, level = unit.level, force_update = true, cant_click = true, parent = self} end if new_game_plus == 5 then diff --git a/buy_screen.lua b/buy_screen.lua index f67634c..a448e47 100644 --- a/buy_screen.lua +++ b/buy_screen.lua @@ -863,6 +863,8 @@ end function CharacterPart:update(dt) self:update_game_object(dt) + if self.cant_click then return end + if not self.parent:is(CharacterPart) then if input.m1.pressed and self.colliding_with_mouse then self.grabbed = true diff --git a/engine/graphics/camera.lua b/engine/graphics/camera.lua index edb1419..679e601 100644 --- a/engine/graphics/camera.lua +++ b/engine/graphics/camera.lua @@ -306,7 +306,7 @@ end -- Higher frequency means jerkier movement, lower frequency means smoother movement -- camera:shake(10, 1, 120) -> shakes the camera with 10 intensity for 1 second and 120 frequency function Camera:shake(intensity, duration, frequency) - if state.no_camera_shake then return end + if state.no_screen_shake then return end table.insert(self.shakes.x, Shake(intensity, 1000*(duration or 0), frequency or 60)) table.insert(self.shakes.y, Shake(intensity, 1000*(duration or 0), frequency or 60)) end @@ -316,7 +316,7 @@ end -- k and d are stiffness and damping spring values (see spring file for more) -- camera:shake(10, math.pi/4) -> shakes the camera with 10 intensity diagonally function Camera:spring_shake(intensity, r, k, d) - if state.no_camera_shake then return end + if state.no_screen_shake then return end self.spring.x:pull(-intensity*math.cos(r or 0), k, d) self.spring.y:pull(-intensity*math.sin(r or 0), k, d) end diff --git a/main.lua b/main.lua index a243fcd..c7eb3a0 100644 --- a/main.lua +++ b/main.lua @@ -1175,7 +1175,7 @@ function init() main = Main() - if run.level ~= 0 then + if run.level and run.level > 0 then main_song_instance = _G[random:table{'song1', 'song2', 'song3', 'song4', 'song5'}]:play{volume = 0.5} end