From 9bb8455ce6eb8fc052ca4ebc224bd0e540fce23b Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Mon, 4 Feb 2019 08:13:46 +0100 Subject: [PATCH] datas: add boost chunk datas --- .../subgame/sonic-boost/chunks/basics.lua | 53 +++++++++++++++++++ .../subgame/sonic-boost/chunks/terrains.lua | 13 +++++ .../subgame/sonic-boost/controller/world.lua | 4 +- 3 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 sonic-boost.love/datas/subgame/sonic-boost/chunks/basics.lua create mode 100644 sonic-boost.love/datas/subgame/sonic-boost/chunks/terrains.lua diff --git a/sonic-boost.love/datas/subgame/sonic-boost/chunks/basics.lua b/sonic-boost.love/datas/subgame/sonic-boost/chunks/basics.lua new file mode 100644 index 0000000..cbd902c --- /dev/null +++ b/sonic-boost.love/datas/subgame/sonic-boost/chunks/basics.lua @@ -0,0 +1,53 @@ +return { + parts = { + [0] = {{"self",{01,00,00,00}}, {"self",{00,00,00,00}}} + }, + chunks = { + [0] = { + terrain = { + {00,00,00,00,00,00,00,00}, + {00,00,00,00,00,00,00,00}, + {00,00,00,00,00,00,00,00}, + {00,00,00,00,00,00,00,00}, + {00,00,00,00,00,00,00,00} + }, + objects = { + {00,00,00,00,00,00,00,00}, + {00,00,00,00,00,00,00,00}, + {00,00,00,00,00,00,00,00}, + {00,00,00,00,00,00,00,00}, + {00,00,00,00,00,00,00,00} + }, + grind = { + {00,00,00,00,00,00,00,00}, + {00,00,00,00,00,00,00,00}, + {00,00,00,00,00,00,00,00}, + {00,00,00,00,00,00,00,00}, + {00,00,00,00,00,00,00,00} + } + }, + [1] = { + terrain = { + {00,00,01,00,00,00,04,03}, + {00,00,00,01,00,00,00,03}, + {00,00,02,02,02,02,02,03}, + {00,00,00,01,00,00,00,03}, + {00,00,01,00,00,00,04,03} + }, + objects = { + {00,00,00,01,01,01,00,00}, + {00,00,00,00,00,00,00,00}, + {00,00,00,00,00,00,00,00}, + {00,00,00,00,00,00,00,00}, + {00,00,00,02,02,02,00,00} + }, + grind = { + {00,00,00,00,00,00,00,00}, + {00,00,00,00,00,00,01,03}, + {00,00,01,02,02,02,03,00}, + {00,00,00,00,00,00,00,00}, + {00,00,00,00,00,00,00,00} + } + }, + } +} diff --git a/sonic-boost.love/datas/subgame/sonic-boost/chunks/terrains.lua b/sonic-boost.love/datas/subgame/sonic-boost/chunks/terrains.lua new file mode 100644 index 0000000..da10e29 --- /dev/null +++ b/sonic-boost.love/datas/subgame/sonic-boost/chunks/terrains.lua @@ -0,0 +1,13 @@ +return { + [0] = { + setDashTo = nil, + changeSpd = false, + max = 1, + acc = 1, + spd = 0, + groundbellow = true, + springPow = 0, + playSFX = nil, + hazard = false, + } +} diff --git a/sonic-boost.love/scenes/subgame/sonic-boost/controller/world.lua b/sonic-boost.love/scenes/subgame/sonic-boost/controller/world.lua index 1061f6c..09485e1 100644 --- a/sonic-boost.love/scenes/subgame/sonic-boost/controller/world.lua +++ b/sonic-boost.love/scenes/subgame/sonic-boost/controller/world.lua @@ -236,7 +236,7 @@ function World:addPart(filename, part) -- Si c'est un autre nom, on charge dans "partdata" la liste des partie de niveau -- du fichier qu'on réfère. - local chunkfile = require("datas.chunks." .. filename) + local chunkfile = require("datas.subgame.sonic-boost.chunks." .. filename) partdata = chunkfile.parts end @@ -271,7 +271,7 @@ function World:addChunk(filename, chunk) if filename == "self" then filename = "basic" end --print("--- Adding chunk id " .. chunk .. " located in " .. filename) - local chunkfile = require("datas.chunks." .. filename) + local chunkfile = require("datas.subgame.sonic-boost.chunks." .. filename) chunkdata = chunkfile.chunks local chunkpos = #self.chunks