From: 1F616EMO <root@1f616emo.xyz>
---
advtrains/wagons.lua | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/advtrains/wagons.lua b/advtrains/wagons.lua
index 536c8d4..a9f2562 100644
--- a/advtrains/wagons.lua
+++ b/advtrains/wagons.lua
@@ -16,15 +16,7 @@ advtrains.wagons = {}
advtrains.wagon_alias = {}
advtrains.wagon_prototypes = setmetatable({}, {
__index = function(t, k)
- local rtn_val = rawget(t, k)
- if rtn_val ~= nil then
- return rtn_val
- end
- local alias = advtrains.wagon_alias[k]
- if alias then
- return rawget(t, alias)
- end
- return nil
+ return rawget(t, advtrains.wagon_alias[k])
end
})
advtrains.wagon_objects = {}
--
2.46.0
Sorry for not seeing y5nw's suggestions soon enough. This patch applies
the suggested optimizations.