/* called by: entrance ctrl of the object 'track'
9 ?$ o* F f& |. b# W' ?$ l9 b# y*/3 e! Q2 @& _2 L% x" ?8 A" p4 ]* ^
is L) B! ?3 A4 V/ p& Z) v, b: n
part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 T6 @1 U3 z7 S G0 _7 _
do
# i' w- ~; B9 Q' o! S+ i Lan := rootfolder.Internal.Tools.AOLlanguage;
& S1 M3 x- ]" z# N: ?5 W if current = @.Destination -- else return* E6 }- k) f2 v" \
then( y7 u, a( k2 U% k2 ]
@.Destination := void;" d& P" {( I& Q0 h7 G2 D
if @.occupied then! D7 O, }9 e& E: b: ^
part := @.cont;
$ r5 t# m- w, b" |( O+ Q' S. c @.transpOrder := void;
5 v$ ?4 @# b9 {7 a# N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 B! y. m# A5 q6 s
@,root.eventcontroller.simTime);9 f: }: l# }; q4 H/ h
@.HasOrder := false;
: X8 d8 b9 V5 G( |5 _: c5 M% I @.DrivingHome := true;
9 c+ C8 N! ]0 ?" y# k+ b ] rgManager.tryToStartTransOrder;
: q6 e. }* J2 ~6 h4 |# i if @.Destination = void
# o o2 L6 v$ \. M7 P: V8 @ then -- no transport order for vehicle @
1 B9 o8 N$ T/ Q5 V' T* S @.Destination :=) n. u5 d% K/ d
rgManager.nearestFreeStation(@,track.~);# f% _9 v0 Z, E7 D% _) ~ j' _
newDirection(@);
: o4 ?, \/ L0 ~! f' k' L if @.Destination /= void then
4 o9 O! r f7 g5 L! m( p5 D @.Destination.NumReservation :=
8 o% }( w7 Z' p5 M! ] @.Destination.NumReservation + 1;! E2 \4 q7 @3 ]4 F/ u7 v: }) H
end;; w T( R) I* k
@.CurrIcon := "drivingHome";
, j9 p* d6 V- p$ A6 Q @.DrivingHome := true;
# O" k' d, ~) p# R& L end;
; e2 a# g' ?9 M else -- the vehicle @ is empty, both vehicle and part are in the same dock station& H; }9 G' Q' V. q8 [$ |
part := @.transpOrder;
. [, b0 t9 g+ t: b0 q+ R part.move(@);-- load part
, J v5 B, O, X" ^0 R @.CurrIcon := "load";" a: k" S$ G& c
GlobalDistObj := part.globDestination;
- X* Q0 S9 n" c, o assignLObj := rgmanager.rgAssignL;
& N" A* x5 U. C! j( G; t7 C row := assignLObj.getRowNo(GlobalDistObj);9 ^0 G$ ?0 r) i
if Row = -1 then -- since 70
4 w8 C- H2 y! j8 v! J6 c if lan=1 then$ R, Z0 [+ L# {4 O
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& Y' X% `4 t. W) q3 W0 Y2 j" E to_str("in der Andockstation: \"",?.~.name,"\""));1 L. S* {8 W/ s. Z
else
5 V) ^+ z- f; _5 }' F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 {# `8 ]3 X6 A; h/ k# j& H; l1 A
to_str("in docking station: \"",?.~.name,"\"")); % t+ d! ~( O0 z- G# ]$ A8 o
end;+ t1 a. w9 L- L3 c$ U# I
else. K7 A- e9 o" G4 m$ X
@.Destination := assignLObj[1,row];
% O( \' A! A5 F# a3 Q5 b, i/ v# E+ f end; + ]$ Z! J* S6 o# m5 D( i
newDirection(@);
( N& a% T/ H8 F' S" d& ] @.HasOrder := true;5 \5 D5 H; y" ?/ B* e! A# G) }6 M* ]) D
end;. t& n2 L! Q8 q4 u6 W2 `* b
end;) Q& ~. b g( v3 f O K
end; -- of the method& m. V8 N1 U) _& e' d# K0 X5 z
|