/* called by: entrance ctrl of the object 'track'
- Q6 ]; N& n2 }# V. G/ n*/3 ~+ c! z7 n& o$ J% W
is( N: c7 `: u" `9 {5 _8 z) W2 L
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 T$ ]+ W6 ? f* w; Q4 z7 s* {1 G! Odo! Z- v/ R4 R. B# S7 L$ o
Lan := rootfolder.Internal.Tools.AOLlanguage;
, x5 _: o+ F' N7 |6 m9 y' ~ if current = @.Destination -- else return
6 n) F' Y5 { N# d" P+ U0 I then5 t" y4 q) z( ?( H( J3 P# |/ G
@.Destination := void;
) r% D; b2 j t$ t8 ~# y8 _# Q) j) m4 a if @.occupied then
. ?4 e* v0 ~- x part := @.cont;
+ B4 W+ `" T# {: z4 q @.transpOrder := void;' A$ f3 @9 L/ G" N5 D" i) n7 G& ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" {* X7 Y9 W6 _, d4 W6 w: m- l @,root.eventcontroller.simTime);
* w8 t8 P- j, T @.HasOrder := false;/ C$ C- V4 U& ~& E5 f+ ]: U U
@.DrivingHome := true;$ {' h$ Z6 C$ Y2 H
rgManager.tryToStartTransOrder;
2 d c) j% V1 d5 ^ if @.Destination = void
7 F" {6 M0 k" }0 t6 z% [ then -- no transport order for vehicle @
! m2 F$ P/ M* @$ f* V) K @.Destination :=/ t1 `& V3 G7 p& u
rgManager.nearestFreeStation(@,track.~);+ {& n I8 A) |# U
newDirection(@);
3 C- w9 [8 f, x. ~' _: M0 }' v if @.Destination /= void then
) T5 W* Z! Z% V2 o @.Destination.NumReservation :=
- Z" G4 K# R) D @.Destination.NumReservation + 1;
. S' g+ V% \4 ^1 I end;
, L# D' r- @: {8 Q; j2 ? @.CurrIcon := "drivingHome";/ D% z; H! m; B3 K
@.DrivingHome := true;
3 B: f( P' P: Q+ n# V; ?6 b. L end;: E. s$ C: ?" p) q1 j: L) l8 e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% m& Q# m2 Z7 w0 T part := @.transpOrder;# T0 F+ q# o; S# k! |+ B
part.move(@);-- load part
8 _: h d8 `; A5 O Q9 k/ n @.CurrIcon := "load";
^) W. X- ] r9 l0 p. } GlobalDistObj := part.globDestination;0 S) \. {* x2 m; |) {
assignLObj := rgmanager.rgAssignL;; o3 e1 S! l) U3 S
row := assignLObj.getRowNo(GlobalDistObj);9 h( ^2 @: C$ j" v! Z& p/ n2 t' V* x
if Row = -1 then -- since 70. h# j, R. N! O; i# q
if lan=1 then6 Z3 d) t. G/ h9 e p; ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 j" m6 D" _9 Z4 z, i+ y8 D6 L
to_str("in der Andockstation: \"",?.~.name,"\""));
# c+ u- b7 \- j& M/ Q else
" B* h1 x- w# C( O2 ]$ r! ^* m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! y& b7 K) X1 H0 R) y( f to_str("in docking station: \"",?.~.name,"\""));
; _) a! L3 z2 d6 j9 } end;: D; o6 f) y9 n; I Q6 A, }2 Y) T
else4 H. c9 j; i8 x) H6 q
@.Destination := assignLObj[1,row];$ F; d4 `9 [' B0 b0 B
end;
/ o. f8 t3 y; | newDirection(@);! e$ H: U, h1 f5 n
@.HasOrder := true;
8 p- D* a- _, V' z- J end;
/ e+ m% D# G& | end;
5 j" r/ @2 Y- }/ ^* f, Zend; -- of the method J1 L2 @$ K; F7 |# n& U1 |
|