VanaTime 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,11 +1,11 @@
1
1
 
2
- # Gem::Specification for Vanatime-2.1.0
2
+ # Gem::Specification for Vanatime-2.1.1
3
3
  # Originally generated by Echoe
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = %q{VanaTime}
7
- s.version = "2.1.0"
8
- s.date = %q{2007-09-18}
7
+ s.version = "2.1.1"
8
+ s.date = %q{2007-09-20}
9
9
  s.summary = %q{A library for converting realtime to vanadiel time}
10
10
  s.email = %q{ttilley@gmail.com}
11
11
  s.homepage = %q{http://vanatime.rubyforge.org/}
@@ -19,7 +19,7 @@ end
19
19
 
20
20
  # # Original Rakefile source (requires the Echoe gem):
21
21
  #
22
- # version = "2.1.0"
22
+ # version = "2.1.1"
23
23
  #
24
24
  # ENV['RUBY_FLAGS'] = ""
25
25
  #
@@ -24,7 +24,7 @@ module FFXI
24
24
 
25
25
  if SPECIAL_ELEMENTS.include? element
26
26
  index = SPECIAL_ELEMENTS.index element
27
- direction = SPECIAL_ELEMENTS_DIRECTION[index]
27
+ direction = SPECIAL_ELEMENT_DIRECTION[index]
28
28
  opposed = SPECIAL_ELEMENTS[(index - 1) % 2]
29
29
  color = SPECIAL_ELEMENT_COLORS[index]
30
30
  enfeeble = SPECIAL_ELEMENT_ENFEEBLE[index]
@@ -2,6 +2,11 @@ module FFXI
2
2
  class SkillupCalculator < Util::RubyBean
3
3
  include FFXI::Constants
4
4
 
5
+ property :success_direction, :quality_direction
6
+ property :success_with_advanced, :neutral_with_advanced
7
+ property :quality_with_advanced
8
+ property :success_with_free, :neutral_with_free, :quality_with_free
9
+ property :success_with_none, :neutral_with_none, :quality_with_none
5
10
  property :day_crystal_factor, :moon_phase_factor, :base_difficulty
6
11
  property :skillup_difficulty
7
12
 
@@ -75,10 +80,12 @@ module FFXI
75
80
  case type
76
81
  when :success
77
82
  direction = @crystal_element.direction
83
+ self.success_direction = direction
78
84
  direction_modifier = 0.5
79
85
  when :quality
80
86
  estr = ElementFactory.send "#{@crystal_element.strength}"
81
87
  direction = estr.direction
88
+ self.quality_direction = direction
82
89
  direction_modifier = -0.5
83
90
  when :neutral
84
91
  direction = "Neutral"
@@ -103,6 +110,16 @@ module FFXI
103
110
  neutral = build_difficulty_hash(:neutral)
104
111
  quality = build_difficulty_hash(:quality)
105
112
 
113
+ self.success_with_advanced = "%.3g" % success[:advanced_support]
114
+ self.success_with_free = "%.3g" % success[:free_support]
115
+ self.success_with_none = "%.3g" % success[:no_support]
116
+ self.neutral_with_advanced = "%.3g" % neutral[:advanced_support]
117
+ self.neutral_with_free = "%.3g" % neutral[:free_support]
118
+ self.neutral_with_none = "%.3g" % neutral[:no_support]
119
+ self.quality_with_advanced = "%.3g" % quality[:advanced_support]
120
+ self.quality_with_free = "%.3g" % quality[:free_support]
121
+ self.quality_with_none = "%.3g" % quality[:no_support]
122
+
106
123
  self.skillup_difficulty = {
107
124
  :success => success,
108
125
  :neutral => neutral,
@@ -7,7 +7,7 @@ module FFXI
7
7
  property :hour_start, :minute_start, :second_start
8
8
  property :date, :month, :year, :tomorrow
9
9
  property :date_start, :month_start, :year_start
10
- property :earth_time, :vana_time
10
+ property :earth_time, :earth_time_string, :vana_time
11
11
  property :time_string, :date_string
12
12
 
13
13
  def initialize(opts={})
@@ -31,12 +31,14 @@ module FFXI
31
31
  def update_earth_time(time)
32
32
  raise "input needs to be a Time object" if ! time.is_a? Time
33
33
  self.earth_time = time
34
+ self.earth_time_string = time.to_s
34
35
  vt = FFXI::Common.earth_to_vana(time)
35
36
  set_properties(vt)
36
37
  end
37
38
 
38
39
  def update_vana_time(vt)
39
40
  self.earth_time = Time.at(FFXI::Common.vana_to_earth(vt))
41
+ self.earth_time_string = earth_time.to_s
40
42
  set_properties(vt)
41
43
  end
42
44
 
@@ -34,6 +34,5 @@ module FFXI
34
34
  end
35
35
 
36
36
  end
37
-
38
37
  end
39
38
  end
metadata CHANGED
@@ -3,9 +3,9 @@ homepage: http://vanatime.rubyforge.org/
3
3
  extensions: []
4
4
  executables: []
5
5
  version: !ruby/object:Gem::Version
6
- version: 2.1.0
6
+ version: 2.1.1
7
7
  post_install_message:
8
- date: 2007-09-18 04:00:00 +00:00
8
+ date: 2007-09-20 04:00:00 +00:00
9
9
  files:
10
10
  - README
11
11
  - Manifest