/* called by: entrance ctrl of the object 'track'+ x7 T& w, P& e
*/
( `3 R2 a8 s, G/ O iis
" W# p) y1 Z; a# F: p0 ]2 } part, GlobalDistObj, assignLObj:object;row,Lan:integer;. b& R( V* e& x0 Y! n1 o
do
( ~4 x! ]% M6 R Lan := rootfolder.Internal.Tools.AOLlanguage;
/ Z) q% I; I; ~; J if current = @.Destination -- else return
# l' S% d2 P3 h* `% h; W# @# T then
+ }6 _& D+ W# ]- |0 U @.Destination := void;
- `5 J( o- q- P2 J' j if @.occupied then
2 @6 }/ m6 E5 L q part := @.cont;
' u* w$ v5 i0 w7 X" C @.transpOrder := void;
4 C2 `' h% C) m5 S/ _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ B$ F9 T: A3 I; |, G" [ @,root.eventcontroller.simTime);* {$ `6 r0 y u5 {
@.HasOrder := false;( ?/ Y* i9 L- T# a( B
@.DrivingHome := true;
: u6 I% _) W9 e% q; i# e$ C7 X rgManager.tryToStartTransOrder;
y+ G) F5 T7 E9 `5 o( ?5 M+ u q' I if @.Destination = void* h4 i: ?: [- v$ E
then -- no transport order for vehicle @6 u* u: [) b7 l9 U* e
@.Destination :=9 m- N5 z: c( g2 v
rgManager.nearestFreeStation(@,track.~);
; [" e& Z& j& J8 o% m8 Y newDirection(@); ; Y1 A# t/ u" P& j6 Q
if @.Destination /= void then
) p, W; }4 I% m% W$ c @.Destination.NumReservation :=
; U3 C( x! A# e# X @.Destination.NumReservation + 1;( b3 \7 V5 F- Y2 L6 a
end;9 ^, O; M2 B: R/ `+ {
@.CurrIcon := "drivingHome";3 i( y) f) X: |: }$ t
@.DrivingHome := true;1 D" I7 L* y! V) S" m d
end;
8 U, R! x3 b- y% K6 u6 P: Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, u! ~8 l: P; Q: U; B9 @0 C part := @.transpOrder;+ O+ I- @- n7 ?% \! N
part.move(@);-- load part: Q$ M2 T2 g1 g# ~2 g% o' v$ B
@.CurrIcon := "load";% h/ L) }2 B- j- O) t Q
GlobalDistObj := part.globDestination;8 r7 V/ j8 z, }' p0 ]( P/ i9 l2 g% ]
assignLObj := rgmanager.rgAssignL;# Q" l5 L% c& e
row := assignLObj.getRowNo(GlobalDistObj);; Y* T, V. I! f% t
if Row = -1 then -- since 707 B& Q: y+ @- `% y8 i) A
if lan=1 then& H, u* J2 L4 G0 p4 p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ I3 M( ~9 e4 f5 _ to_str("in der Andockstation: \"",?.~.name,"\""));
* S/ m6 r, u ? else7 \; H1 F6 w. M& G+ B, @6 A
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; O- S$ L' I g9 Y9 k
to_str("in docking station: \"",?.~.name,"\"")); , d: m# P' O5 K9 B, O
end;3 S% }3 l- j9 ?2 c2 B3 h4 F0 v8 `
else
4 @* p# Q2 p; \3 w% k8 w @.Destination := assignLObj[1,row];1 P9 ]" c6 X# r3 z; B# {( Z: _" z
end; H* f7 g$ Y; o
newDirection(@);, G0 i) M& K' e
@.HasOrder := true;$ m4 p, r6 e7 d9 S i8 Z% F* T* B. h
end;% f* ^7 `# a2 Q( y* z# l `+ e9 t/ ?9 G
end;: w, G# [. g/ m
end; -- of the method! s1 `0 m) \3 Y1 `/ h! t
|