Skip to content

Commit

Permalink
Add javadocs to important fields
Browse files Browse the repository at this point in the history
  • Loading branch information
mayant15 committed Aug 9, 2019
1 parent 8b51b4a commit 2e96295
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ public class TradingScreen extends CoreScreenLayer {
@In
private NUIManager nuiManager;

/**
* UI Elements
*/
private UIList<MarketItem> pList;
private UIList<MarketItem> cList;
private UIButton confirm;
Expand All @@ -46,12 +49,21 @@ public class TradingScreen extends CoreScreenLayer {
private UILabel pCost;
private UILabel cCost;

/**
* Information for UILists
*/
private List<MarketItem> pItems = new ArrayList<>();
private List<MarketItem> cItems = new ArrayList<>();

/**
* Selected items
*/
private MarketItem pSelected = MarketItemBuilder.getEmpty();
private MarketItem cSelected = MarketItemBuilder.getEmpty();

/**
* Trade result message
*/
private String message;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,22 @@ public class TradingUISystem extends BaseComponentSystem {
@In
private BlockCommands blockCommands;

private final int PROBABILITY = 50;
/**
* Maximum percentage difference between two values for them to be considered about equal
*/
private final int MARGIN_PERCENTAGE = 20;

private TradingScreen tradingScreen;
/**
* Probability that a trade will be accepted, provided the costs are about equal
*/
private final int PROBABILITY = 50;

/**
* Citizen entity that the player is trading with
*/
private EntityRef targetCitizen = EntityRef.NULL;

private TradingScreen tradingScreen;
private Logger logger = LoggerFactory.getLogger(TradingUISystem.class);

@Override
Expand Down

0 comments on commit 2e96295

Please sign in to comment.