1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Feedback Needed] Changes to the bank class

Discussion in 'Executive Blogs' started by Cloud, May 1, 2014.

  1. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    In V1.0.0 beta 16 and prior, the Bank class includes Bank.getNearestBank.
    In V1.0.0 beta 17 and above, this is going to change slightly, in what way though I've yet to decide.

    Option 1
    Bank.getNearestBank will be renamed to Bank.getNearest and Bank.getLoaded will be added.

    Option 2 (My favorite)
    A class called Banks will be added alongside the other entity retrieval classes with plenty of helpers including Banks.getNearestTo(Locatable), Banks.getLoadedWithin(Area), etc. I feel like this is more appropriate because currently the Bank class resides within the interfaces package, while the retrieval has nothing to do with that. This would also allow for the most expansion and the most extensive methods related to this.

    Option 3
    Expand the GameObjects class to include getNearestBank, getLoadedBanks, and several others. It'll make the GameObjects class feel cluttered and will limit expansion because we don't want to clutter it further.

    Please voice your opinion :)
     
  2. Black Fire

    Joined:
    Dec 13, 2013
    Messages:
    83
    Likes Received:
    7
    Option 2 looks good imo
     
  3. dog_

    Joined:
    Nov 3, 2013
    Messages:
    277
    Likes Received:
    95
    Option 2
     
  4. Viewer

    Viewer Discretion is advised

    Joined:
    Jan 2, 2014
    Messages:
    306
    Likes Received:
    77
    Option 2
     
  5. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    #5 Cloud, May 1, 2014
    Last edited: May 2, 2014
  6. Black Fire

    Joined:
    Dec 13, 2013
    Messages:
    83
    Likes Received:
    7
    Sorry if i am a bit of a noob, but how would get bankBooth.nearestTo work? So lets say im cooking at the range in alkharid, i want it to go to the Al-kharid bank. Do i do .nearestTo the range itself?
     
  7. Salvation

    Salvation First Bot Author

    Joined:
    Aug 7, 2013
    Messages:
    262
    Likes Received:
    68
    getNearestTo is basically the EXACT same as getNearest but with a predefined variable, as getNearest returns getNearestTo(Players.getLocal()).
     
  8. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    Banks.getNearest() would return the nearest bank relative to the local player, while Banks.getNearestTo(range) would return the nearest bank relative to the range.
     

Share This Page

Loading...