mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-13 06:42:35 +00:00
Rubocop autocorrect frozen string literal cop
This commit is contained in:
1
Gemfile
1
Gemfile
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
source "https://rubygems.org"
|
||||
gem "rake"
|
||||
gem "opengl-bindings", require: "opengl"
|
||||
|
||||
1
Rakefile
1
Rakefile
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
require "json"
|
||||
require "tmpdir"
|
||||
require "fileutils"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
begin
|
||||
require_relative "../cyberarm_engine/lib/cyberarm_engine"
|
||||
rescue LoadError
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
origin = entity.position
|
||||
|
||||
on.entity_moved do |event|
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
component(:building)
|
||||
|
||||
on.create do |event|
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
component(:vehicle) # Generic, Weapon
|
||||
|
||||
on.button_down(:interact) do |event|
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
component(:building)
|
||||
|
||||
on.create do |event|
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
IMICFPS_SERVER_MODE = true
|
||||
require_relative "i-mic-fps"
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
require "fiddle"
|
||||
require "yaml"
|
||||
require "json"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class CameraController
|
||||
include CommonMethods
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
def self.assets_path
|
||||
File.expand_path("./../../assets", __FILE__)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class Component
|
||||
COMPONENTS = {}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class Components
|
||||
class Building < Component
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
GAME_ROOT_PATH = File.expand_path("..", File.dirname(__FILE__))
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class Crosshair
|
||||
include CommonMethods
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class Demo
|
||||
def initialize(camera:, player:, demo:, mode:)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class EventHandler
|
||||
class Event
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class EventHandler
|
||||
@@handlers = {}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class EventHandler
|
||||
class EntityLifeCycle < EventHandler
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class EventHandler
|
||||
class EntityMoved < EventHandler
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class EventHandler
|
||||
class Input < EventHandler
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
case OpenGL.get_platform
|
||||
when :OPENGL_PLATFORM_WINDOWS
|
||||
OpenGL.load_lib("opengl32.dll", "C:/Windows/System32")
|
||||
|
||||
@@ -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|"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class Editor < Entity
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class Player < Entity
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class Skydome < Entity
|
||||
def setup
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class Terrain < Entity
|
||||
end
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class HUD
|
||||
def initialize(player)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class HUD
|
||||
class Widget
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class HUD
|
||||
class AmmoWidget < HUD::Widget
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class HUD
|
||||
class ChatHistoryWidget < HUD::Widget
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class HUD
|
||||
class CrosshairWidget < HUD::Widget
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class HUD
|
||||
class HealthWidget < HUD::Widget
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class HUD
|
||||
class RadarWidget < HUD::Widget
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class HUD
|
||||
class ScoreBoardWidget < HUD::Widget
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class HUD
|
||||
class SquadWidget < HUD::Widget
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class CollisionManager
|
||||
attr_reader :map, :collisions
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
module EntityManager # Get included into GameState context
|
||||
def add_entity(entity)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class InputMapper
|
||||
@@keymap = {}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
module LightManager
|
||||
MAX_LIGHTS = OpenGL::GL_MAX_LIGHTS
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class PhysicsManager
|
||||
def initialize(collision_manager:)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
module SoundManager
|
||||
extend CyberarmEngine::Common
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class Manifest
|
||||
attr_reader :name, :model, :collision, :collision_mesh, :collision_resolution, :physics, :scripts, :uses
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class Map
|
||||
include EntityManager
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class MapParser
|
||||
attr_reader :metadata, :terrain, :skydome, :lights, :entities, :spawnpoints
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
module CyberarmEngine
|
||||
module Networking
|
||||
MULTICAST_ADDRESS = "224.0.0.1"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
module CyberarmEngine
|
||||
module Networking
|
||||
class Channel
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
module CyberarmEngine
|
||||
module Networking
|
||||
class Connection
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
module CyberarmEngine
|
||||
module Networking
|
||||
class Packet
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
module CyberarmEngine
|
||||
module Networking
|
||||
module PacketHandler
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
module CyberarmEngine
|
||||
module Networking
|
||||
class ControlPacket
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
module CyberarmEngine
|
||||
module Networking
|
||||
class RawPacket
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
module CyberarmEngine
|
||||
module Networking
|
||||
class ReliablePacket
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
module CyberarmEngine
|
||||
module Networking
|
||||
class Peer
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
module CyberarmEngine
|
||||
module Networking
|
||||
module Protocol
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
module CyberarmEngine
|
||||
module Networking
|
||||
class Server
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
module Networking
|
||||
class Connection
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
module Networking
|
||||
class Director
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
module Networking
|
||||
module Events
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
module Networking
|
||||
class PacketHandler
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
module Networking
|
||||
class SnapshotPacket < CyberarmEngine::Networking::Packet
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
module Networking
|
||||
class ReadBuffer
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
module Networking
|
||||
class Server < CyberarmEngine::Networking::Server
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class Overlay
|
||||
include CommonMethods
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class Publisher
|
||||
def self.subscribe(subscription)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class Scene
|
||||
attr_reader :camera, :entities, :lights
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class TurnTableScene < Scene
|
||||
def setup
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
module Scripting
|
||||
def on
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
module Scripting
|
||||
class SandBox
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
module Scripting
|
||||
CONSTANTS_WHITELIST = [
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class SoundEffect
|
||||
attr_reader :sound, :options
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class SoundEffect
|
||||
class FadeIn < SoundEffect
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class SoundEffect
|
||||
class FadeInAndOut < FadeIn
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class SoundEffect
|
||||
class FadeOut < FadeIn
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class SoundEffect
|
||||
class ShieldRegen < SoundEffect
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class GameState < CyberarmEngine::GameState
|
||||
include CommonMethods
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class Boot < GameState
|
||||
def setup
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class Close < GameState
|
||||
def setup
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class Game < GameState
|
||||
attr_reader :map
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class LoadingState < Menu
|
||||
def setup
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class Subscription
|
||||
attr_reader :entity, :event, :args, :block
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
# frozen_string_literal: true
|
||||
require_relative "asset_viewer/lib/main_menu"
|
||||
require_relative "asset_viewer/lib/turn_table"
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class AssetViewerTool
|
||||
class MainMenu < Menu
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class AssetViewerTool
|
||||
class TurnTable < CyberarmEngine::GuiState
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
# frozen_string_literal: true
|
||||
require_relative "map_editor/lib/main_menu"
|
||||
require_relative "map_editor/lib/editor"
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class MapEditorTool
|
||||
class Editor < CyberarmEngine::GuiState
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class MapEditorTool
|
||||
class MainMenu < Menu
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class AABBTree
|
||||
class AABBNode
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class AABBTree
|
||||
include IMICFPS::AABBTreeDebug
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
# Gets included into AABBTree
|
||||
module AABBTreeDebug
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class Commands
|
||||
module Style
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class Commands
|
||||
class ConnectCommand < Command
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class Commands
|
||||
class DebugCommand < Command
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class Commands
|
||||
class DisconnectCommand < Command
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class Commands
|
||||
class FPSCommand < Command
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class Commands
|
||||
class HelpCommand < Command
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class IMICFPS
|
||||
class Commands
|
||||
class ReloadShaderCommand < Command
|
||||
|
||||
@@ -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
Reference in New Issue
Block a user