/* called by: entrance ctrl of the object 'track'& F7 L4 K2 l `$ u+ N9 X6 x% K
*/2 C$ z( q% M) Y ]6 S- ?" P. g* y# b m
is4 X, w" `3 u" W& O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 ? C% N/ o$ \7 f; w+ hdo
: e! v- E2 m5 O& `5 R Lan := rootfolder.Internal.Tools.AOLlanguage;
# L4 C: E; Q' K4 t: k if current = @.Destination -- else return
' {& G/ D! A l8 k+ o+ \ then& v. B: v: K0 L$ c& ?: u- W/ e
@.Destination := void;
( F9 K- r1 |8 B$ v1 A9 k4 u! P if @.occupied then
7 |+ F2 P0 b, p% R part := @.cont;
9 r) z8 o9 w6 p* i @.transpOrder := void;
+ H* ?+ K' Z" { D1 ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ Z% { {5 b( O @,root.eventcontroller.simTime);3 O% Q/ I: a- v; z
@.HasOrder := false;
4 G8 o. l, W& _2 `6 { @.DrivingHome := true;
! |3 ?! t$ s$ s n* H4 B+ j0 R( Y rgManager.tryToStartTransOrder;
" v) P* q# G" ?$ y7 ^, l if @.Destination = void
* ^' s" v" X* |, q6 E& ?: X. h n then -- no transport order for vehicle @ a$ ~9 O8 P1 \
@.Destination :=
. d3 O4 ^7 z' a: D0 `& d7 N rgManager.nearestFreeStation(@,track.~);. j; S% o/ i3 c# J+ C9 D
newDirection(@);
) e& a. A# b3 v2 q if @.Destination /= void then3 f# t6 K# P* w5 B/ Z
@.Destination.NumReservation :=
, c: C5 a n" t4 g @.Destination.NumReservation + 1;. c$ E9 L+ l' _
end;
% j6 t" h! i/ l5 ^ @.CurrIcon := "drivingHome";
; }/ p, E' u* Q! S, k; _ @.DrivingHome := true;, }; D3 x2 V- d! m- I% ~
end;
( l$ Y( Q, s& [! g/ V2 y8 k S' M else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ z& |/ N( i* C
part := @.transpOrder;4 y" b/ z5 o$ P5 n" S
part.move(@);-- load part
+ K& {* T; q! Z @.CurrIcon := "load";
% ~7 _, e6 ]9 |4 p. K GlobalDistObj := part.globDestination;2 G; \2 C6 b6 @, a# K/ o
assignLObj := rgmanager.rgAssignL;
7 s9 n, w% u, l9 t( x. V, J: [ row := assignLObj.getRowNo(GlobalDistObj);
6 {8 H1 e1 ]& G5 h+ V# ?( \& x if Row = -1 then -- since 70
9 [; @, q5 }( Z$ t if lan=1 then# x! j4 i0 G" z$ v. b z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' |, }4 p7 A9 f( J/ H to_str("in der Andockstation: \"",?.~.name,"\""));& N& y; K2 Y; f0 \4 L
else1 T. `; G q0 T& j, i% M. P
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 s' J( ?( n: Z. a, q1 H* h" ?
to_str("in docking station: \"",?.~.name,"\"")); , L& H! V6 ] F& y; Y
end;. c4 z' S p( C1 I7 T( K
else7 ~: q2 y% J( s7 C: U/ ~& S; k& d6 T
@.Destination := assignLObj[1,row];/ f$ B6 M X( v9 Q- |& d- Y: g
end; , F" I, c! I6 w' c. x! Q: P
newDirection(@);5 X- ^" C; d) y: b/ i
@.HasOrder := true;5 S% ~6 l; U( v/ a
end;
( e4 C) v. P$ _+ d( e) b6 \# ~( ?7 j end;
4 z+ D& }: `% q7 h! [, T" Cend; -- of the method
6 N& k* H& w9 L/ T: y C |