プロジェクト

全般

プロフィール

致命的 #715 » 0001-mikutter.patch

Satoshi Okuno, 2014-10-05 19:20

差分を表示:

core/plugin/achievement/achievement.rb
43 43
  def notachieved_parent
44 44
    unachievements = Plugin.filtering(:unachievements, {}).first
45 45
    if @options[:depends]
46
    result = @options[:depends].map{ |slug| unachievements[slug] }.any?
46
      result = @options[:depends].map{ |slug| unachievements[slug] }.compact.first
47

  
47 48
      if result
48
        result.notachieved_parent
49
        result
49 50
      else
50 51
        self end
51 52
    else
    (1-1/1)