diff options
author | orwell96 <mono96.mml@gmail.com> | 2018-02-20 16:22:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-20 16:22:31 +0100 |
commit | e9322075a366f7d09b472194a13bdb239f7410cf (patch) | |
tree | 1c9ad7ca4d23486078212bac0540514e4ea12aa4 | |
parent | 06cdb14f3d28780f011d842c17580c748d2020f2 (diff) | |
download | advtrains-e9322075a366f7d09b472194a13bdb239f7410cf.tar.gz advtrains-e9322075a366f7d09b472194a13bdb239f7410cf.tar.bz2 advtrains-e9322075a366f7d09b472194a13bdb239f7410cf.zip |
Allow wagon owners to control their own trains
...even without the train_operator privilege
This still doesn't allow them to control switches, but whatever...
-rw-r--r-- | advtrains/wagons.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/advtrains/wagons.lua b/advtrains/wagons.lua index fd01abd..81b7571 100644 --- a/advtrains/wagons.lua +++ b/advtrains/wagons.lua @@ -251,7 +251,7 @@ function wagon:on_step(dtime) --driver control
for seatno, seat in ipairs(self.seats) do
local driver=self.seatp[seatno] and minetest.get_player_by_name(self.seatp[seatno])
- local has_driverstand = self.seatp[seatno] and minetest.check_player_privs(self.seatp[seatno], {train_operator=true})
+ local has_driverstand = self.seatp[seatno] and (minetest.check_player_privs(self.seatp[seatno], {train_operator=true}) or self.owner==self.seatp[seatno])
if self.seat_groups then
has_driverstand = has_driverstand and (seat.driving_ctrl_access or self.seat_groups[seat.group].driving_ctrl_access)
else
|