class TeamFortress

A module to produce resources for a Team Fortress 2 server

Attributes

app_id[R]
name[R]

Public Class Methods

new() click to toggle source
# File lib/servers/team_fortress.rb, line 4
def initialize
  @name = "tf2"
  @app_id = "232250"
end

Public Instance Methods

launch(install_path, map = "ctf_2fort", players = 24) click to toggle source
# File lib/servers/team_fortress.rb, line 9
def launch(install_path, map = "ctf_2fort", players = 24)
  "cd #{install_path} &&
  #{install_path}/srcds_run \
  -console \
  -game tf \
  +sv_pure 1 \
  +map #{map} \
  +maxplayers #{players} \
  -condebug & \
  /usr/bin/tail -f #{install_path}/tf/console.log"
end
post_install(install_path) click to toggle source
# File lib/servers/team_fortress.rb, line 21
def post_install(install_path)
  system("touch #{install_path}/tf/console.log")
end