mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fixed warehouse building not generating any rewards
This commit is contained in:
parent
f0480b033f
commit
398fa1e73d
@ -1119,7 +1119,7 @@ TIME_PERIODS = {
|
||||
}
|
||||
|
||||
REWARDS = {
|
||||
"power": 4, "warehouse": 2, "fuel": 2, "ammo": 2,
|
||||
"power": 4, "warehouse": 2, "ware": 2, "fuel": 2, "ammo": 2,
|
||||
"farp": 1, "fob": 1, "factory": 10, "comms": 10, "oil": 10,
|
||||
"derrick": 8
|
||||
}
|
||||
|
||||
@ -130,6 +130,8 @@ class QGroundObjectMenu(QDialog):
|
||||
total_income = total_income + REWARDS[building.category]
|
||||
if not building.is_dead:
|
||||
received_income = received_income + REWARDS[building.category]
|
||||
else:
|
||||
logging.warning(building.category + " not in REWARDS")
|
||||
|
||||
self.financesBox = QGroupBox("Finances: ")
|
||||
self.financesBoxLayout = QGridLayout()
|
||||
@ -315,9 +317,9 @@ class QBuyGroupForGroundObjectDialog(QDialog):
|
||||
self.buyArmorButton.setText("Buy [$" + str(db.PRICES[self.buyArmorCombo.itemData(self.buyArmorCombo.currentIndex())] * self.amount.value()) + "M][-$" + str(self.current_group_value) + "M]")
|
||||
|
||||
def buyArmor(self):
|
||||
print("Buy Armor ")
|
||||
logging.info("Buying Armor ")
|
||||
utype = self.buyArmorCombo.itemData(self.buyArmorCombo.currentIndex())
|
||||
print(utype)
|
||||
logging.info(utype)
|
||||
price = db.PRICES[utype] * self.amount.value() - self.current_group_value
|
||||
if price > self.game.budget:
|
||||
self.error_money()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user