diff --git a/MekHQ/src/mekhq/campaign/Campaign.java b/MekHQ/src/mekhq/campaign/Campaign.java index 424684b1b0..b6856780be 100644 --- a/MekHQ/src/mekhq/campaign/Campaign.java +++ b/MekHQ/src/mekhq/campaign/Campaign.java @@ -4910,7 +4910,7 @@ public void processNewDayPersonnel() { processWeeklyRelationshipEvents(person); } - processWeeklyEdgeResets(person); + person.resetCurrentEdge(); if (!person.getStatus().isMIA()) { processFatigueRecovery(this, person); @@ -4999,14 +4999,11 @@ private void processAdvancedMedicalEvents(Person person) { } /** - * Process weekly Edge resets for a given person. - * - * @param person the person for whom weekly Edge resets will be processed + * @deprecated use {@link Person#resetCurrentEdge()} instead */ + @Deprecated(since = "0.50.05", forRemoval = true) private void processWeeklyEdgeResets(Person person) { - if ((person.hasSupportRole(true) || person.isEngineer())) { - person.resetCurrentEdge(); - } + person.resetCurrentEdge(); } /** diff --git a/MekHQ/src/mekhq/campaign/personnel/Person.java b/MekHQ/src/mekhq/campaign/personnel/Person.java index 712b94eed6..a53c06aab9 100644 --- a/MekHQ/src/mekhq/campaign/personnel/Person.java +++ b/MekHQ/src/mekhq/campaign/personnel/Person.java @@ -216,7 +216,7 @@ public class Person { // Supports edge usage by a ship's engineer composite crewman private int edgeUsedThisRound; - // To track how many edge points support personnel have left until next refresh + // To track how many edge points personnel have left until next refresh private int currentEdge; // phenotype and background @@ -2417,10 +2417,7 @@ public void writeToXML(final PrintWriter pw, int indent, final Campaign campaign indent, "edge", getOptionList("::", PersonnelOptions.EDGE_ADVANTAGES)); - // For support personnel, write an available edge value - if (hasSupportRole(true) || isEngineer()) { - MHQXMLUtility.writeSimpleXMLTag(pw, indent, "edgeAvailable", getCurrentEdge()); - } + MHQXMLUtility.writeSimpleXMLTag(pw, indent, "edgeAvailable", getCurrentEdge()); } if (countOptions(PersonnelOptions.MD_ADVANTAGES) > 0) { @@ -4255,14 +4252,14 @@ public void changeEdge(final int amount) { } /** - * Resets support personnel edge points to the purchased level. Used for weekly refresh. + * Resets edge points to the purchased level. Used for weekly refresh. */ public void resetCurrentEdge() { setCurrentEdge(getAdjustedEdge()); } /** - * Sets support personnel edge points to the value 'currentEdge'. Used for weekly refresh. + * Sets edge points to the value 'currentEdge'. Used for weekly refresh. * * @param currentEdge - integer used to track this person's edge points available for the current week */ @@ -5056,18 +5053,6 @@ public void changeWealth(final int delta) { wealth = clamp(newValue, MINIMUM_WEALTH, MAXIMUM_WEALTH); } - /** - * Adjusts the person's wealth by the specified amount. - * - *

The change in wealth can be positive or negative, depending on the provided delta value.

- * - * @param delta The amount by which to adjust the wealth. A positive value increases the wealth, while a negative - * value decreases it. - */ - public void changeWealth(final int delta) { - this.wealth += delta; - } - public boolean isHasPerformedExtremeExpenditure() { return hasPerformedExtremeExpenditure; } diff --git a/MekHQ/src/mekhq/gui/view/PersonViewPanel.java b/MekHQ/src/mekhq/gui/view/PersonViewPanel.java index 766eec07e9..55161fb0fd 100644 --- a/MekHQ/src/mekhq/gui/view/PersonViewPanel.java +++ b/MekHQ/src/mekhq/gui/view/PersonViewPanel.java @@ -1613,7 +1613,7 @@ private JPanel fillSkills() { lblEdge2.setName("lblEdge2"); lblEdge1.setLabelFor(lblEdge2); - lblEdge2.setText(Integer.toString(edge)); + lblEdge2.setText("" + person.getCurrentEdge() + '/' + person.getEdge()); lblEdge2.setToolTipText(person.getEdgeTooltip()); gridBagConstraints = new GridBagConstraints(); gridBagConstraints.gridx = 1; @@ -1624,27 +1624,6 @@ private JPanel fillSkills() { gridBagConstraints.fill = GridBagConstraints.NONE; gridBagConstraints.anchor = GridBagConstraints.NORTHWEST; pnlSkills.add(lblEdge2, gridBagConstraints); - - if (campaign.getCampaignOptions().isUseSupportEdge() && person.hasSupportRole(true)) { - // Add the Edge Available field for support personnel only - lblEdgeAvail1.setName("lblEdgeAvail1"); - lblEdgeAvail1.setText(resourceMap.getString("lblEdgeAvail1.text")); - gridBagConstraints = new GridBagConstraints(); - gridBagConstraints.gridx = 2; - gridBagConstraints.gridy = firsty; - gridBagConstraints.fill = GridBagConstraints.NONE; - gridBagConstraints.anchor = GridBagConstraints.NORTHWEST; - pnlSkills.add(lblEdgeAvail1, gridBagConstraints); - - lblEdgeAvail2.setName("lblEdgeAvail2"); - lblEdgeAvail1.setLabelFor(lblEdgeAvail2); - lblEdgeAvail2.setText(Integer.toString(person.getCurrentEdge())); - gridBagConstraints.gridx = 3; - gridBagConstraints.gridwidth = 1; - gridBagConstraints.weightx = 1.0; - gridBagConstraints.insets = new Insets(0, 10, 0, 0); - pnlSkills.add(lblEdgeAvail2, gridBagConstraints); - } firsty++; }