From ab35c7b05b5209e7b982f2ea936fb713c7fc83fe Mon Sep 17 00:00:00 2001 From: Maverick2797 Date: Sat, 18 Oct 2025 16:42:41 +0800 Subject: Redo how wagon groups are calculated - Added "at_rideable" to include anything that can be ridden, rather than the previous hardcoded "pass" seat name. - Changed how "at_control" was calculated (now checks for driving_ctrl_access) - Changed how "at_pax" was calculated (now checks for not driving_ctrl_access) --- advtrains/wagons.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/advtrains/wagons.lua b/advtrains/wagons.lua index 52ce577..adb12b0 100644 --- a/advtrains/wagons.lua +++ b/advtrains/wagons.lua @@ -1401,8 +1401,14 @@ function advtrains.register_wagon(sysname_p, prototype, desc, inv_img, nincreati local wagon_groups = { not_in_creative_inventory = nincreative and 1 or 0} if prototype.is_locomotive then wagon_groups['at_loco'] = 1 end if prototype.seat_groups then - if prototype.seat_groups.dstand then wagon_groups['at_control'] = 1 end - if prototype.seat_groups.pass then wagon_groups['at_pax'] = 1 end + wagon_groups['at_rideable'] = 1 + for seats, seat in pairs(prototype.seat_groups) do + if seat.driving_ctrl_access then + wagon_groups['at_control'] = 1 + else + wagon_groups['at_pax'] = 1 + end + end end if prototype.has_inventory then wagon_groups['at_freight'] = 1 end -- cgit v1.2.3