1
0
mirror of https://github.com/metrostroi-repo/MetrostroiAddon.git synced 2026-05-02 00:42:29 +00:00

Fix have_inrerchange (#346)

This commit is contained in:
Hellss
2021-08-10 00:54:54 +03:00
committed by GitHub
parent 54e10bc40b
commit 41f81c0ad5
7 changed files with 47 additions and 33 deletions

View File

@@ -190,6 +190,13 @@ Metrostroi.AnnouncementsASNP = {}
Metrostroi.ASNPSetup = {}
function Metrostroi.AddANSPAnnouncer(name,soundtable,datatable)
if not soundtable or not datatable then return end
for k,v in pairs(datatable) do
if not istable(v) then continue end
for k2,stbl in pairs(v) do
if not istable(stbl) then continue end
if stbl.have_inrerchange then stbl.have_interchange = true end
end
end
for k,v in pairs(Metrostroi.AnnouncementsASNP) do
if v.name == name then
Metrostroi.AnnouncementsASNP[k] = soundtable
@@ -251,6 +258,13 @@ Metrostroi.RRISetup = {}
function Metrostroi.SetRRIAnnouncer(soundtable,datatable)
if not soundtable or not datatable then return end
Metrostroi.AnnouncementsRRI = {soundtable}
for k,v in pairs(datatable) do
if not istable(v) then continue end
for k2,stbl in pairs(v) do
if not istable(stbl) then continue end
if stbl.have_inrerchange then stbl.have_interchange = true end
end
end
Metrostroi.RRISetup = datatable
print("Metrostroi: Set RRI announcer.")