diff options
author | Gabriel PĂ©rez-Cerezo <gabriel@gpcf.eu> | 2018-02-21 19:58:45 +0100 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2018-02-21 20:03:34 +0100 |
commit | 481f6218a8b377a0826b7e080046b5a890702e12 (patch) | |
tree | 3baa24616afb8790eb16f882863241b9f7d91523 /advtrains/wagons.lua | |
parent | 4c512f1dc5755efc7afd55b58078ec466442f648 (diff) | |
download | advtrains-481f6218a8b377a0826b7e080046b5a890702e12.tar.gz advtrains-481f6218a8b377a0826b7e080046b5a890702e12.tar.bz2 advtrains-481f6218a8b377a0826b7e080046b5a890702e12.zip |
Log certain events in a logfile in the world directory
(also fix the output of /at_sync_ndb)
Diffstat (limited to 'advtrains/wagons.lua')
-rw-r--r-- | advtrains/wagons.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/advtrains/wagons.lua b/advtrains/wagons.lua index 3ddd8b0..2dce41b 100644 --- a/advtrains/wagons.lua +++ b/advtrains/wagons.lua @@ -1087,6 +1087,9 @@ function wagon:check_seat_group_access(pname, sgr) if self.seat_groups[sgr].driving_ctrl_access and not (minetest.check_player_privs(pname, "train_operator") or self.owner==pname) then
return false, "Missing train_operator privilege."
end
+ if self.seat_groups[sgr].driving_ctrl_access then
+ advtrains.log("Drive", pname, self.object:getpos(), self:train().text_outside)
+ end
if not self.seat_access then
return true
end
@@ -1120,7 +1123,8 @@ function wagon:safe_decouple(pname) minetest.chat_send_player(pname, "Couple is locked (ask owner or admin to unlock it)")
return false
end
- atprint("wagon:discouple() Splitting train", selftrain_id)
+ atprint("wagon:discouple() Splitting train", self.train_id)
+ advtrains.log("Discouple", pname, self.object:getpos(), self:train().text_outside)
advtrains.split_train_at_wagon(self)--found in trainlogic.lua
return true
end
|