ruby_gs 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.travis.yml +3 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +57 -0
- data/Rakefile +2 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/lib/ruby_gs/save_file_reader.rb +93 -0
- data/lib/ruby_gs/structs/.caught_data.rb.swp +0 -0
- data/lib/ruby_gs/structs/.item_entry.rb.swp +0 -0
- data/lib/ruby_gs/structs/.iv_data.rb.swp +0 -0
- data/lib/ruby_gs/structs/.name_text.rb.swp +0 -0
- data/lib/ruby_gs/structs/.party_pokemon.rb.swp +0 -0
- data/lib/ruby_gs/structs/.pp_data.rb.swp +0 -0
- data/lib/ruby_gs/structs/.save_file.rb.swp +0 -0
- data/lib/ruby_gs/structs/.team.rb.swp +0 -0
- data/lib/ruby_gs/structs/caught_data.rb +11 -0
- data/lib/ruby_gs/structs/item_entry.rb +9 -0
- data/lib/ruby_gs/structs/iv_data.rb +11 -0
- data/lib/ruby_gs/structs/name_text.rb +18 -0
- data/lib/ruby_gs/structs/party_pokemon.rb +42 -0
- data/lib/ruby_gs/structs/pp_data.rb +9 -0
- data/lib/ruby_gs/structs/save_file.rb +45 -0
- data/lib/ruby_gs/structs/team.rb +16 -0
- data/lib/ruby_gs/structs.rb +10 -0
- data/lib/ruby_gs/text_gs.rb +48 -0
- data/lib/ruby_gs/version.rb +3 -0
- data/lib/ruby_gs.rb +2 -0
- data/ruby_gs.gemspec +26 -0
- metadata +119 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 779a648e0548a042c7e9f2136d64e6fc939bf555
|
4
|
+
data.tar.gz: 2ed5de25d9bf99b33185bf3c86774b9cd2175577
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8b917c990ffcab122a382fee81640eefdb3291505ae4bb27ad8365699fae27ec8dcbeafdf64bc61ad3318fa986260ed7e47dfa220ace12c8fb67ce4a648dd566
|
7
|
+
data.tar.gz: fa2fd827df04bbfd115d45e42072d131afeb7cee5a12a696094143ce8f2ac6f29a939cbe62886e32b77068a71721e5f00c918dee124d9eecc05da812ddffcdce
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
+
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
|
6
|
+
|
7
|
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
+
|
9
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
+
|
11
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
+
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Conrad King
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
# RubyGS
|
2
|
+
|
3
|
+
RubyGS is a Ruby Gem that allows Rubyists to view and edit .sav files for the Gold, Silver, and Crystal versions of Pokemon on the Gameboy Color.
|
4
|
+
|
5
|
+
These are typically files generated by a Gameboy/Gameboy Color emulator (or a physical backup device, for those of you who are more inclined) that contains the raw data acting as the SRAM on a game cartridge.
|
6
|
+
|
7
|
+
##Installation
|
8
|
+
```
|
9
|
+
$ gem install ruby_gs
|
10
|
+
```
|
11
|
+
|
12
|
+
##Usage
|
13
|
+
``` ruby
|
14
|
+
require 'ruby_gs'
|
15
|
+
|
16
|
+
saved_game = SaveFileReader.read "/path/to/save/file.sav" # => SaveFile containing data representing the raw SRAM of your cartridge
|
17
|
+
|
18
|
+
saved_game.trainer_name = "Reich" # Note: Most fields that accept a string are limited to 10-character strings or less
|
19
|
+
|
20
|
+
saved_game.rival_name = "Bugs"
|
21
|
+
|
22
|
+
saved_game.team.pokemon[0].species = 25 # Change our first team pokemon's species to someone very familiar
|
23
|
+
|
24
|
+
saved_game.set_team_species 0, 25 # This is an alternative to the previous line except it also updates the team menu species
|
25
|
+
|
26
|
+
saved_game.team.pokemon[5].happiness = 255 # That's one happy Pokemon!
|
27
|
+
|
28
|
+
saved_game.team.amount = 5 # Annnnnnd now it's gone (Not really, it's just hidden from view)
|
29
|
+
|
30
|
+
hours = 78
|
31
|
+
minutes = 33
|
32
|
+
seconds = 12
|
33
|
+
frames = 20
|
34
|
+
|
35
|
+
saved_game.time_played = [hours, minutes, seconds, frames] # The amount of frames is not visible to the player and is rather inconsequential in general.
|
36
|
+
|
37
|
+
saved_game.item_pocket[3].kind = 1 # Change the 3rd item in our Item Pocket to a Master Ball.
|
38
|
+
saved_game.item_pocket[3].amount = 255 # Gotta make sure we have enough for our journey.
|
39
|
+
|
40
|
+
saved_game.write # This will write your changes directly to the same save file you opened initially.
|
41
|
+
|
42
|
+
saved_game.write "path/to/other/save/file.sav" # This will write your changes to a different location.
|
43
|
+
|
44
|
+
```
|
45
|
+
|
46
|
+
##Useful Links
|
47
|
+
+ [List of item indices](http://bulbapedia.bulbagarden.net/wiki/List_of_items_by_index_number_%28Generation_II%29)
|
48
|
+
+ [List of Pokemon species indices](http://bulbapedia.bulbagarden.net/wiki/List_of_Pok%C3%A9mon_by_index_number_%28Generation_II%29)
|
49
|
+
|
50
|
+
##TODO:
|
51
|
+
+ Support for Crystal.
|
52
|
+
+ Major refactoring.
|
53
|
+
+ Player Location editing.
|
54
|
+
+ Event Flag editing (and possibly documenting the purpose of each flag).
|
55
|
+
|
56
|
+
|
57
|
+
_Special thanks to Bulbapedia for hosting the project to document G/S/C's SRAM innards._
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "ruby_gs"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
require "bindata"
|
2
|
+
require_relative "structs"
|
3
|
+
|
4
|
+
module RubyGS
|
5
|
+
|
6
|
+
class SaveFileReader
|
7
|
+
|
8
|
+
def self.read(file)
|
9
|
+
raise "filename cannot be nil" if not file
|
10
|
+
SaveFile.new SaveFileGS.read(File.open(file,"r")), file, true
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.calc_checksums(file)
|
14
|
+
file.pos = 0
|
15
|
+
content = file.read.split("").map(&:ord)
|
16
|
+
c1 = content[0x2009..0x2D68].reduce(&:+)
|
17
|
+
c2 = content[0x0C6B..0x17EC].reduce(&:+) + content[0x3D96..0x3F3F].reduce(&:+) + content[0x7E39..0x7E6C].reduce(&:+)
|
18
|
+
file.close
|
19
|
+
[c1.to_s(16),c2.to_s(16)]
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.correct_checksums!(file)
|
23
|
+
file.pos = 0
|
24
|
+
content = file.read.split("").map(&:ord)
|
25
|
+
c1 = content[0x2009..0x2D68].inject(&:+)
|
26
|
+
c2 = content[0x0C6B..0x17EC].inject(&:+) + content[0x3D96..0x3F3F].inject(&:+) + content[0x7E39..0x7E6C].inject(&:+)
|
27
|
+
content[0x2D6A] = (c1 & 0xFF00) >> 8
|
28
|
+
content[0x2D69] = c1 & 0xFF
|
29
|
+
content[0x7E6E] = (c2 & 0xFF00) >> 8
|
30
|
+
content[0x7E6D] = c2 & 0xFF
|
31
|
+
file.pos = 0
|
32
|
+
file.write content.map(&:chr).join("")
|
33
|
+
file.flush
|
34
|
+
file
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
class SaveFile
|
40
|
+
|
41
|
+
attr_accessor :save, :gs, :filename
|
42
|
+
|
43
|
+
def initialize save, filename, gs
|
44
|
+
@save, @gs, @filename = save, gs, filename
|
45
|
+
end
|
46
|
+
|
47
|
+
def verify_checksums
|
48
|
+
case gs
|
49
|
+
when true
|
50
|
+
return verify_gs_checksums
|
51
|
+
when false
|
52
|
+
return verify_c_checksums
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def write(loc = @filename)
|
57
|
+
@save.write(File.open(loc, "wb"))
|
58
|
+
verify_checksums
|
59
|
+
end
|
60
|
+
|
61
|
+
def set_team_species slot, species
|
62
|
+
return if !(0..5).include? slot
|
63
|
+
@save.team.pokemon[slot].species.assign species
|
64
|
+
@save.team.species_list[slot].assign species
|
65
|
+
end
|
66
|
+
|
67
|
+
def set_team_egg slot
|
68
|
+
return if !(0..5).include? slot
|
69
|
+
@save.team.species_list[slot].assign 0xFD
|
70
|
+
end
|
71
|
+
|
72
|
+
def hatch_team_egg slot
|
73
|
+
return if !(0..5).include? slot
|
74
|
+
@save.team.species_list[slot].assign @save.team.pokemon[slot].species
|
75
|
+
end
|
76
|
+
|
77
|
+
def method_missing(sym, *args, &block)
|
78
|
+
@save.send(sym, *args, &block)
|
79
|
+
end
|
80
|
+
|
81
|
+
private
|
82
|
+
|
83
|
+
def verify_gs_checksums
|
84
|
+
SaveFileReader.correct_checksums! File.open(@filename, "rb+")
|
85
|
+
end
|
86
|
+
|
87
|
+
def verify_c_checksums
|
88
|
+
|
89
|
+
end
|
90
|
+
|
91
|
+
end
|
92
|
+
|
93
|
+
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require_relative "../text_gs"
|
2
|
+
|
3
|
+
module RubyGS
|
4
|
+
|
5
|
+
class NameText < BinData::Primitive
|
6
|
+
string :val, :length => 11, :pad_byte => 'P'
|
7
|
+
|
8
|
+
def get
|
9
|
+
TextGS.decode self.val
|
10
|
+
end
|
11
|
+
|
12
|
+
def set v
|
13
|
+
self.val = TextGS.encode v
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require_relative "iv_data"
|
2
|
+
require_relative "pp_data"
|
3
|
+
require_relative "caught_data"
|
4
|
+
|
5
|
+
module RubyGS
|
6
|
+
|
7
|
+
class PartyPokemon < BinData::Record
|
8
|
+
endian :big
|
9
|
+
uint8 :species
|
10
|
+
uint8 :held_item
|
11
|
+
uint8 :move_1
|
12
|
+
uint8 :move_2
|
13
|
+
uint8 :move_3
|
14
|
+
uint8 :move_4
|
15
|
+
uint16 :ot_id
|
16
|
+
bit :exp, :nbits => 24
|
17
|
+
uint16 :hp_ev
|
18
|
+
uint16 :attack_ev
|
19
|
+
uint16 :defense_ev
|
20
|
+
uint16 :speed_ev
|
21
|
+
uint16 :special_ev
|
22
|
+
iv_data :iv
|
23
|
+
pp_data :pp_1
|
24
|
+
pp_data :pp_2
|
25
|
+
pp_data :pp_3
|
26
|
+
pp_data :pp_4
|
27
|
+
uint8 :happiness
|
28
|
+
uint8 :pokerus
|
29
|
+
caught_data :caught # Crystal only; Filled with 0x0s otherwise.
|
30
|
+
uint8 :level
|
31
|
+
uint8 :status
|
32
|
+
uint8 :unused
|
33
|
+
uint16 :current_hp
|
34
|
+
uint16 :max_hp
|
35
|
+
uint16 :attack
|
36
|
+
uint16 :defense
|
37
|
+
uint16 :speed
|
38
|
+
uint16 :special_attack
|
39
|
+
uint16 :special_defense
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require_relative "team"
|
2
|
+
require_relative "name_text"
|
3
|
+
require_relative "item_entry"
|
4
|
+
|
5
|
+
module RubyGS
|
6
|
+
|
7
|
+
class SaveFileGS < BinData::Record
|
8
|
+
endian :big
|
9
|
+
array :unused, :type => :uint8, :initial_length => 0x2000
|
10
|
+
array :options, :type => :uint8, :initial_length => 8
|
11
|
+
array :unused2, :type => :uint8, :initial_length => 1
|
12
|
+
uint16 :trainer_id
|
13
|
+
name_text :trainer_name
|
14
|
+
name_text :mom_name
|
15
|
+
name_text :rival_name
|
16
|
+
name_text :red_name
|
17
|
+
name_text :blue_name
|
18
|
+
#uint8 :daylight_savings
|
19
|
+
array :unused3, :type => :uint8, :initial_length => 0x35 - 0x24
|
20
|
+
array :time_played, :type => :uint8, :initial_length => 4
|
21
|
+
array :unused4, :type => :uint8, :initial_length => 0x14
|
22
|
+
uint8 :trainer_palette
|
23
|
+
array :unused5, :type => :uint8, :initial_length => 0x36F
|
24
|
+
bit :money, :nbits => 24
|
25
|
+
array :unused6, :type => :uint8, :initial_length => 0x8
|
26
|
+
array :tm_pocket, :type => :uint8, :initial_length => 57
|
27
|
+
uint8 :item_count
|
28
|
+
array :item_pocket, :type => :item_entry, :initial_length => 20
|
29
|
+
uint8 :key_count
|
30
|
+
array :key_pocket, :type => :uint8, :initial_length => 26
|
31
|
+
array :ball_pocket, :type => :uint8, :initial_length => 26
|
32
|
+
array :pc_items, :type => :uint8, :initial_length => 102
|
33
|
+
array :unused7, :type => :uint8, :initial_length => 0x240
|
34
|
+
uint8 :current_box
|
35
|
+
array :unused8, :type => :uint8, :initial_length => 0x2
|
36
|
+
array :box_names, :type => :uint8, :initial_length => 126
|
37
|
+
array :unused9, :type => :uint8, :initial_length => 0xE5
|
38
|
+
team :team
|
39
|
+
array :unused10, :type => :uint8, :initial_length => 0x16
|
40
|
+
array :dex_owned, :type => :uint8, :initial_length => 32
|
41
|
+
array :dex_seen, :type => :uint8, :initial_length => 32
|
42
|
+
array :footer, :type => :uint8, :initial_length => 0x559F
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require_relative "name_text"
|
2
|
+
require_relative "party_pokemon"
|
3
|
+
|
4
|
+
module RubyGS
|
5
|
+
|
6
|
+
class Team < BinData::Record
|
7
|
+
endian :big
|
8
|
+
uint8 :unused
|
9
|
+
uint8 :amount
|
10
|
+
array :species_list, :type => :uint8, :initial_length => 7
|
11
|
+
array :pokemon, :type => :party_pokemon, :initial_length => 6
|
12
|
+
array :ot_name, :type => :name_text, :initial_length => 6
|
13
|
+
array :name, :type => :name_text, :initial_length => 6
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require_relative "./structs/save_file"
|
2
|
+
require_relative "./structs/team"
|
3
|
+
require_relative "./structs/party_pokemon"
|
4
|
+
require_relative "./structs/item_entry"
|
5
|
+
require_relative "./structs/name_text"
|
6
|
+
require_relative "./structs/pp_data"
|
7
|
+
require_relative "./structs/iv_data"
|
8
|
+
require_relative "./structs/caught_data"
|
9
|
+
|
10
|
+
|
@@ -0,0 +1,48 @@
|
|
1
|
+
module RubyGS
|
2
|
+
|
3
|
+
class TextGS
|
4
|
+
|
5
|
+
def self.encode text
|
6
|
+
text.chars.map { |c| text_table[c] ? text_table[c].chr : c }.join
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.decode text
|
10
|
+
text.chars.map { |c| text_table.key(c.ord) ? text_table.key(c.ord) : "" }.join
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def self.text_table
|
16
|
+
{
|
17
|
+
"A" => 0x80, "B" => 0x81, "C" => 0x82,
|
18
|
+
"D" => 0x83, "E" => 0x84, "F" => 0x85,
|
19
|
+
"G" => 0x86, "H" => 0x87, "I" => 0x88,
|
20
|
+
"J" => 0x89, "K" => 0x8A, "L" => 0x8B,
|
21
|
+
"M" => 0x8C, "N" => 0x8D, "O" => 0x8E,
|
22
|
+
"P" => 0x8F, "Q" => 0x90, "R" => 0x91,
|
23
|
+
"S" => 0x92, "T" => 0x93, "U" => 0x94,
|
24
|
+
"V" => 0x95, "W" => 0x96, "X" => 0x97,
|
25
|
+
"Y" => 0x98, "Z" => 0x99,
|
26
|
+
|
27
|
+
"a" => 0xA0, "b" => 0xA1, "c" => 0xA2,
|
28
|
+
"d" => 0xA3, "e" => 0xA4, "f" => 0xA5,
|
29
|
+
"g" => 0xA6, "h" => 0xA7, "i" => 0xA8,
|
30
|
+
"j" => 0xA9, "k" => 0xAA, "l" => 0xAB,
|
31
|
+
"m" => 0xAC, "n" => 0xAD, "o" => 0xAE,
|
32
|
+
"p" => 0xAF, "q" => 0xB0, "r" => 0xB1,
|
33
|
+
"s" => 0xB2, "t" => 0xB3, "u" => 0xB4,
|
34
|
+
"v" => 0xB5, "w" => 0xB6, "x" => 0xB7,
|
35
|
+
"y" => 0xB8, "z" => 0xB9,
|
36
|
+
|
37
|
+
" " => 0xBA, "." => 0xE8,
|
38
|
+
|
39
|
+
"0" => 0xF6,"1" => 0xF7,"2" => 0xF8,
|
40
|
+
"3" => 0xF9,"4" => 0xFA,"5" => 0xFB,
|
41
|
+
"6" => 0xFC,"7" => 0xFD,"8" => 0xFE,
|
42
|
+
"9" => 0xFF
|
43
|
+
}
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
data/lib/ruby_gs.rb
ADDED
data/ruby_gs.gemspec
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'ruby_gs/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "ruby_gs"
|
8
|
+
spec.version = RubyGS::VERSION
|
9
|
+
spec.authors = ["Conrad King"]
|
10
|
+
spec.email = ["rainbowryke@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Allows viewing and editing of Pokemon G/S/C save files.}
|
13
|
+
spec.description = %q{RubyGS is a Ruby Gem that provides a simple interface to view and edit the data inside of a save file for the Gameboy Color games Pokemon Gold, Silver, and Crystal versions.}
|
14
|
+
spec.homepage = "https://github.com/RainbowReich/ruby_gs"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.bindir = "exe"
|
19
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.add_dependency "bindata", "~> 2.1.0"
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.8"
|
25
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,119 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ruby_gs
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Conrad King
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-12-04 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bindata
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.1.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.1.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.8'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.8'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
description: RubyGS is a Ruby Gem that provides a simple interface to view and edit
|
56
|
+
the data inside of a save file for the Gameboy Color games Pokemon Gold, Silver,
|
57
|
+
and Crystal versions.
|
58
|
+
email:
|
59
|
+
- rainbowryke@gmail.com
|
60
|
+
executables: []
|
61
|
+
extensions: []
|
62
|
+
extra_rdoc_files: []
|
63
|
+
files:
|
64
|
+
- ".gitignore"
|
65
|
+
- ".travis.yml"
|
66
|
+
- CODE_OF_CONDUCT.md
|
67
|
+
- Gemfile
|
68
|
+
- LICENSE.txt
|
69
|
+
- README.md
|
70
|
+
- Rakefile
|
71
|
+
- bin/console
|
72
|
+
- bin/setup
|
73
|
+
- lib/ruby_gs.rb
|
74
|
+
- lib/ruby_gs/save_file_reader.rb
|
75
|
+
- lib/ruby_gs/structs.rb
|
76
|
+
- lib/ruby_gs/structs/.caught_data.rb.swp
|
77
|
+
- lib/ruby_gs/structs/.item_entry.rb.swp
|
78
|
+
- lib/ruby_gs/structs/.iv_data.rb.swp
|
79
|
+
- lib/ruby_gs/structs/.name_text.rb.swp
|
80
|
+
- lib/ruby_gs/structs/.party_pokemon.rb.swp
|
81
|
+
- lib/ruby_gs/structs/.pp_data.rb.swp
|
82
|
+
- lib/ruby_gs/structs/.save_file.rb.swp
|
83
|
+
- lib/ruby_gs/structs/.team.rb.swp
|
84
|
+
- lib/ruby_gs/structs/caught_data.rb
|
85
|
+
- lib/ruby_gs/structs/item_entry.rb
|
86
|
+
- lib/ruby_gs/structs/iv_data.rb
|
87
|
+
- lib/ruby_gs/structs/name_text.rb
|
88
|
+
- lib/ruby_gs/structs/party_pokemon.rb
|
89
|
+
- lib/ruby_gs/structs/pp_data.rb
|
90
|
+
- lib/ruby_gs/structs/save_file.rb
|
91
|
+
- lib/ruby_gs/structs/team.rb
|
92
|
+
- lib/ruby_gs/text_gs.rb
|
93
|
+
- lib/ruby_gs/version.rb
|
94
|
+
- ruby_gs.gemspec
|
95
|
+
homepage: https://github.com/RainbowReich/ruby_gs
|
96
|
+
licenses:
|
97
|
+
- MIT
|
98
|
+
metadata: {}
|
99
|
+
post_install_message:
|
100
|
+
rdoc_options: []
|
101
|
+
require_paths:
|
102
|
+
- lib
|
103
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
104
|
+
requirements:
|
105
|
+
- - ">="
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
version: '0'
|
108
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
109
|
+
requirements:
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '0'
|
113
|
+
requirements: []
|
114
|
+
rubyforge_project:
|
115
|
+
rubygems_version: 2.4.6
|
116
|
+
signing_key:
|
117
|
+
specification_version: 4
|
118
|
+
summary: Allows viewing and editing of Pokemon G/S/C save files.
|
119
|
+
test_files: []
|