module RBStarbound

Constants

EX_ERR
EX_OK
VERSION

Public Class Methods

dump_player_save_file(path, player_data) click to toggle source
# File lib/rbstarbound.rb, line 25
def self.dump_player_save_file(path, player_data)
  save_file = File.open(path, 'wb')
  SBVJ01.dump(save_file, player_data)
rescue StandardError => e
  print_error(e)
  return false
else
  return true
ensure
  save_file.close unless save_file.nil?
end
parse_player_save_file(path) click to toggle source
# File lib/rbstarbound.rb, line 13
def self.parse_player_save_file(path)
  save_file = File.open(path, 'rb')
  parsed_data = SBVJ01.parse(save_file)
rescue StandardError => e
  print_error(e)
  return nil
else
  return parsed_data
ensure
  save_file.close unless save_file.nil?
end
print_error(error) click to toggle source