From a0f792d8feadf919290b8349dbc0eac143545927 Mon Sep 17 00:00:00 2001 From: _Tradam Date: Mon, 3 Jan 2022 08:26:24 -0500 Subject: Major 4.0 Update (#16) See Changelog --- deprecated/helpers/00_tileset.rb | 28 ++++---- deprecated/helpers/01_component.rb | 131 ++++++++++++++++++------------------- 2 files changed, 77 insertions(+), 82 deletions(-) (limited to 'deprecated/helpers') diff --git a/deprecated/helpers/00_tileset.rb b/deprecated/helpers/00_tileset.rb index c4293cb..9d727f9 100644 --- a/deprecated/helpers/00_tileset.rb +++ b/deprecated/helpers/00_tileset.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Coverage Ignored because the functionality of this # code will not be used for the core of FelFlame. # It will most likely be released as a seperate package @@ -9,39 +11,39 @@ class Helper # If any are missing then it will load them from files @json_data = {} - class < 1 + return {} end - json_tiles = self.get_json_tiles(json_name) - raise Exception.new "Error, json file not a tileset" unless json_tiles['type'] == 'tileset' + json_tiles = get_json_tiles(json_name) + raise StandardError, 'Error, json file not a tileset' unless json_tiles['type'] == 'tileset' return tile_index - json_tiles['tilecount'] if tile_index > json_tiles['tilecount'] - source_height_tiles = (tile_index.to_i / json_tiles['columns'].to_i).to_i# * json_tiles['tileheight'] + + source_height_tiles = (tile_index.to_i / json_tiles['columns'].to_i).to_i # * json_tiles['tileheight'] { w: json_tiles['tilewidth'], h: json_tiles['tileheight'], path: json_tiles['image'].split('mygame/').last.delete('\\'), diff --git a/deprecated/helpers/01_component.rb b/deprecated/helpers/01_component.rb index 2065d0c..12cce09 100644 --- a/deprecated/helpers/01_component.rb +++ b/deprecated/helpers/01_component.rb @@ -1,74 +1,67 @@ +# frozen_string_literal: true + class FelFlame class Helper + # # Unused: + # class Level < FelFlame::Helper::ComponentManager + # class <