diff --git a/sonic-radiance.love/core/modules/world/baseworld.lua b/sonic-radiance.love/core/modules/world/baseworld.lua index e608183..04b40b0 100644 --- a/sonic-radiance.love/core/modules/world/baseworld.lua +++ b/sonic-radiance.love/core/modules/world/baseworld.lua @@ -189,7 +189,7 @@ function BaseWorld:registerBody(body) end function BaseWorld:updateBody(body) - return x, y, {}, 0 + return self.x, self.y, {}, 0 end function BaseWorld:removeBody(body) @@ -239,7 +239,7 @@ function BaseWorld:addPlayer(x, y, z, id) local player = {} if id <= self.playerNumber then player.actor = self:newPlayer(x, y, z) - player.sourceid = sourceid or 1 + player.sourceid = id or 1 table.insert(self.players, player) diff --git a/sonic-radiance.love/core/utils/graphics.lua b/sonic-radiance.love/core/utils/graphics.lua index 925ddbe..9a90841 100644 --- a/sonic-radiance.love/core/utils/graphics.lua +++ b/sonic-radiance.love/core/utils/graphics.lua @@ -83,7 +83,6 @@ function Graphics.box(x, y, w, h) local y = math.floor(y) local w = math.floor(w) local h = math.floor(h) - local a = a or 1 local r, g, b, a = love.graphics.getColor( ) diff --git a/sonic-radiance.love/core/utils/math.lua b/sonic-radiance.love/core/utils/math.lua index 6b6624c..151c525 100644 --- a/sonic-radiance.love/core/utils/math.lua +++ b/sonic-radiance.love/core/utils/math.lua @@ -113,7 +113,7 @@ function Math.numberToString(x, length) local string = "" local x = x if (x >= math.pow(10, length)) then - x = unitsNumber*10 - 1 + x = length*10 - 1 string = string .. x else for i=1, (length-1) do diff --git a/sonic-radiance.love/game/modules/drawing/parallaxBackground.lua b/sonic-radiance.love/game/modules/drawing/parallaxBackground.lua index c190e21..4a7c370 100644 --- a/sonic-radiance.love/game/modules/drawing/parallaxBackground.lua +++ b/sonic-radiance.love/game/modules/drawing/parallaxBackground.lua @@ -27,7 +27,7 @@ function ParallaxBackground:new(scene, height, bottomBorder, type) self.assets:addImage("cliff", backpath .. "-cliff.png") self.texture = {} - self.texture.floor = self:generateFloor(tile) + self.texture.floor = self:generateFloor(datas.tiles) end -- GET FUNCTIONS diff --git a/sonic-radiance.love/game/modules/gui/init.lua b/sonic-radiance.love/game/modules/gui/init.lua index fde1473..8391e28 100644 --- a/sonic-radiance.love/game/modules/gui/init.lua +++ b/sonic-radiance.love/game/modules/gui/init.lua @@ -54,6 +54,7 @@ function gui.newChoiceBack(approximateWidth) local iterations = math.floor((approximateWidth / 12) - 4) local width = (iterations * 12) + local height = 16 local canvasWidth = width + 21 + 25 local canvas = love.graphics.newCanvas(canvasWidth, height) diff --git a/sonic-radiance.love/game/modules/world/maps/shoot.lua b/sonic-radiance.love/game/modules/world/maps/shoot.lua index a637c19..e92f7cf 100644 --- a/sonic-radiance.love/game/modules/world/maps/shoot.lua +++ b/sonic-radiance.love/game/modules/world/maps/shoot.lua @@ -27,7 +27,7 @@ function ShootMap:updateWidth() end function ShootMap:getLevelData(mapname) - local file = file or "testlevel.test1" + local file = mapname or "testlevel.test1" local level = require("datas.gamedata.maps.shoot." .. file) self.zone = level.datas.zone diff --git a/sonic-radiance.love/game/utils/battle/init.lua b/sonic-radiance.love/game/utils/battle/init.lua index bd964cc..fdd19c6 100644 --- a/sonic-radiance.love/game/utils/battle/init.lua +++ b/sonic-radiance.love/game/utils/battle/init.lua @@ -18,7 +18,7 @@ function BattleUtils.getCategoryDirectory(directory, lua) end function BattleUtils.getDirectoryLuaStyle(directory) - return REQUIREDIR .. "." .. directory + return DIR .. "." .. directory end function BattleUtils.getBattleFromCategory(directory) diff --git a/sonic-radiance.love/scenes/battlesystem/actors/battler.lua b/sonic-radiance.love/scenes/battlesystem/actors/battler.lua index 3529c59..e07aa13 100644 --- a/sonic-radiance.love/scenes/battlesystem/actors/battler.lua +++ b/sonic-radiance.love/scenes/battlesystem/actors/battler.lua @@ -178,7 +178,7 @@ end function Battler:setJump(power, bounceNumber, useDefaultAnimation) self.zspeed = power - self.jump.spin = spinjump + self.jump.spin = (useDefaultAnimation == false) self.jump.bounceNumber = bounceNumber self.jump.isJumping = true end diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/parent.lua b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/parent.lua index f8e54fd..fcdcce5 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/parent.lua +++ b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/parent.lua @@ -60,10 +60,10 @@ function FighterParent:sendDamage(target, value, accuracy, isSpecial, isAerial) core.debug:print("cbs/battler", "Sending " .. value .." damage at " .. target.name) - target:receiveDamage(value, accuracy, isSpecial, isAerial, fromWho) + target:receiveDamage(value, accuracy, isSpecial, isAerial, self) end -function FighterParent:receiveDamage(value, accuracy, isSpecial, isAerial) +function FighterParent:receiveDamage(value, accuracy, isSpecial, isAerial, fromWho) local stats = self:getStats() if (isSpecial) then @@ -127,7 +127,7 @@ end function FighterParent:getUniqueIdentificator() local side = 1 - if (isHero == false) then + if (self.isHero == false) then side = -1 end return self.id * side diff --git a/sonic-radiance.love/scenes/menus/options/widgets.lua b/sonic-radiance.love/scenes/menus/options/widgets.lua index a0bc19c..7307bc7 100644 --- a/sonic-radiance.love/scenes/menus/options/widgets.lua +++ b/sonic-radiance.love/scenes/menus/options/widgets.lua @@ -81,7 +81,7 @@ function widgets.Switch:new(scene, menu, keyname, label) self.keyname = keyname local label2 = self:getLabel() widgets.Switch.super.new(self, scene, menu, label, label2) - self.order = order or 0 + self.order = 0 end function widgets.Switch:modifyKey()