File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33class CMakePatcher
4- SERVER_PREFIX = 'src/game /server'
4+ SERVER_PREFIX = 'src/insta /server'
55
66 def initialize ( opts = { } )
77 @cmake_path = opts [ :path ]
@@ -54,8 +54,8 @@ def build_new_cmake
5454 end
5555 end
5656
57- # set_src(GAME_SERVER GLOB_RECURSE src/game /server
58- in_set_src = true if line . match? ( /set_src.GAME_SERVER .*src.game .server/ )
57+ # set_src(INSTA_SERVER GLOB_RECURSE src/insta /server
58+ in_set_src = true if line . match? ( /set_src.INSTA_SERVER .*src.insta .server/ )
5959
6060 new_content += "#{ line } \n "
6161 end
@@ -71,7 +71,7 @@ def build_new_cmake
7171 # @param old_files [Array<String>] The files currently in CMakeListst.txt
7272 # @param indent [Integer] Amount of spaces to indent from the beginning of the line
7373 # @return [Array<String>]
74- def build_files_string ( old_files , indent = 4 )
74+ def build_files_string ( old_files , indent = 6 )
7575 old_files = old_files . map ( &:strip )
7676 new_files = @new_files . map { |file | file . delete_prefix ( "#{ SERVER_PREFIX } /" ) }
7777 # could also delete files here
Original file line number Diff line number Diff line change 88# comments use YARD format
99# https://rubydoc.info/gems/yard/file/docs/GettingStarted.md
1010
11- CONTROLLER_BASE_DIR_INCLUDE = 'game /server/gamemodes'
11+ CONTROLLER_BASE_DIR_INCLUDE = 'insta /server/gamemodes'
1212CONTROLLER_BASE_DIR_FS = "src/#{ CONTROLLER_BASE_DIR_INCLUDE } " . freeze
1313
1414class Controller
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ def initialize(opts = {})
1616 @parent_controller = opts [ :parent ] || Controller . base_pvp
1717
1818 @fs = FileSystemHelper . new
19- @cmake = CMakePatcher . new
19+ @cmake = CMakePatcher . new ( path : 'src/insta/CMakeLists.txt' )
2020 end
2121
2222 def write_cpp_header
You can’t perform that action at this time.
0 commit comments