/* called by: entrance ctrl of the object 'track'
: V( B: j t# E*/
9 n4 n; |% z: v. u% wis8 [) n1 H; s9 A% m5 K: ?& {" d& L
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" s2 d$ `$ `8 l! udo
# n& ~7 r" H0 n Lan := rootfolder.Internal.Tools.AOLlanguage;' f! U' j2 A# q* B9 p) n
if current = @.Destination -- else return0 o: m' e4 E+ d. K R
then
$ s; S; g. U( \ @.Destination := void;
( M& h% J' V! ? if @.occupied then
8 y" }" c; Y, `. p1 H9 N& ^ part := @.cont;4 o% c+ @' l' u6 A/ R5 ?% ?2 J
@.transpOrder := void;
- ?0 a& F H6 A: F part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 Q4 a9 E7 y5 T* r0 W$ g, W @,root.eventcontroller.simTime);
5 I2 {) e5 @$ d3 _2 t8 |* L5 p @.HasOrder := false;( Z! `9 o5 p+ F: W
@.DrivingHome := true;1 |1 }' G- z4 ~) @5 I
rgManager.tryToStartTransOrder;: r! D! J- e2 b( u" i/ u3 s! X
if @.Destination = void" P- T& g3 z9 J" Z3 p) o, {
then -- no transport order for vehicle @
' |# s! X8 n9 } @.Destination :=- T1 X6 N! Z, ?# S
rgManager.nearestFreeStation(@,track.~);, p* ]2 L' F2 L+ g9 I7 {
newDirection(@); 0 m0 {, v- h4 n
if @.Destination /= void then
8 F9 y7 K6 n/ V# w3 p1 g @.Destination.NumReservation :=8 i4 x8 j2 A" y8 c0 ]
@.Destination.NumReservation + 1;
3 A8 z2 ? A' {9 ]1 B end;
; ]+ X- S- z3 }3 w3 l1 z% a @.CurrIcon := "drivingHome";2 } o9 n( w! l6 {% T; [1 w$ p
@.DrivingHome := true;
# c0 A/ _2 m# }2 Q end;
5 g4 e$ N/ K. t7 b- j e' i& l else -- the vehicle @ is empty, both vehicle and part are in the same dock station, D. R6 @9 R; S O
part := @.transpOrder;
# p# J+ k2 }3 B7 y% [9 |2 h part.move(@);-- load part6 j. X2 K' _- m% w6 Y6 S
@.CurrIcon := "load";# P! f5 N$ _2 n# w/ a; f2 u8 P
GlobalDistObj := part.globDestination;6 L3 w* t' }" X3 R3 u% a! e
assignLObj := rgmanager.rgAssignL;; t# m8 O, s" T) D {! Q( n
row := assignLObj.getRowNo(GlobalDistObj);+ [/ ~) n# {7 ?+ R$ n
if Row = -1 then -- since 707 d. Y/ `7 Z- p& T8 L s; Y' r
if lan=1 then9 w2 J% I+ h% n& W3 ~5 Q0 [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 {$ h, `5 ?0 z5 b* t to_str("in der Andockstation: \"",?.~.name,"\""));- P% c) D( H) u2 z5 |2 ?
else
, d i. k* w! o3 R) J/ f promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; }% K* s/ `+ I- o5 H' _6 v to_str("in docking station: \"",?.~.name,"\""));
. }+ d- z/ L9 v( s k n8 s; o) z end;$ e& e) x. Y. b' o! |& J |
else4 f' c- A+ Z$ Z+ o6 h i- o* |
@.Destination := assignLObj[1,row];# }8 |7 n3 Z/ G$ [) ^7 f
end; 9 k' ~) ?+ x' C
newDirection(@);5 k/ m' j" `7 `
@.HasOrder := true;
- I7 S0 V/ D, r1 \* h end;+ \) X6 a4 v# n% l/ i
end;
5 S5 B( J. d' J! q* q# \end; -- of the method1 I: J3 ^7 z8 t' ?
|