Rubocop autocorrect frozen string literal cop

This commit is contained in:
2020-12-02 17:29:01 -06:00
parent 791351f2f5
commit aa30ff73d0
116 changed files with 116 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
source "https://rubygems.org"
gem "rake"
gem "opengl-bindings", require: "opengl"

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
require "json"
require "tmpdir"
require "fileutils"

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
begin
require_relative "../cyberarm_engine/lib/cyberarm_engine"
rescue LoadError

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
origin = entity.position
on.entity_moved do |event|

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
component(:building)
on.create do |event|

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
component(:vehicle) # Generic, Weapon
on.button_down(:interact) do |event|

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
component(:building)
on.create do |event|

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
IMICFPS_SERVER_MODE = true
require_relative "i-mic-fps"

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
require "fiddle"
require "yaml"
require "json"

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class CameraController
include CommonMethods

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
def self.assets_path
File.expand_path("./../../assets", __FILE__)

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class Component
COMPONENTS = {}

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class Components
class Building < Component

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
GAME_ROOT_PATH = File.expand_path("..", File.dirname(__FILE__))

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class Crosshair
include CommonMethods

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class Demo
def initialize(camera:, player:, demo:, mode:)

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class EventHandler
class Event

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class EventHandler
@@handlers = {}

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class EventHandler
class EntityLifeCycle < EventHandler

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class EventHandler
class EntityMoved < EventHandler

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class EventHandler
class Input < EventHandler

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
case OpenGL.get_platform
when :OPENGL_PLATFORM_WINDOWS
OpenGL.load_lib("opengl32.dll", "C:/Windows/System32")

View File

@@ -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|"

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class Editor < Entity

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class Player < Entity

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class Skydome < Entity
def setup

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class Terrain < Entity
end

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS

View File

@@ -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

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class HUD
def initialize(player)

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class HUD
class Widget

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class HUD
class AmmoWidget < HUD::Widget

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class HUD
class ChatHistoryWidget < HUD::Widget

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class HUD
class CrosshairWidget < HUD::Widget

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class HUD
class HealthWidget < HUD::Widget

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class HUD
class RadarWidget < HUD::Widget

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class HUD
class ScoreBoardWidget < HUD::Widget

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class HUD
class SquadWidget < HUD::Widget

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class CollisionManager
attr_reader :map, :collisions

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
module EntityManager # Get included into GameState context
def add_entity(entity)

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class InputMapper
@@keymap = {}

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
module LightManager
MAX_LIGHTS = OpenGL::GL_MAX_LIGHTS

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class PhysicsManager
def initialize(collision_manager:)

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
module SoundManager
extend CyberarmEngine::Common

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class Manifest
attr_reader :name, :model, :collision, :collision_mesh, :collision_resolution, :physics, :scripts, :uses

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class Map
include EntityManager

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class MapParser
attr_reader :metadata, :terrain, :skydome, :lights, :entities, :spawnpoints

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
module CyberarmEngine
module Networking
MULTICAST_ADDRESS = "224.0.0.1"

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
module CyberarmEngine
module Networking
class Channel

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
module CyberarmEngine
module Networking
class Connection

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
module CyberarmEngine
module Networking
class Packet

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
module CyberarmEngine
module Networking
module PacketHandler

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
module CyberarmEngine
module Networking
class ControlPacket

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
module CyberarmEngine
module Networking
class RawPacket

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
module CyberarmEngine
module Networking
class ReliablePacket

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
module CyberarmEngine
module Networking
class Peer

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
module CyberarmEngine
module Networking
module Protocol

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
module CyberarmEngine
module Networking
class Server

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
module Networking
class Connection

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
module Networking
class Director

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
module Networking
module Events

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
module Networking
class PacketHandler

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
module Networking
class SnapshotPacket < CyberarmEngine::Networking::Packet

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
module Networking
class ReadBuffer

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
module Networking
class Server < CyberarmEngine::Networking::Server

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class Overlay
include CommonMethods

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class Publisher
def self.subscribe(subscription)

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class Scene
attr_reader :camera, :entities, :lights

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class TurnTableScene < Scene
def setup

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
module Scripting
def on

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
module Scripting
class SandBox

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
module Scripting
CONSTANTS_WHITELIST = [

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class SoundEffect
attr_reader :sound, :options

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class SoundEffect
class FadeIn < SoundEffect

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class SoundEffect
class FadeInAndOut < FadeIn

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class SoundEffect
class FadeOut < FadeIn

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class SoundEffect
class ShieldRegen < SoundEffect

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class GameState < CyberarmEngine::GameState
include CommonMethods

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class Boot < GameState
def setup

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class Close < GameState
def setup

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class Game < GameState
attr_reader :map

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class LoadingState < Menu
def setup

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class Subscription
attr_reader :entity, :event, :args, :block

View File

@@ -1,2 +1,3 @@
# frozen_string_literal: true
require_relative "asset_viewer/lib/main_menu"
require_relative "asset_viewer/lib/turn_table"

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class AssetViewerTool
class MainMenu < Menu

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class AssetViewerTool
class TurnTable < CyberarmEngine::GuiState

View File

@@ -1,2 +1,3 @@
# frozen_string_literal: true
require_relative "map_editor/lib/main_menu"
require_relative "map_editor/lib/editor"

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class MapEditorTool
class Editor < CyberarmEngine::GuiState

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class MapEditorTool
class MainMenu < Menu

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class AABBTree
class AABBNode

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class AABBTree
include IMICFPS::AABBTreeDebug

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
# Gets included into AABBTree
module AABBTreeDebug

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class Commands
module Style

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class Commands
class ConnectCommand < Command

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class Commands
class DebugCommand < Command

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class Commands
class DisconnectCommand < Command

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class Commands
class FPSCommand < Command

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class Commands
class HelpCommand < Command

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class Commands
class ReloadShaderCommand < Command

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
class IMICFPS
class Commands
class RendererInfoCommand < Command

Some files were not shown because too many files have changed in this diff Show More