Permalink
Browse files

add Gemfile, port show-useables

  • Loading branch information...
1 parent 3dfe6f6 commit 463759e1b292fb08fa4baf835a986f9a9fc68be7 @niv niv committed Feb 14, 2014
Showing with 21 additions and 7 deletions.
  1. +5 −7 build/show-useables.rb
  2. +4 −0 mod/Gemfile
  3. +12 −0 mod/Gemfile.lock
View
@@ -3,9 +3,7 @@
# useable.
require 'rubygems'
-require 'nwn/gff'
-require 'nwn/yaml'
-require 'yaml'
+require 'nwn/all'
$quit = false
trap "INT", proc { $quit = true }
@@ -19,10 +17,10 @@
gff = YAML.load(IO.read(file))
- gff['Placeable List'].value.each {|p|
- if p['Useable'].value == 1 && p['Static'].value == 0
- puts " %-32s %2x:%2x" % [ p['Tag'].value, p['X'].value, p['Y'].value ]
- puts " %s" % [ p.keys.select {|k| k =~ /^On/ }.map {|k| p[k].value}.join(' ') ]
+ (gff / 'Placeable List$').each {|p|
+ if p / 'Useable$' == 1 && p / 'Static$' == 0
+ puts " %-32s %2x:%2x" % [ p/'Tag$', p/'X$', p/'Y$' ]
+ puts " %s" % [ p.keys.select {|k| k =~ /^On/ }.map {|k| p/(k+"$")}.join(' ') ]
end
}
View
@@ -0,0 +1,4 @@
+source "https://rubygems.org"
+
+gem 'nwn-lib', '~> 0.6.0'
+gem 'parallel'
View
@@ -0,0 +1,12 @@
+GEM
+ remote: https://rubygems.org/
+ specs:
+ nwn-lib (0.6.0)
+ parallel (0.7.1)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ nwn-lib (~> 0.6.0)
+ parallel

0 comments on commit 463759e

Please sign in to comment.