Update events.lua

This commit is contained in:
phidias authored and GitHub committed 2026-11-20 00:00:01 +09:00
1 parent 4cffb71e9c
commit 1bd21a7a39
1 file changed
-4
-4
View File
@@ -94,10 +94,6 @@ local function get_cause_player(cause)
local occupant = cause --- @type LuaEntity | LuaPlayer local occupant = cause --- @type LuaEntity | LuaPlayer
if crewed_vehicles[cause.type] then if crewed_vehicles[cause.type] then
local crew = cause.get_driver() 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 if not crew then return nil end
occupant = crew occupant = crew
end end