From aa30ff73d00add3c9f0af7a3cd0e1f050efdfe37 Mon Sep 17 00:00:00 2001 From: cyberarm Date: Wed, 2 Dec 2020 17:29:01 -0600 Subject: [PATCH] Rubocop autocorrect frozen string literal cop --- Gemfile | 1 + Rakefile | 1 + _background_menu_test.rb | 1 + assets/base/door/scripts/door.rb | 1 + assets/base/power_plant/scripts/power_plant.rb | 1 + assets/base/shared/scripts/vehicle.rb | 1 + assets/base/war_factory/scripts/war_factory.rb | 1 + i-mic-fps-server.rb | 1 + i-mic-fps.rb | 1 + lib/camera_controller.rb | 1 + lib/common_methods.rb | 1 + lib/component.rb | 1 + lib/components/building.rb | 1 + lib/constants.rb | 1 + lib/crosshair.rb | 1 + lib/demo.rb | 1 + lib/event.rb | 1 + lib/event_handler.rb | 1 + lib/event_handlers/entity_lifecycle.rb | 1 + lib/event_handlers/entity_moved.rb | 1 + lib/event_handlers/input.rb | 1 + lib/ext/load_opengl.rb | 1 + lib/ext/numeric.rb | 1 + lib/game_objects/entities/editor.rb | 1 + lib/game_objects/entities/player.rb | 1 + lib/game_objects/entities/skydome.rb | 1 + lib/game_objects/entities/terrain.rb | 1 + lib/game_objects/entity.rb | 1 + lib/game_objects/particle_emitter.rb | 1 + lib/hud.rb | 1 + lib/hud/widget.rb | 1 + lib/hud/widgets/ammo.rb | 1 + lib/hud/widgets/chat_history.rb | 1 + lib/hud/widgets/crosshair.rb | 1 + lib/hud/widgets/health.rb | 1 + lib/hud/widgets/radar.rb | 1 + lib/hud/widgets/score_board.rb | 1 + lib/hud/widgets/squad.rb | 1 + lib/managers/collision_manager.rb | 1 + lib/managers/entity_manager.rb | 1 + lib/managers/input_mapper.rb | 1 + lib/managers/light_manager.rb | 1 + lib/managers/physics_manager.rb | 1 + lib/managers/sound_manager.rb | 1 + lib/manifest.rb | 1 + lib/map.rb | 1 + lib/map_parser.rb | 1 + lib/networking.rb | 1 + lib/networking/backend/channel.rb | 1 + lib/networking/backend/connection.rb | 1 + lib/networking/backend/packet.rb | 1 + lib/networking/backend/packet_handler.rb | 1 + lib/networking/backend/packets/control_packet.rb | 1 + lib/networking/backend/packets/raw_packet.rb | 1 + lib/networking/backend/packets/reliable_packet.rb | 1 + lib/networking/backend/peer.rb | 1 + lib/networking/backend/protocol.rb | 1 + lib/networking/backend/server.rb | 1 + lib/networking/connection.rb | 1 + lib/networking/director.rb | 1 + lib/networking/events.rb | 1 + lib/networking/packet_handler.rb | 1 + lib/networking/packet_handlers/snapshot.rb | 1 + lib/networking/read_buffer.rb | 1 + lib/networking/server.rb | 1 + lib/overlay.rb | 1 + lib/publisher.rb | 1 + lib/scene.rb | 1 + lib/scenes/turn_table.rb | 1 + lib/scripting.rb | 1 + lib/scripting/sandbox.rb | 1 + lib/scripting/whitelist.rb | 1 + lib/sound_effect.rb | 1 + lib/sound_effects/fade_in.rb | 1 + lib/sound_effects/fade_in_and_out.rb | 1 + lib/sound_effects/fade_out.rb | 1 + lib/sound_effects/shield_regen.rb | 1 + lib/states/game_state.rb | 1 + lib/states/game_states/boot.rb | 1 + lib/states/game_states/close.rb | 1 + lib/states/game_states/game.rb | 1 + lib/states/game_states/loading_state.rb | 1 + lib/subscription.rb | 1 + lib/tools/asset_viewer.rb | 1 + lib/tools/asset_viewer/lib/main_menu.rb | 1 + lib/tools/asset_viewer/lib/turn_table.rb | 1 + lib/tools/map_editor.rb | 1 + lib/tools/map_editor/lib/editor.rb | 1 + lib/tools/map_editor/lib/main_menu.rb | 1 + lib/trees/aabb_node.rb | 1 + lib/trees/aabb_tree.rb | 1 + lib/trees/aabb_tree_debug.rb | 1 + lib/ui/command.rb | 1 + lib/ui/commands/connect_command.rb | 1 + lib/ui/commands/debug_command.rb | 1 + lib/ui/commands/disconnect_command.rb | 1 + lib/ui/commands/fps_command.rb | 1 + lib/ui/commands/help_command.rb | 1 + lib/ui/commands/reload_shader_command.rb | 1 + lib/ui/commands/renderer_info_command.rb | 1 + lib/ui/console.rb | 1 + lib/ui/menu.rb | 1 + lib/ui/menus/extras_menu.rb | 1 + lib/ui/menus/game_pause_menu.rb | 1 + lib/ui/menus/level_select_menu.rb | 1 + lib/ui/menus/main_menu.rb | 1 + lib/ui/menus/multiplayer_menu.rb | 1 + lib/ui/menus/multiplayer_profile_menu.rb | 1 + lib/ui/menus/multiplayer_server_browser_menu.rb | 1 + lib/ui/menus/settings_menu.rb | 1 + lib/ui/subcommand.rb | 1 + lib/version.rb | 1 + lib/window.rb | 1 + new_server_test.rb | 1 + rakelib/release.rake | 1 + rakelib/test.rake | 1 + 116 files changed, 116 insertions(+) diff --git a/Gemfile b/Gemfile index 3534d64..035b77c 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,4 @@ +# frozen_string_literal: true source "https://rubygems.org" gem "rake" gem "opengl-bindings", require: "opengl" diff --git a/Rakefile b/Rakefile index 68e4fef..22f6095 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "json" require "tmpdir" require "fileutils" diff --git a/_background_menu_test.rb b/_background_menu_test.rb index a2dd0ae..1f787df 100644 --- a/_background_menu_test.rb +++ b/_background_menu_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true begin require_relative "../cyberarm_engine/lib/cyberarm_engine" rescue LoadError diff --git a/assets/base/door/scripts/door.rb b/assets/base/door/scripts/door.rb index 0ca54c5..3ad7f4b 100644 --- a/assets/base/door/scripts/door.rb +++ b/assets/base/door/scripts/door.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true origin = entity.position on.entity_moved do |event| diff --git a/assets/base/power_plant/scripts/power_plant.rb b/assets/base/power_plant/scripts/power_plant.rb index 4df26d2..a226093 100644 --- a/assets/base/power_plant/scripts/power_plant.rb +++ b/assets/base/power_plant/scripts/power_plant.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true component(:building) on.create do |event| diff --git a/assets/base/shared/scripts/vehicle.rb b/assets/base/shared/scripts/vehicle.rb index 3f331fe..915b8ba 100644 --- a/assets/base/shared/scripts/vehicle.rb +++ b/assets/base/shared/scripts/vehicle.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true component(:vehicle) # Generic, Weapon on.button_down(:interact) do |event| diff --git a/assets/base/war_factory/scripts/war_factory.rb b/assets/base/war_factory/scripts/war_factory.rb index 7af7117..8cdbb0b 100644 --- a/assets/base/war_factory/scripts/war_factory.rb +++ b/assets/base/war_factory/scripts/war_factory.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true component(:building) on.create do |event| diff --git a/i-mic-fps-server.rb b/i-mic-fps-server.rb index 7db6a2d..2ea5225 100644 --- a/i-mic-fps-server.rb +++ b/i-mic-fps-server.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true IMICFPS_SERVER_MODE = true require_relative "i-mic-fps" diff --git a/i-mic-fps.rb b/i-mic-fps.rb index 9542e4b..7f2f4c9 100644 --- a/i-mic-fps.rb +++ b/i-mic-fps.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "fiddle" require "yaml" require "json" diff --git a/lib/camera_controller.rb b/lib/camera_controller.rb index fbb99c9..241a594 100644 --- a/lib/camera_controller.rb +++ b/lib/camera_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class CameraController include CommonMethods diff --git a/lib/common_methods.rb b/lib/common_methods.rb index 875ca75..c8482f6 100644 --- a/lib/common_methods.rb +++ b/lib/common_methods.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS def self.assets_path File.expand_path("./../../assets", __FILE__) diff --git a/lib/component.rb b/lib/component.rb index 527a579..d944832 100644 --- a/lib/component.rb +++ b/lib/component.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Component COMPONENTS = {} diff --git a/lib/components/building.rb b/lib/components/building.rb index 5b62a61..dcaa7c4 100644 --- a/lib/components/building.rb +++ b/lib/components/building.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Components class Building < Component diff --git a/lib/constants.rb b/lib/constants.rb index ddd0a61..29e725b 100644 --- a/lib/constants.rb +++ b/lib/constants.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS GAME_ROOT_PATH = File.expand_path("..", File.dirname(__FILE__)) diff --git a/lib/crosshair.rb b/lib/crosshair.rb index 7f0ffd5..5b77bc9 100644 --- a/lib/crosshair.rb +++ b/lib/crosshair.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Crosshair include CommonMethods diff --git a/lib/demo.rb b/lib/demo.rb index 53d8100..5ccec7d 100644 --- a/lib/demo.rb +++ b/lib/demo.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Demo def initialize(camera:, player:, demo:, mode:) diff --git a/lib/event.rb b/lib/event.rb index 76873a6..1cb92cb 100644 --- a/lib/event.rb +++ b/lib/event.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class EventHandler class Event diff --git a/lib/event_handler.rb b/lib/event_handler.rb index 7bb5fa0..56c44b6 100644 --- a/lib/event_handler.rb +++ b/lib/event_handler.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class EventHandler @@handlers = {} diff --git a/lib/event_handlers/entity_lifecycle.rb b/lib/event_handlers/entity_lifecycle.rb index 9b9514d..02ec802 100644 --- a/lib/event_handlers/entity_lifecycle.rb +++ b/lib/event_handlers/entity_lifecycle.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class EventHandler class EntityLifeCycle < EventHandler diff --git a/lib/event_handlers/entity_moved.rb b/lib/event_handlers/entity_moved.rb index 50928d9..f9778d8 100644 --- a/lib/event_handlers/entity_moved.rb +++ b/lib/event_handlers/entity_moved.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class EventHandler class EntityMoved < EventHandler diff --git a/lib/event_handlers/input.rb b/lib/event_handlers/input.rb index 6c1743a..94d8925 100644 --- a/lib/event_handlers/input.rb +++ b/lib/event_handlers/input.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class EventHandler class Input < EventHandler diff --git a/lib/ext/load_opengl.rb b/lib/ext/load_opengl.rb index 3b3240d..627a009 100644 --- a/lib/ext/load_opengl.rb +++ b/lib/ext/load_opengl.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true case OpenGL.get_platform when :OPENGL_PLATFORM_WINDOWS OpenGL.load_lib("opengl32.dll", "C:/Windows/System32") diff --git a/lib/ext/numeric.rb b/lib/ext/numeric.rb index 6e419e6..16c4d1b 100644 --- a/lib/ext/numeric.rb +++ b/lib/ext/numeric.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true if RUBY_VERSION < "2.5.0" puts "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-" puts "|NOTICE| Ruby is #{RUBY_VERSION} not 2.5.0+..............................|Notice|" diff --git a/lib/game_objects/entities/editor.rb b/lib/game_objects/entities/editor.rb index 8b80e94..acca00a 100644 --- a/lib/game_objects/entities/editor.rb +++ b/lib/game_objects/entities/editor.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Editor < Entity diff --git a/lib/game_objects/entities/player.rb b/lib/game_objects/entities/player.rb index e67cba3..4b115c4 100644 --- a/lib/game_objects/entities/player.rb +++ b/lib/game_objects/entities/player.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Player < Entity diff --git a/lib/game_objects/entities/skydome.rb b/lib/game_objects/entities/skydome.rb index 6e9e1b1..887a498 100644 --- a/lib/game_objects/entities/skydome.rb +++ b/lib/game_objects/entities/skydome.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Skydome < Entity def setup diff --git a/lib/game_objects/entities/terrain.rb b/lib/game_objects/entities/terrain.rb index c585351..363ba28 100644 --- a/lib/game_objects/entities/terrain.rb +++ b/lib/game_objects/entities/terrain.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Terrain < Entity end diff --git a/lib/game_objects/entity.rb b/lib/game_objects/entity.rb index 51324cc..307b5a7 100644 --- a/lib/game_objects/entity.rb +++ b/lib/game_objects/entity.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS diff --git a/lib/game_objects/particle_emitter.rb b/lib/game_objects/particle_emitter.rb index af586a6..a15a3a7 100644 --- a/lib/game_objects/particle_emitter.rb +++ b/lib/game_objects/particle_emitter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS def initialize(position:, image:, interval: 1_500, time_to_live: 3_000, max_particles: 500) end diff --git a/lib/hud.rb b/lib/hud.rb index 5592e28..c7db3a5 100644 --- a/lib/hud.rb +++ b/lib/hud.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class HUD def initialize(player) diff --git a/lib/hud/widget.rb b/lib/hud/widget.rb index 8350481..1bbb8a2 100644 --- a/lib/hud/widget.rb +++ b/lib/hud/widget.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class HUD class Widget diff --git a/lib/hud/widgets/ammo.rb b/lib/hud/widgets/ammo.rb index ce24d5e..2267792 100644 --- a/lib/hud/widgets/ammo.rb +++ b/lib/hud/widgets/ammo.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class HUD class AmmoWidget < HUD::Widget diff --git a/lib/hud/widgets/chat_history.rb b/lib/hud/widgets/chat_history.rb index d7285ed..89f8fd3 100644 --- a/lib/hud/widgets/chat_history.rb +++ b/lib/hud/widgets/chat_history.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class HUD class ChatHistoryWidget < HUD::Widget diff --git a/lib/hud/widgets/crosshair.rb b/lib/hud/widgets/crosshair.rb index 95d7cc3..491f025 100644 --- a/lib/hud/widgets/crosshair.rb +++ b/lib/hud/widgets/crosshair.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class HUD class CrosshairWidget < HUD::Widget diff --git a/lib/hud/widgets/health.rb b/lib/hud/widgets/health.rb index f52baee..2721a93 100644 --- a/lib/hud/widgets/health.rb +++ b/lib/hud/widgets/health.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class HUD class HealthWidget < HUD::Widget diff --git a/lib/hud/widgets/radar.rb b/lib/hud/widgets/radar.rb index df18e56..887a37b 100644 --- a/lib/hud/widgets/radar.rb +++ b/lib/hud/widgets/radar.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class HUD class RadarWidget < HUD::Widget diff --git a/lib/hud/widgets/score_board.rb b/lib/hud/widgets/score_board.rb index 50404e8..51b1ed2 100644 --- a/lib/hud/widgets/score_board.rb +++ b/lib/hud/widgets/score_board.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class HUD class ScoreBoardWidget < HUD::Widget diff --git a/lib/hud/widgets/squad.rb b/lib/hud/widgets/squad.rb index f6630b6..c63ce16 100644 --- a/lib/hud/widgets/squad.rb +++ b/lib/hud/widgets/squad.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class HUD class SquadWidget < HUD::Widget diff --git a/lib/managers/collision_manager.rb b/lib/managers/collision_manager.rb index 10c5d4c..e36518c 100644 --- a/lib/managers/collision_manager.rb +++ b/lib/managers/collision_manager.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class CollisionManager attr_reader :map, :collisions diff --git a/lib/managers/entity_manager.rb b/lib/managers/entity_manager.rb index e72e913..e1cebf1 100644 --- a/lib/managers/entity_manager.rb +++ b/lib/managers/entity_manager.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS module EntityManager # Get included into GameState context def add_entity(entity) diff --git a/lib/managers/input_mapper.rb b/lib/managers/input_mapper.rb index acdc119..24a1cba 100644 --- a/lib/managers/input_mapper.rb +++ b/lib/managers/input_mapper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class InputMapper @@keymap = {} diff --git a/lib/managers/light_manager.rb b/lib/managers/light_manager.rb index acd0e55..ded252b 100644 --- a/lib/managers/light_manager.rb +++ b/lib/managers/light_manager.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS module LightManager MAX_LIGHTS = OpenGL::GL_MAX_LIGHTS diff --git a/lib/managers/physics_manager.rb b/lib/managers/physics_manager.rb index 0483c9a..0277526 100644 --- a/lib/managers/physics_manager.rb +++ b/lib/managers/physics_manager.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class PhysicsManager def initialize(collision_manager:) diff --git a/lib/managers/sound_manager.rb b/lib/managers/sound_manager.rb index 12628ef..c8fbaaa 100644 --- a/lib/managers/sound_manager.rb +++ b/lib/managers/sound_manager.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS module SoundManager extend CyberarmEngine::Common diff --git a/lib/manifest.rb b/lib/manifest.rb index 3604f30..8a7ee8f 100644 --- a/lib/manifest.rb +++ b/lib/manifest.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Manifest attr_reader :name, :model, :collision, :collision_mesh, :collision_resolution, :physics, :scripts, :uses diff --git a/lib/map.rb b/lib/map.rb index 7b733b8..94647af 100644 --- a/lib/map.rb +++ b/lib/map.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Map include EntityManager diff --git a/lib/map_parser.rb b/lib/map_parser.rb index 59cabe8..f7430f8 100644 --- a/lib/map_parser.rb +++ b/lib/map_parser.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class MapParser attr_reader :metadata, :terrain, :skydome, :lights, :entities, :spawnpoints diff --git a/lib/networking.rb b/lib/networking.rb index cdd4738..48191f9 100644 --- a/lib/networking.rb +++ b/lib/networking.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module CyberarmEngine module Networking MULTICAST_ADDRESS = "224.0.0.1" diff --git a/lib/networking/backend/channel.rb b/lib/networking/backend/channel.rb index f7f3e37..b3c6009 100644 --- a/lib/networking/backend/channel.rb +++ b/lib/networking/backend/channel.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module CyberarmEngine module Networking class Channel diff --git a/lib/networking/backend/connection.rb b/lib/networking/backend/connection.rb index f874e9b..36960a4 100644 --- a/lib/networking/backend/connection.rb +++ b/lib/networking/backend/connection.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module CyberarmEngine module Networking class Connection diff --git a/lib/networking/backend/packet.rb b/lib/networking/backend/packet.rb index 1a82cd8..dea8f9f 100644 --- a/lib/networking/backend/packet.rb +++ b/lib/networking/backend/packet.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module CyberarmEngine module Networking class Packet diff --git a/lib/networking/backend/packet_handler.rb b/lib/networking/backend/packet_handler.rb index d70c883..9e6d2e8 100644 --- a/lib/networking/backend/packet_handler.rb +++ b/lib/networking/backend/packet_handler.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module CyberarmEngine module Networking module PacketHandler diff --git a/lib/networking/backend/packets/control_packet.rb b/lib/networking/backend/packets/control_packet.rb index 79ba08c..7061d2d 100644 --- a/lib/networking/backend/packets/control_packet.rb +++ b/lib/networking/backend/packets/control_packet.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module CyberarmEngine module Networking class ControlPacket diff --git a/lib/networking/backend/packets/raw_packet.rb b/lib/networking/backend/packets/raw_packet.rb index 0f2ca4e..7476925 100644 --- a/lib/networking/backend/packets/raw_packet.rb +++ b/lib/networking/backend/packets/raw_packet.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module CyberarmEngine module Networking class RawPacket diff --git a/lib/networking/backend/packets/reliable_packet.rb b/lib/networking/backend/packets/reliable_packet.rb index f5a7dad..c947b3b 100644 --- a/lib/networking/backend/packets/reliable_packet.rb +++ b/lib/networking/backend/packets/reliable_packet.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module CyberarmEngine module Networking class ReliablePacket diff --git a/lib/networking/backend/peer.rb b/lib/networking/backend/peer.rb index f49a3b1..aadffef 100644 --- a/lib/networking/backend/peer.rb +++ b/lib/networking/backend/peer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module CyberarmEngine module Networking class Peer diff --git a/lib/networking/backend/protocol.rb b/lib/networking/backend/protocol.rb index a8fa4b9..5ca06f9 100644 --- a/lib/networking/backend/protocol.rb +++ b/lib/networking/backend/protocol.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module CyberarmEngine module Networking module Protocol diff --git a/lib/networking/backend/server.rb b/lib/networking/backend/server.rb index 7a1e27d..00986ee 100644 --- a/lib/networking/backend/server.rb +++ b/lib/networking/backend/server.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module CyberarmEngine module Networking class Server diff --git a/lib/networking/connection.rb b/lib/networking/connection.rb index 0c67050..0c30502 100644 --- a/lib/networking/connection.rb +++ b/lib/networking/connection.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS module Networking class Connection diff --git a/lib/networking/director.rb b/lib/networking/director.rb index 3e5e204..824a916 100644 --- a/lib/networking/director.rb +++ b/lib/networking/director.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS module Networking class Director diff --git a/lib/networking/events.rb b/lib/networking/events.rb index 6e764cb..b9e4a4d 100644 --- a/lib/networking/events.rb +++ b/lib/networking/events.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS module Networking module Events diff --git a/lib/networking/packet_handler.rb b/lib/networking/packet_handler.rb index e88df79..7d206c1 100644 --- a/lib/networking/packet_handler.rb +++ b/lib/networking/packet_handler.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS module Networking class PacketHandler diff --git a/lib/networking/packet_handlers/snapshot.rb b/lib/networking/packet_handlers/snapshot.rb index aec656c..cdac7c4 100644 --- a/lib/networking/packet_handlers/snapshot.rb +++ b/lib/networking/packet_handlers/snapshot.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS module Networking class SnapshotPacket < CyberarmEngine::Networking::Packet diff --git a/lib/networking/read_buffer.rb b/lib/networking/read_buffer.rb index ed72ecc..952e9b5 100644 --- a/lib/networking/read_buffer.rb +++ b/lib/networking/read_buffer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS module Networking class ReadBuffer diff --git a/lib/networking/server.rb b/lib/networking/server.rb index 93e3885..abf0c9b 100644 --- a/lib/networking/server.rb +++ b/lib/networking/server.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS module Networking class Server < CyberarmEngine::Networking::Server diff --git a/lib/overlay.rb b/lib/overlay.rb index 1457c7e..8070491 100644 --- a/lib/overlay.rb +++ b/lib/overlay.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Overlay include CommonMethods diff --git a/lib/publisher.rb b/lib/publisher.rb index 5032c82..a51f4ad 100644 --- a/lib/publisher.rb +++ b/lib/publisher.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Publisher def self.subscribe(subscription) diff --git a/lib/scene.rb b/lib/scene.rb index 0bf733a..176f558 100644 --- a/lib/scene.rb +++ b/lib/scene.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Scene attr_reader :camera, :entities, :lights diff --git a/lib/scenes/turn_table.rb b/lib/scenes/turn_table.rb index 552b8f0..b3c04ab 100644 --- a/lib/scenes/turn_table.rb +++ b/lib/scenes/turn_table.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class TurnTableScene < Scene def setup diff --git a/lib/scripting.rb b/lib/scripting.rb index 2696c08..4e108a9 100644 --- a/lib/scripting.rb +++ b/lib/scripting.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS module Scripting def on diff --git a/lib/scripting/sandbox.rb b/lib/scripting/sandbox.rb index 471bc5b..77370f4 100644 --- a/lib/scripting/sandbox.rb +++ b/lib/scripting/sandbox.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS module Scripting class SandBox diff --git a/lib/scripting/whitelist.rb b/lib/scripting/whitelist.rb index f5c78db..62199a5 100644 --- a/lib/scripting/whitelist.rb +++ b/lib/scripting/whitelist.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS module Scripting CONSTANTS_WHITELIST = [ diff --git a/lib/sound_effect.rb b/lib/sound_effect.rb index 04e0447..6e7a06f 100644 --- a/lib/sound_effect.rb +++ b/lib/sound_effect.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class SoundEffect attr_reader :sound, :options diff --git a/lib/sound_effects/fade_in.rb b/lib/sound_effects/fade_in.rb index 5ddcd69..803ae94 100644 --- a/lib/sound_effects/fade_in.rb +++ b/lib/sound_effects/fade_in.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class SoundEffect class FadeIn < SoundEffect diff --git a/lib/sound_effects/fade_in_and_out.rb b/lib/sound_effects/fade_in_and_out.rb index 4a617d7..d53d379 100644 --- a/lib/sound_effects/fade_in_and_out.rb +++ b/lib/sound_effects/fade_in_and_out.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class SoundEffect class FadeInAndOut < FadeIn diff --git a/lib/sound_effects/fade_out.rb b/lib/sound_effects/fade_out.rb index 628bc77..0fc36cf 100644 --- a/lib/sound_effects/fade_out.rb +++ b/lib/sound_effects/fade_out.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class SoundEffect class FadeOut < FadeIn diff --git a/lib/sound_effects/shield_regen.rb b/lib/sound_effects/shield_regen.rb index 9d1b9f5..92a9a44 100644 --- a/lib/sound_effects/shield_regen.rb +++ b/lib/sound_effects/shield_regen.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class SoundEffect class ShieldRegen < SoundEffect diff --git a/lib/states/game_state.rb b/lib/states/game_state.rb index 913e284..229bc59 100644 --- a/lib/states/game_state.rb +++ b/lib/states/game_state.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class GameState < CyberarmEngine::GameState include CommonMethods diff --git a/lib/states/game_states/boot.rb b/lib/states/game_states/boot.rb index aaa03b3..007879b 100644 --- a/lib/states/game_states/boot.rb +++ b/lib/states/game_states/boot.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Boot < GameState def setup diff --git a/lib/states/game_states/close.rb b/lib/states/game_states/close.rb index f755f00..f02cf38 100644 --- a/lib/states/game_states/close.rb +++ b/lib/states/game_states/close.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Close < GameState def setup diff --git a/lib/states/game_states/game.rb b/lib/states/game_states/game.rb index 11f3ef2..2e4aedb 100644 --- a/lib/states/game_states/game.rb +++ b/lib/states/game_states/game.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Game < GameState attr_reader :map diff --git a/lib/states/game_states/loading_state.rb b/lib/states/game_states/loading_state.rb index 433001f..5e0c01a 100644 --- a/lib/states/game_states/loading_state.rb +++ b/lib/states/game_states/loading_state.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class LoadingState < Menu def setup diff --git a/lib/subscription.rb b/lib/subscription.rb index c83dfd7..4491623 100644 --- a/lib/subscription.rb +++ b/lib/subscription.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Subscription attr_reader :entity, :event, :args, :block diff --git a/lib/tools/asset_viewer.rb b/lib/tools/asset_viewer.rb index 2d1d7da..f8bbd3a 100644 --- a/lib/tools/asset_viewer.rb +++ b/lib/tools/asset_viewer.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true require_relative "asset_viewer/lib/main_menu" require_relative "asset_viewer/lib/turn_table" \ No newline at end of file diff --git a/lib/tools/asset_viewer/lib/main_menu.rb b/lib/tools/asset_viewer/lib/main_menu.rb index d573434..bccfdfd 100644 --- a/lib/tools/asset_viewer/lib/main_menu.rb +++ b/lib/tools/asset_viewer/lib/main_menu.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class AssetViewerTool class MainMenu < Menu diff --git a/lib/tools/asset_viewer/lib/turn_table.rb b/lib/tools/asset_viewer/lib/turn_table.rb index c63afae..51c5165 100644 --- a/lib/tools/asset_viewer/lib/turn_table.rb +++ b/lib/tools/asset_viewer/lib/turn_table.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class AssetViewerTool class TurnTable < CyberarmEngine::GuiState diff --git a/lib/tools/map_editor.rb b/lib/tools/map_editor.rb index 261e972..7a429be 100644 --- a/lib/tools/map_editor.rb +++ b/lib/tools/map_editor.rb @@ -1,2 +1,3 @@ +# frozen_string_literal: true require_relative "map_editor/lib/main_menu" require_relative "map_editor/lib/editor" \ No newline at end of file diff --git a/lib/tools/map_editor/lib/editor.rb b/lib/tools/map_editor/lib/editor.rb index f68b288..f384446 100644 --- a/lib/tools/map_editor/lib/editor.rb +++ b/lib/tools/map_editor/lib/editor.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class MapEditorTool class Editor < CyberarmEngine::GuiState diff --git a/lib/tools/map_editor/lib/main_menu.rb b/lib/tools/map_editor/lib/main_menu.rb index d86c27d..117462e 100644 --- a/lib/tools/map_editor/lib/main_menu.rb +++ b/lib/tools/map_editor/lib/main_menu.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class MapEditorTool class MainMenu < Menu diff --git a/lib/trees/aabb_node.rb b/lib/trees/aabb_node.rb index 183e0bb..c3a7985 100644 --- a/lib/trees/aabb_node.rb +++ b/lib/trees/aabb_node.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class AABBTree class AABBNode diff --git a/lib/trees/aabb_tree.rb b/lib/trees/aabb_tree.rb index 415bcb7..9e0ccfa 100644 --- a/lib/trees/aabb_tree.rb +++ b/lib/trees/aabb_tree.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class AABBTree include IMICFPS::AABBTreeDebug diff --git a/lib/trees/aabb_tree_debug.rb b/lib/trees/aabb_tree_debug.rb index 7e541ba..d17ae60 100644 --- a/lib/trees/aabb_tree_debug.rb +++ b/lib/trees/aabb_tree_debug.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS # Gets included into AABBTree module AABBTreeDebug diff --git a/lib/ui/command.rb b/lib/ui/command.rb index 8daca81..dc09321 100644 --- a/lib/ui/command.rb +++ b/lib/ui/command.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Commands module Style diff --git a/lib/ui/commands/connect_command.rb b/lib/ui/commands/connect_command.rb index e32139c..53fc1e0 100644 --- a/lib/ui/commands/connect_command.rb +++ b/lib/ui/commands/connect_command.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Commands class ConnectCommand < Command diff --git a/lib/ui/commands/debug_command.rb b/lib/ui/commands/debug_command.rb index 5738d45..fd38f10 100644 --- a/lib/ui/commands/debug_command.rb +++ b/lib/ui/commands/debug_command.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Commands class DebugCommand < Command diff --git a/lib/ui/commands/disconnect_command.rb b/lib/ui/commands/disconnect_command.rb index 31dcd49..4fac17b 100644 --- a/lib/ui/commands/disconnect_command.rb +++ b/lib/ui/commands/disconnect_command.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Commands class DisconnectCommand < Command diff --git a/lib/ui/commands/fps_command.rb b/lib/ui/commands/fps_command.rb index 429182f..7014a7a 100644 --- a/lib/ui/commands/fps_command.rb +++ b/lib/ui/commands/fps_command.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Commands class FPSCommand < Command diff --git a/lib/ui/commands/help_command.rb b/lib/ui/commands/help_command.rb index 7eaa7a4..9095629 100644 --- a/lib/ui/commands/help_command.rb +++ b/lib/ui/commands/help_command.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Commands class HelpCommand < Command diff --git a/lib/ui/commands/reload_shader_command.rb b/lib/ui/commands/reload_shader_command.rb index 73af304..9b997e3 100644 --- a/lib/ui/commands/reload_shader_command.rb +++ b/lib/ui/commands/reload_shader_command.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Commands class ReloadShaderCommand < Command diff --git a/lib/ui/commands/renderer_info_command.rb b/lib/ui/commands/renderer_info_command.rb index ee11588..1dd2b6c 100644 --- a/lib/ui/commands/renderer_info_command.rb +++ b/lib/ui/commands/renderer_info_command.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Commands class RendererInfoCommand < Command diff --git a/lib/ui/console.rb b/lib/ui/console.rb index 3a53ce0..be0d60b 100644 --- a/lib/ui/console.rb +++ b/lib/ui/console.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Console Z = 100_000 diff --git a/lib/ui/menu.rb b/lib/ui/menu.rb index 6a2b674..bc72c0c 100644 --- a/lib/ui/menu.rb +++ b/lib/ui/menu.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Menu < IMICFPS::GuiState include CommonMethods diff --git a/lib/ui/menus/extras_menu.rb b/lib/ui/menus/extras_menu.rb index 1be77a0..2ad42cd 100644 --- a/lib/ui/menus/extras_menu.rb +++ b/lib/ui/menus/extras_menu.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class ExtrasMenu < Menu def setup diff --git a/lib/ui/menus/game_pause_menu.rb b/lib/ui/menus/game_pause_menu.rb index c0f9748..22a4183 100644 --- a/lib/ui/menus/game_pause_menu.rb +++ b/lib/ui/menus/game_pause_menu.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class GamePauseMenu < Menu def setup diff --git a/lib/ui/menus/level_select_menu.rb b/lib/ui/menus/level_select_menu.rb index 5e7cf53..3e2396e 100644 --- a/lib/ui/menus/level_select_menu.rb +++ b/lib/ui/menus/level_select_menu.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class LevelSelectMenu < Menu def setup diff --git a/lib/ui/menus/main_menu.rb b/lib/ui/menus/main_menu.rb index f107424..d759f93 100644 --- a/lib/ui/menus/main_menu.rb +++ b/lib/ui/menus/main_menu.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class MainMenu < Menu def setup diff --git a/lib/ui/menus/multiplayer_menu.rb b/lib/ui/menus/multiplayer_menu.rb index 8e9ea51..060302c 100644 --- a/lib/ui/menus/multiplayer_menu.rb +++ b/lib/ui/menus/multiplayer_menu.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class MultiplayerMenu < Menu def setup diff --git a/lib/ui/menus/multiplayer_profile_menu.rb b/lib/ui/menus/multiplayer_profile_menu.rb index d8669f4..08caf45 100644 --- a/lib/ui/menus/multiplayer_profile_menu.rb +++ b/lib/ui/menus/multiplayer_profile_menu.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class MultiplayerProfileMenu < Menu def setup diff --git a/lib/ui/menus/multiplayer_server_browser_menu.rb b/lib/ui/menus/multiplayer_server_browser_menu.rb index 3989326..5399c08 100644 --- a/lib/ui/menus/multiplayer_server_browser_menu.rb +++ b/lib/ui/menus/multiplayer_server_browser_menu.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class MultiplayerServerBrowserMenu < Menu def setup diff --git a/lib/ui/menus/settings_menu.rb b/lib/ui/menus/settings_menu.rb index 33892c2..e53c4e5 100644 --- a/lib/ui/menus/settings_menu.rb +++ b/lib/ui/menus/settings_menu.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class SettingsMenu < Menu include CommonMethods diff --git a/lib/ui/subcommand.rb b/lib/ui/subcommand.rb index d706f4d..7dc3b5f 100644 --- a/lib/ui/subcommand.rb +++ b/lib/ui/subcommand.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Commands class Command diff --git a/lib/version.rb b/lib/version.rb index bd5f28c..fb80609 100644 --- a/lib/version.rb +++ b/lib/version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS NAME = "I-MIC FPS" RELEASE_NAME = "InDev" diff --git a/lib/window.rb b/lib/window.rb index 1c176d1..c60f568 100644 --- a/lib/window.rb +++ b/lib/window.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class IMICFPS class Window < CyberarmEngine::Window attr_accessor :number_of_vertices, :needs_cursor diff --git a/new_server_test.rb b/new_server_test.rb index 78548dd..e9f48d4 100644 --- a/new_server_test.rb +++ b/new_server_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true def require_all(directory) files = Dir["#{directory}/**/*.rb"].sort! diff --git a/rakelib/release.rake b/rakelib/release.rake index e69cd96..11f50c2 100644 --- a/rakelib/release.rake +++ b/rakelib/release.rake @@ -1,3 +1,4 @@ +# frozen_string_literal: true PACKAGING_LOCKFILE = File.expand_path("i-mic-fps-packaging.lock", Dir.tmpdir) GITHUB_API_URL = "https://api.github.com/repos/cyberarm/i-mic-fps" USERAGENT = "cyberarm +i-mic-fps" diff --git a/rakelib/test.rake b/rakelib/test.rake index b9427ab..637e8f6 100644 --- a/rakelib/test.rake +++ b/rakelib/test.rake @@ -1,3 +1,4 @@ +# frozen_string_literal: true desc "Run tests" task :default do puts "No tests implemented yet!"