Construction Mode: Fix girder/rubber cost not being updated correctly after selection
authorWuzzy <Wuzzy2@mail.ru>
Thu, 29 Nov 2018 03:26:35 +0100
changeset 14339 efd2e8e217c9
parent 14338 ce2e67c5af14
child 14340 05c1d471694f
Construction Mode: Fix girder/rubber cost not being updated correctly after selection
ChangeLog.txt
share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua
--- a/ChangeLog.txt	Thu Nov 29 01:43:41 2018 +0300
+++ b/ChangeLog.txt	Thu Nov 29 03:26:35 2018 +0100
@@ -115,6 +115,9 @@
  + Play poison hurt sound when mutant is low on health
  + Unlock game scheme
 
+Construction Mode:
+ * Fix girder/rubber cost not being updated correctly after selection
+
 Continental supplies:
  + Continents are now selected before the game starts
  + Continents give hog different start health
--- a/share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua	Thu Nov 29 01:43:41 2018 +0300
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua	Thu Nov 29 03:26:35 2018 +0100
@@ -1189,10 +1189,12 @@
 		if (curWep == amGirder) then
 			cIndex = 1
 			RedefineSubset()
+			updateCost()
 			updated = true
 		elseif (curWep == amRubber) then
 			cIndex = 2
 			RedefineSubset()
+			updateCost()
 			updated = true
 		elseif (curWep == amCMStructurePlacer) then
 			cIndex = 9
@@ -1537,7 +1539,6 @@
 
 	if foundMatch == true then
 		RedefineSubset()
-		--updateCost()
 		HandleConstructionModeTools()
 	end
 end