diff options
author | orwell96 <orwell@bleipb.de> | 2018-10-29 16:04:36 +0100 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2018-10-29 16:04:36 +0100 |
commit | 9f6ae55e37141e8e446e6229132495e69b0e31ad (patch) | |
tree | f743f06b704582494283d1625efa533dd9eff99f /advtrains/wagons.lua | |
parent | c1d5fb0e8ccc30e39919a910b30d5466a84a8464 (diff) | |
download | advtrains-9f6ae55e37141e8e446e6229132495e69b0e31ad.tar.gz advtrains-9f6ae55e37141e8e446e6229132495e69b0e31ad.tar.bz2 advtrains-9f6ae55e37141e8e446e6229132495e69b0e31ad.zip |
Small fixes which do not have any effect
Diffstat (limited to 'advtrains/wagons.lua')
-rw-r--r-- | advtrains/wagons.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/advtrains/wagons.lua b/advtrains/wagons.lua index c532d30..1621da8 100644 --- a/advtrains/wagons.lua +++ b/advtrains/wagons.lua @@ -864,7 +864,7 @@ function wagon:handle_bordcom_fields(pname, formname, fields) local data = advtrains.wagons[self.id]
local seatno=self:get_seatno(pname)
- if not seatno or not self.seat_groups[self.seats[seatno].group].driving_ctrl_access or not advtrains.check_driving_couple_protection(pname, self.owner, self.whitelist) then
+ if not seatno or not self.seat_groups[self.seats[seatno].group].driving_ctrl_access or not advtrains.check_driving_couple_protection(pname, data.owner, data.whitelist) then
return
end
local train = self:train()
@@ -1053,7 +1053,8 @@ function wagon:seating_from_key_helper(pname, fields, no) end
end
function wagon:check_seat_group_access(pname, sgr)
- if self.seat_groups[sgr].driving_ctrl_access and not (advtrains.check_driving_couple_protection(pname, self.owner, self.whitelist)) then
+ local data = advtrains.wagons[self.id]
+ if self.seat_groups[sgr].driving_ctrl_access and not (advtrains.check_driving_couple_protection(pname, data.owner, data.whitelist)) then
return false, "Not allowed to access a driver stand!"
end
if self.seat_groups[sgr].driving_ctrl_access then
|