Update events.lua

This commit is contained in:
phidias authored and GitHub committed 2026-11-16 19:52:04 +09:00
1 parent aaad274734
commit 4cffb71e9c
1 file changed
+1
+1
View File
@@ -95,6 +95,7 @@ local function get_cause_player(cause)
if crewed_vehicles[cause.type] then
local crew = cause.get_driver()
if not crew and cause.type ~= "locomotive" then
-- train passenger could be more than one. also access by LuaEntity.train?.passengers -> []
crew = cause.get_passenger()
end
if not crew then return nil end