Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem









Add this to SteamGenerator.lua
Events.onItemFall.Add(function(item)
if item:getFullType() == 'SteamGenerator.Generator' then
local player = getPlayer()
if player then
local gen = player:getCurrentSquare():getGenerator()
if gen then
local genCondition = gen:getCondition()
local itemCondition = item:getCondition()
local genFuel = gen:getFuel()
local itemModData = item:getModData()
local itemFuel = itemModData.fuel or 0
-- this is the only way to be reasonably sure it's the
-- same generator and not fallen from another player
if genCondition == itemCondition and (math.abs(genFuel - itemFuel) < 0.01) then
updateSpriteAndModData(gen, item)
end
end
end
end
end)