Giter VIP home page Giter VIP logo

publictransit's Introduction

publictransit's People

Contributors

colonelkai avatar mosemister avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mosemister

publictransit's Issues

Transport weight

When transporting on a line a player must be holding a select amount of items or lower to transport. This weight value should have a global default specified in the config file but each line may overwrite this value.

If a line does not overwrite this value and the config value changes, then the weight value should change too

  • create a config value for weight enabled of a boolean (default true)
  • create a config value for weight of a integer (default value of 500)
  • create a nullable integer of weight in the Line (if null then read config value when getting the value)
  • weight is calculated based on all items in the players inventory plus the items stack size
  • write tests

Bidirection Line Backwards Travel Bug

AKA the "minor adjustment."

For bidirectional lines, going backwards in the order of the line's nodes causes players to first travel from their current stop to the line's last stop, and then to their intended destination.

The stop at the end of the line should not be occurring and the player should just be traveling directly from their current stop to their desired stop, which is previous in the line.

https://media.discordapp.net/attachments/1191808063536123924/1191810408797978686/image.png?ex=65a6caf0&is=659455f0&hm=c095577957d26b92ee1fc8a125d8e7cb70e8ed7647a138c309318d0fb1d3107a&=&format=webp&quality=lossless&width=1920&height=412
Issue modeled by ColonelKai.

Writing Commands

##Player Commands

  • /travel <startingnode> <endingnode>
    Travels a player on the line, starting node argument should be suggest the nearby nodes, and then once a starting node is chosen, the available ending nodes from that starting node should be suggested. @mosemister Can we make the second argument of a command suggest based on the first argument? If not, we will just suggest all available nodes from all nearby nodes.

  • /publictransit info <line> [index]
    Lists all relevant information on the stop/line. When the line is provided, the second argument (marked as index) will be available both as names for stops and indexes for all nodes.

  • /publictransit cost <start node> <end node>
    Returns the price of traveling between the said nodes.

##Admin Commands

Line

  • /publictransit createline <linename>
    Creates a new line. The values like cost, costType, direction etc shall be loaded from the config as the default value.

  • /publictransit setlineoption <option> <value>
    Changes options of a line like cost, name, costType, direction etc...

  • /publictransit deleteline <linename> [linename again for confirmation]
    Delete a line. We will use the classic cheap confirmation method of a second arg.

Node

  • /publictransit createnode stop <linename> [nodePrice]
    Creates a new node. Location is set to the location of the player.

  • /publictransit createnode transitional <linename> [nodePrice]
    Creates a new node. Location is set to the location of the player.

  • /publictransit setnodeoption <option> <value>
    Changes options of a node like location, name, nodetype, time...

  • /publictransit deletenode <linename><index> [nodename again for confirmation]
    Delete a node. We will use the classic cheap confirmation method of a second arg.

  • /publictransit movenode <oldlinename> <oldindex> <newlinename> <newindex>
    Moves a node. The line could be the same. When removed, all indexes larger than node should be lowered by 1. When added, opposite. I think this is how indexes work in java anyway.

  • /publictransit clonenode <oldlinename> <oldindex> <newlinename> <newindex>
    Clones a node. Same as above, except the old one stays.

Config

General Settings

  • (double) PLAYER_DISTANCE_FROM_NODE; Max distance a player needs to be from a node to interact with it

Node Default Settings

  • (double) DEFAULT_NODE_PRICE; Default price for a node.
  • (double) DEFAULT_NODE_TIME; Default time for a node. (in seconds)

Line Default Settings

  • (CostType) DEFAULT_LINE_COST_TYPE; Default cost type for a line.

Economy Settings

  • (boolean) USE_DEPOSIT_ACCOUNT; if a non-player (or player) should be used to deposit the ticket fees to.
  • (?) DEPOSIT_ACCOUNT; the account to be used as deposit.

Weight Limit Settings
See issue #18

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.