You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Date: 2022-07-22
Features:
- use RichText [train-stop=uid] for stations
- use RichText [train=uid] for trains
Changes:
- GPS tags disabled by default, was too spammy
ifmessage_level>=3thenprintmsg({"ltn-message.train-found", from, to, matched_network_id_string, tostring(trainInventorySize), tostring(totalStacks) }, requestForce) end
587
+
ifmessage_level>=3thenprintmsg({"ltn-message.train-found", from_gps, to_gps, matched_network_id_string, tostring(trainInventorySize), tostring(totalStacks) }, requestForce) end
588
588
ifdebug_logthenlog("Train to transport "..tostring(trainInventorySize).."/"..tostring(totalStacks).." stacks from "..from.." to "..to.." in network "..matched_network_id_string.." found in Depot.") end
Copy file name to clipboardExpand all lines: script/train-events.lua
+6-4
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,8 @@ function TrainArrives(train)
41
41
end
42
42
localis_provider=false
43
43
44
-
ifmessage_level>=3thenprintmsg({"ltn-message.train-arrived", tostring(trainName), stop_name}, trainForce, false) end
44
+
-- if message_level >= 3 then printmsg({"ltn-message.train-arrived", tostring(trainName), stop_name}, trainForce, false) end
45
+
ifmessage_level>=3thenprintmsg({"ltn-message.train-arrived", Make_Train_RichText(train, trainName), format("[train-stop=%d]", stopID)}, trainForce, false) end
45
46
ifdebug_logthenlog(format("(TrainArrives) Train [%d] \"%s\": arrived at LTN-stop [%d] \"%s\"; train_faces_stop: %s", train.id, trainName, stopID, stop_name, stop.parked_train_faces_stop )) end
46
47
47
48
ifstop.error_code==0then
@@ -52,8 +53,8 @@ function TrainArrives(train)
52
53
ifmessage_level>=1then
53
54
printmsg({
54
55
"ltn-message.delivery-removed-depot",
55
-
MakeGpsString(from_entity, delivery.from),
56
-
MakeGpsString(to_entity, delivery.to)
56
+
Make_Stop_RichText(from_entity) ordelivery.from,
57
+
Make_Stop_RichText(to_entity) ordelivery.to
57
58
}, delivery.force, false)
58
59
end
59
60
ifdebug_logthenlog(format("(TrainArrives) Train [%d] \"%s\": Entered Depot with active Delivery. Failing Delivery and reseting train.", train.id, trainName)) end
@@ -318,7 +319,8 @@ function TrainLeaves(trainID)
318
319
-- remove train reference
319
320
stop.parked_train=nil
320
321
stop.parked_train_id=nil
321
-
ifmessage_level>=3thenprintmsg({"ltn-message.train-left", tostring(stoppedTrain.name), stop.entity.backer_name}, stoppedTrain.force) end
322
+
-- if message_level >= 3 then printmsg({"ltn-message.train-left", tostring(stoppedTrain.name), stop.entity.backer_name}, stoppedTrain.force) end
323
+
ifmessage_level>=3thenprintmsg({"ltn-message.train-left", Make_Train_RichText(train, stoppedTrain.name), format("[train-stop=%d]", stopID)}, stoppedTrain.force, false) end
0 commit comments