Made so mass tech sync does not make sounds or messages, only notifies at the end

This commit is contained in:
psihius committed 2019-07-14 15:00:55 +02:00
1 parent b666a909ab
commit 71870daaba
2 files changed
+17 -11

No files matched your search

+13 -11
View File
@@ -1,15 +1,17 @@
/silent-command
if game.forces['player'].technologies['{tech_name}'] then
if 1 == {tech_infinite} then
game.forces['player'].technologies['{tech_name}'].level = {tech_level}
else
game.forces['player'].technologies['{tech_name}'].researched = true
end
script.raise_event(defines.events.on_research_finished, {research=game.forces['player'].technologies['{tech_name}'], by_script=true})
game.play_sound({path="utility/research_completed"})
if 1 == {tech_infinite} then
game.print("Infinite technology {tech_name} level {tech_level} unlocked")
else
game.print("Technology {tech_name} researched")
end
game.forces['player'].technologies['{tech_name}'].level = {tech_level}
else
game.forces['player'].technologies['{tech_name}'].researched = true
end
script.raise_event(defines.events.on_research_finished, {research=game.forces['player'].technologies['{tech_name}'], by_script=true})
if {notify} then
if 1 == {tech_infinite} then
game.print("Infinite technology {tech_name} level {tech_level} unlocked")
else
game.print("Technology {tech_name} researched")
end
game.play_sound({path="utility/research_completed"})
end
end