Browse Source

Record by default and save when switching heroes

master
Luna 7 years ago
parent
commit
2d77e31dac
3 changed files with 4 additions and 3 deletions
  1. +0
    -1
      recordings/2-0-8903.rec
  2. +2
    -2
      scripts/lobby.gd
  3. +2
    -0
      scripts/player.gd

+ 0
- 1
recordings/2-0-8903.rec
File diff suppressed because it is too large
View File


+ 2
- 2
scripts/lobby.gd View File

@ -21,7 +21,7 @@ func setup_options():
opts.add('-level', 'r', 'Your choice of level (index) - server only!') opts.add('-level', 'r', 'Your choice of level (index) - server only!')
opts.add('-start-game', false, 'Join as a client and immediately start the game') opts.add('-start-game', false, 'Join as a client and immediately start the game')
opts.add('-ai', true, 'Run this client as AI') opts.add('-ai', true, 'Run this client as AI')
opts.add('-record', true, 'Record this play for AI later')
opts.add('-no-record', true, "Don't record this play for AI later")
opts.add('-h', false, "Print help") opts.add('-h', false, "Print help")
return opts return opts
@ -60,7 +60,7 @@ func _ready():
call_deferred("_singleplayer_init") call_deferred("_singleplayer_init")
if o.get_value("-ai"): if o.get_value("-ai"):
my_info.is_ai = true my_info.is_ai = true
if o.get_value("-record"):
if not o.get_value("-no-record"):
my_info.record = true my_info.record = true
if o.get_value('-h'): if o.get_value('-h'):
o.print_help() o.print_help()


+ 2
- 0
scripts/player.gd View File

@ -222,6 +222,8 @@ sync func switch_hero(hero):
func _exit_scene(): func _exit_scene():
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
func _exit_tree():
if "record" in player_info: if "record" in player_info:
write_recording() write_recording()


Loading…
Cancel
Save