Class: Factorix::SaveFile
- Inherits:
-
Data
- Object
- Data
- Factorix::SaveFile
- Defined in:
- lib/factorix/save_file.rb,
lib/factorix/save_file.rb
Overview
Data structure for Factorio save file information
SaveFile provides functionality to extract MOD information and startup settings from Factorio save files (.zip format containing level.dat0 or level-init.dat).
Instance Attribute Summary collapse
-
#mods ⇒ Hash<String, Factorix::MODState>
readonly
Hash of MOD name to MODState.
-
#startup_settings ⇒ Factorix::MODSettings::Section
readonly
Startup settings section.
-
#version ⇒ Factorix::GameVersion
readonly
Game version from the save file.
Class Method Summary collapse
-
.load(path) ⇒ SaveFile
Load a save file and extract MOD information and settings.
Instance Attribute Details
#mods ⇒ Hash<String, Factorix::MODState> (readonly)
Returns Hash of MOD name to MODState.
14 15 16 |
# File 'lib/factorix/save_file.rb', line 14 def mods @mods end |
#startup_settings ⇒ Factorix::MODSettings::Section (readonly)
Returns Startup settings section.
14 15 16 |
# File 'lib/factorix/save_file.rb', line 14 def startup_settings @startup_settings end |
#version ⇒ Factorix::GameVersion (readonly)
Returns Game version from the save file.
14 15 16 |
# File 'lib/factorix/save_file.rb', line 14 def version @version end |
Class Method Details
.load(path) ⇒ SaveFile
Load a save file and extract MOD information and settings
31 |
# File 'lib/factorix/save_file.rb', line 31 def self.load(path) = Parser.new(path).parse |