/* called by: entrance ctrl of the object 'track'# J& M; Y4 v, C
*/
9 |$ Q0 S* H/ wis) T# I& W6 v* c: `1 V
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 S, b! e. k# y
do3 F9 [. e1 z' G* t( @ S
Lan := rootfolder.Internal.Tools.AOLlanguage;( J% N- h9 r, ]- ~7 b
if current = @.Destination -- else return
( W' |$ G5 v& U/ i7 r8 s. y6 j then
G% ]! x. H; g% {" p5 {1 {" U2 h; P @.Destination := void;& t* H1 o1 v" L! N
if @.occupied then
5 y2 x R4 {- c6 _' E" ~ part := @.cont;. S' l; i& z4 U" B: t( S
@.transpOrder := void;
7 M& G% k+ s' W a w* ?# e part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* N" \4 Y& c- n
@,root.eventcontroller.simTime);
3 U- J# E+ S7 ]# _2 a @.HasOrder := false;
$ x$ E2 @0 f! ?0 x @.DrivingHome := true;
& q8 S4 Y7 b7 H, c/ n& R rgManager.tryToStartTransOrder;
( h9 ?7 p! u4 Q2 q, u if @.Destination = void
( ~! ^% o& v7 K* Z& { then -- no transport order for vehicle @% r$ B/ J2 K0 n! b! c: ?7 x6 `
@.Destination :=& p% D9 _7 r5 a' a- I
rgManager.nearestFreeStation(@,track.~);
- m) v4 ~) p* ? newDirection(@);
( i: L7 X% S$ d) [) H if @.Destination /= void then3 n& l7 W) p3 ~$ d5 i D# i- q
@.Destination.NumReservation :=# L7 A5 K( U7 p1 C& V
@.Destination.NumReservation + 1;& r4 {: i" E [. e0 s5 ~- e
end;3 m8 \* X( C. O4 w! ]' d5 _
@.CurrIcon := "drivingHome";. c# R$ @& W$ D. N2 @! P$ o/ [
@.DrivingHome := true;# w# G6 @; s# S$ [) m& c
end;
) G }" ^& H* D0 d4 L7 l' X, c6 i( b else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' o$ G. u1 \, m) c part := @.transpOrder;
" Q2 D9 u$ U, X# H8 B+ I% _ part.move(@);-- load part+ i8 h7 l0 T6 u7 l
@.CurrIcon := "load";( Q* J$ C3 a. d; p8 ^0 f* ]9 b
GlobalDistObj := part.globDestination;3 X- O" n ^$ @6 K
assignLObj := rgmanager.rgAssignL;# R' ~3 \; e/ |* c9 N% i1 L
row := assignLObj.getRowNo(GlobalDistObj);
& T- u/ u1 x' p8 p if Row = -1 then -- since 70& }0 R g6 h: v
if lan=1 then
/ X9 {/ A6 K$ S% X, u" ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 Y( i6 \' t- h; O0 K& d
to_str("in der Andockstation: \"",?.~.name,"\""));, k$ _0 O/ ]& Z$ w) G' v: s
else1 ~8 _7 @! z1 o1 X: F0 Q: G5 }
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ l: S: h! }8 B# E# C, K
to_str("in docking station: \"",?.~.name,"\""));
4 s9 D$ |! v! h* C" Q end;
+ v9 Y3 b9 b. i9 A) C else
# a* A7 f: l; X4 x( {0 M5 `9 u @.Destination := assignLObj[1,row];5 g) i- h9 c4 ~# o: V: f! {$ |
end;
, h( U3 Y) q* Z newDirection(@);! u' [4 ~ X! l8 k
@.HasOrder := true;
0 B: a8 d+ k/ h end;
! ]" O m. a. ^2 R end;2 W- {. H# e# d/ @/ T
end; -- of the method, k5 {7 z5 ~. I7 y* [( x
|