diff options
| author | _Tradam <[email protected]> | 2021-05-26 02:12:54 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-05-26 02:12:54 -0400 |
| commit | 41f574c04c70e6327cb1861fac01664bd3f3f7ba (patch) | |
| tree | 34a184ff4fd182a8823f416fd87b4d546e1e250f /app/lib/systems/00_update_levels.rb | |
| parent | f97a9ca95e464e728bba9337b579bc380c33bc7d (diff) | |
| parent | a5bbcbf5d78005746fb64c51a779f830d7667a57 (diff) | |
| download | typemon-code-master.tar.gz typemon-code-master.zip | |
split off FelFlame
Diffstat (limited to 'app/lib/systems/00_update_levels.rb')
| -rw-r--r-- | app/lib/systems/00_update_levels.rb | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/app/lib/systems/00_update_levels.rb b/app/lib/systems/00_update_levels.rb deleted file mode 100644 index 6f3a056..0000000 --- a/app/lib/systems/00_update_levels.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Systems - class UpdateLevels - @co = Components::Overworld - def self.run - @co.data[:add].each do |id| - @co.data[:add].delete(id) - if !(Components::Sprite.id & Entity.signatures[id]).zero? - @co.data[:grid][@co.data[id].x][@co.data[id].y] = {} if @co.data[:grid][@co.data[id].x][@co.data[id].y].nil? - #@co.data[:grid][@co.data[id].x][@co.data[id].y].merge!({ player: true }) - puts @co.data[:grid][@co.data[id].x][@co.data[id].y].inspect - elsif !(Components::Map.id & Entity.signatures[id]).zero? - if Components::Map.data[id].json['tilesets'].last['source'].split('/').last.delete('\\').delete_suffix('.tsx') == 'hitbox' - Components::Map.data[id].json['layers'].each do |layer| - layer['chunks'].each do |chunk| - chunk['data'].each_slice(chunk['width']).with_index do |row, row_index| - row.each_with_index do |tile, column_index| - if tile.to_i == Components::Map.data[id].json['tilesets'].last['firstgid'].to_i - @co.data[:grid][column_index][row_index] = {} if @co.data[:grid][column_index][row_index].nil? - @co.data[:grid][column_index][row_index].merge!({ hitbox: true }) - end - end - end - end - end - end - end - puts @co.data[:grid] - end - Components::Overworld.data[:remove].each do |id| - Components::Overworld.data[:remove].delete(id) - end - end - end -end |
