lib/engine/game/g_1862/game.rb
# freight trains only count set ends, but add in hex distance bonus - allocate to first train in set
freight trains only count set ends, but add in hex distance bonus - allocate to first train in set
freight trains only count set ends but add in hex distance bonus - allocate to first train in set
def freight_revenue(route, stops)
          return 0 if route.chains.empty?
          route_set = freight_sets(route.routes).find { |set| set.include?(route) }
          ends = (set_ends = freight_set_ends(route_set)) & stops
          rev = 0
          unless ends.empty?
            rev = ends.sum do |stop|
              stop_on_other_route?(route, stop) ? 0 : stop.route_revenue(route.phase, route.train)
            end
          end
          return rev unless route == route_set.first
          rev + (hex_crow_distance(route_set, set_ends.first, set_ends.last) * freight_bonus(route_set))
        end
def freight_revenue ( route , stops ) return 0 if route . chains . empty? route_set = freight_sets ( route . routes ) . find { | set | set . include? ( route ) } ends = ( set_ends = freight_set_ends ( route_set ) ) & stops rev = 0 unless ends . empty? rev = ends . sum do | stop | stop_on_other_route? ( route , stop ) ? 0 : stop . route_revenue ( route . phase , route . train ) end end return rev unless route == route_set . first rev + ( hex_crow_distance ( route_set , set_ends . first , set_ends . last ) * freight_bonus ( route_set ) ) end
freight trains only count set ends, but add in hex distance bonus - allocate to first train in set
freight trains only count set ends but add in hex distance bonus - allocate to first train in set
route
<not_specific>
stops
<not_specific>