public float priorityFor(Actor actor) {
    final Item[] available = available(this.actor) ;
    if (available.length == 0) return 0 ;
    
    final float rangePenalty = (
      Plan.rangePenalty(actor, origin) +
      Plan.rangePenalty(actor, destination) +
      Plan.rangePenalty(origin, destination)
    ) / (driven == null ? 2f : 10f) ;

    float offset = rangePenalty ;
    if (shouldPay == actor && stage <= STAGE_PICKUP) {
      int price = 0 ;
      float foodVal = 0 ;
      for (Item i : available) {
        price += purchasePrice(i, actor, origin) ;
        if (Visit.arrayIncludes(ALL_FOOD_TYPES, i.type)) foodVal += i.amount ;
      }
      if (price > actor.gear.credits()) return 0 ;
      offset += actor.mind.greedFor(price) * CASUAL ;
      offset -= actor.health.hungerLevel() * CASUAL * foodVal ;
    }
    else for (Item i : available) {
      offset -= i.amount / 5f ;
    }
    return Visit.clamp(
      ROUTINE + priorityMod - offset, 0, URGENT
    ) ;
  }