/* called by: entrance ctrl of the object 'track'& Z8 o! n% o l8 P- Q
*/
* q3 i' S- f) n1 o# d/ z% wis3 H6 Q- T, f! |0 [$ u$ U$ `
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ w8 d$ c) L6 X2 }5 n0 Ndo* }$ i$ g3 \5 ^6 |1 D
Lan := rootfolder.Internal.Tools.AOLlanguage;: M( ?* N* y6 N' m. \5 ^ s' d
if current = @.Destination -- else return- D% C! o/ ]0 t+ x! f) J5 ?
then' Z. R4 D8 ^, k3 m1 f* e
@.Destination := void;
: c3 G+ y! q0 A if @.occupied then
8 H, P2 _, `' J6 E part := @.cont;
. M0 i4 a; Q/ L* `; F @.transpOrder := void;
7 F9 o ^7 W) N: b! s0 c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 L( ~1 h [( }% m! l5 M* w @,root.eventcontroller.simTime);5 ?) S' D9 N/ T/ p" z3 I$ \" R4 i. G8 C
@.HasOrder := false;3 k ]+ {5 c% N
@.DrivingHome := true;. C/ ]# T: @/ v" V! i" m
rgManager.tryToStartTransOrder;5 f5 x% O2 }6 f
if @.Destination = void' ^0 a% u; y: u# a5 i; p" S
then -- no transport order for vehicle @
9 u$ h6 ^% ~, L1 P @.Destination :=
; g$ J# t3 \4 l; L, L3 i5 [ rgManager.nearestFreeStation(@,track.~);
' M/ G+ g; {; H7 w newDirection(@); ) N' R, B8 l( ~/ u+ F
if @.Destination /= void then
) L7 Z% S# R, D @.Destination.NumReservation :=
5 u7 E' X4 t) ^2 I* D# D5 f1 U9 r @.Destination.NumReservation + 1;. l$ s+ z# q. T( n
end;
( _1 y5 ?5 }# ?' y( C @.CurrIcon := "drivingHome";+ p: ?3 j/ e& `- E" \3 t
@.DrivingHome := true;* E V5 z: ?4 A, e. N
end;
: c. t K8 s. i7 m. [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station* K8 o% p/ g2 Q# L- x6 V1 b
part := @.transpOrder;
# q* g. J0 A; s7 \9 w& d) H part.move(@);-- load part
/ B, E7 a& V6 f( d- P/ F @.CurrIcon := "load";
; J" Z5 v3 J( C. r- R+ N8 g GlobalDistObj := part.globDestination;" @% d' s0 A7 P( U2 H6 ?" h
assignLObj := rgmanager.rgAssignL;
. F+ Z& L" Y3 V/ m, ]$ K8 r" t$ z; M, q+ v8 w row := assignLObj.getRowNo(GlobalDistObj);
) m# n! L9 C" h, Z+ X# h) B if Row = -1 then -- since 70
+ H5 _. r+ O4 b- s. l4 e if lan=1 then
0 v9 L. f7 S8 u7 o' { promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; C8 @) x3 l$ _7 M) i- S
to_str("in der Andockstation: \"",?.~.name,"\""));
* }8 V8 x: A* Q3 T9 [ else( }' `4 W3 K4 v3 F7 E$ C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* C7 H- }+ x1 M, e2 ?
to_str("in docking station: \"",?.~.name,"\""));
" ^% K( _- m1 z( a4 ]1 E' |# L end;
6 g( s! f; g2 i6 t; Y3 K else* y1 ?1 T+ a, s" |6 S: _" o
@.Destination := assignLObj[1,row];! H) F; H3 {6 H
end; 9 A% l# `( g, k% E" O( T# }
newDirection(@);
* ?% r: ^6 ~3 \9 j" m# n @.HasOrder := true;+ N, X! F- T5 l* Z" x3 Q
end;
( |( V p- B+ R/ s+ Z end;
! Q: i6 W P3 y' Q: @end; -- of the method
* x, d1 c9 `7 t( M0 s) Y9 [ |