class GarrysMod

A module to produce resources for a Garry's Mod server

Attributes

app_id[R]
friendly_name[R]
name[R]

Public Class Methods

new() click to toggle source
# File lib/servers/gmod.rb, line 4
def initialize
  @name = "gmod"
  @app_id = "4020"
  @friendly_name = "Garry's Mod"
end

Public Instance Methods

launch(install_path, map = "gm_construct", players = 16, collection_id = "1838303608") click to toggle source
# File lib/servers/gmod.rb, line 10
def launch(install_path, map = "gm_construct", players = 16, collection_id = "1838303608")
  "cd #{install_path} &&
  #{install_path}/srcds_run \
  -console \
  -game garrysmod \
  +map #{map} \
  +maxplayers #{players} \
  +host_workshop_collection #{collection_id} \
  -condebug & \
  /usr/bin/tail -f #{install_path}/garrysmod/console.log"
end
post_install(install_path) click to toggle source
# File lib/servers/gmod.rb, line 22
def post_install(install_path)
  system("touch #{install_path}/garrysmod/console.log")
end