/* called by: entrance ctrl of the object 'track'7 [! N4 p& Q. b6 V9 A
*/
# G( b& Z" A7 ?/ T6 Q+ w- Kis
4 u8 x J; o- ^5 R! Z* Q; g a part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' N' W: \1 |* @% M+ j5 Fdo. r' M& `: @) m" v/ T; F
Lan := rootfolder.Internal.Tools.AOLlanguage;- D8 E+ s u z' v8 K
if current = @.Destination -- else return
h$ V) o- F R5 m6 Q then
- [# E' O- H2 Q. W# o9 x6 y @.Destination := void;
! d& `' T& t2 B if @.occupied then
! w' S+ e& E$ ?% N1 h }3 V; | part := @.cont;+ v/ b+ F" P# t5 I7 V
@.transpOrder := void;' f. X3 D! c* |3 v# @
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; d1 o, r7 P" ~# R0 P* T @,root.eventcontroller.simTime);' M, l/ ^! r8 Q @4 _
@.HasOrder := false;
$ J$ h1 d5 l) F; {* ]; W" L @.DrivingHome := true;' t1 ]' _, n7 ?+ J" [
rgManager.tryToStartTransOrder;5 X, }& d; U" v$ T
if @.Destination = void
' E/ L' l. t" C. Z, h then -- no transport order for vehicle @
# a H% G9 `- n/ b- Z @.Destination :=
& C3 ^, s2 c2 m6 P6 L$ E! m rgManager.nearestFreeStation(@,track.~);
# E1 e9 j2 l) Y: [6 f7 m3 [8 T newDirection(@); 1 R- N4 R& Y+ l
if @.Destination /= void then. S0 F% b6 H% z
@.Destination.NumReservation :=
+ J* R! o" G, k @.Destination.NumReservation + 1;
$ y! u f. a# J9 t5 J5 k end;
0 u% Y9 N b# X @.CurrIcon := "drivingHome";
' j% s, |1 V# _ @.DrivingHome := true;. i' I- Y6 L& N7 C
end; |$ w6 \8 k; S
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% X4 c" t* ~: \2 z& O. @" @0 m part := @.transpOrder;
; r; z- {, \. B/ j0 a1 W. E part.move(@);-- load part
5 w e! E- i, r& X9 R' `7 ~ @.CurrIcon := "load";
- L, b; Y: u# }0 R X3 `% A( t* u GlobalDistObj := part.globDestination;' Z: r# G9 Q4 Z( m/ |
assignLObj := rgmanager.rgAssignL;
* p( E' O4 J2 U* g3 P% r1 ~+ H5 h row := assignLObj.getRowNo(GlobalDistObj); m! r6 Q8 @" [, ~7 ^% y) s* C* I$ D
if Row = -1 then -- since 70
8 i. ?- W# d1 M# A/ x0 K if lan=1 then/ K& Z: }( b V2 E, d
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( Y& ]+ i' K I' H2 E* n. L to_str("in der Andockstation: \"",?.~.name,"\""));
/ Y1 I9 ?. R. u* V+ Y/ ` else
5 S9 z! D4 O3 w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 l5 U/ g5 W. q4 t3 u0 Z to_str("in docking station: \"",?.~.name,"\"")); + s9 j# r2 |7 L: C
end;
( G( w7 b2 O+ z else
0 o, Q! l! R2 K @.Destination := assignLObj[1,row];* q; M! G A! w, {) G C8 K
end; $ F) ]- N- T$ j$ t6 m
newDirection(@);
5 S) }! j! M1 h# s @.HasOrder := true;
7 e* k. H/ n% Y: F/ F% A end;
. g0 t% u% g, X# J end;
4 g0 G6 N8 A$ y6 \' oend; -- of the method9 |( p" J! x7 A5 E, ]) K! z
|