1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-10 00:43:27 +02:00

Merge pull request #303 from Agocelt/MF_locomotive_health_purchase

Purchasing train health heals it by the amount increased
This commit is contained in:
Gerkiz 2022-08-29 20:05:40 +02:00 committed by GitHub
commit 02f6a315c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1006,8 +1006,13 @@ local function gui_click(event)
}
)
this.locomotive_max_health = this.locomotive_max_health + 20000
local health_per_upgrade = 20000
this.locomotive_health = this.locomotive_health + health_per_upgrade
this.locomotive_max_health = this.locomotive_max_health + health_per_upgrade
if this.locomotive_health >= this.locomotive_max_health then
this.locomotive_health = this.locomotive_max_health
end
--[[
this.locomotive_max_health = this.locomotive_max_health + (this.locomotive_max_health * 0.5)
This exists as a reminder to never ever screw up health pool ever again.