/* called by: entrance ctrl of the object 'track'7 {; [. j8 Q( y* D; ?" Z( C
*/
+ X8 Z: T, R4 W+ c( G& l/ L7 vis
) O& _5 ]. z# E+ o part, GlobalDistObj, assignLObj:object;row,Lan:integer;* v, u4 B4 V" a
do1 F5 ~& S/ h( X5 I6 p( P) u) l
Lan := rootfolder.Internal.Tools.AOLlanguage;
* d4 Y$ @' h7 o6 K. f, v4 ] if current = @.Destination -- else return7 i: r9 h/ \# N7 }/ W' k4 p
then
. F! q- L: Q' J0 D0 h9 K @.Destination := void;
, f& x: X, l% D% _ if @.occupied then+ Y& X: ?3 g- c& R) O# ?, [
part := @.cont;
! K2 B1 r. U3 K6 J" }/ L @.transpOrder := void;! M; e9 F* l/ P/ A
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. u% b6 s# [# _3 M: k8 F0 M @,root.eventcontroller.simTime);. k, `5 ~5 g: [4 `
@.HasOrder := false;8 |! W9 I& q6 r& a0 `) G
@.DrivingHome := true;
6 V* H3 e- _( s8 E5 k, |+ `8 G1 e rgManager.tryToStartTransOrder;
8 u- _6 n3 d1 N! u5 R6 O( } if @.Destination = void
5 j8 m# T7 ?- Y' ]: s6 { then -- no transport order for vehicle @
- `$ B9 W: o! Q4 e: N @.Destination :=
5 U3 M5 N( o5 ?. y# P$ Z1 t7 P9 l rgManager.nearestFreeStation(@,track.~);
* {4 e3 D/ N3 f, C' E newDirection(@);
! T7 A. r5 G5 }# x9 l2 l7 n if @.Destination /= void then
) A6 m1 i# S& m' k1 I7 ` @.Destination.NumReservation :=& w0 n9 e5 m: ?& v+ F) b
@.Destination.NumReservation + 1;
6 {# e0 |0 V6 g) Y" u- e( d/ X end;5 ?: a! ~& K" N. M
@.CurrIcon := "drivingHome";
+ g" v# i; p9 A @.DrivingHome := true;, I* J" Z% k2 \% L$ i* V
end;
: x4 I: o- O& _ a" E6 p else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" I- }' z2 x; C( z# I part := @.transpOrder;- Q$ |% o6 L% m, t) n; k; h
part.move(@);-- load part' U# f, n1 |5 h& C, W! e
@.CurrIcon := "load";, P% S: s, x5 s, O% }/ B1 r# c
GlobalDistObj := part.globDestination;; B, c( B" r& z4 r8 r
assignLObj := rgmanager.rgAssignL;+ Q: y) h2 B2 P$ J" _: M b! }
row := assignLObj.getRowNo(GlobalDistObj);
7 y K( M# j r3 R5 G if Row = -1 then -- since 70
! P- I% Z3 B) d# `0 s4 J if lan=1 then* z7 D x& {) P' p0 {9 E
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 r+ ~4 A' G' _3 V$ f
to_str("in der Andockstation: \"",?.~.name,"\""));! |: \% G5 N* |
else
1 c# Y# Y- g9 U" ^* d ]9 `) P9 T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! q$ W) K+ ~: v! z- q to_str("in docking station: \"",?.~.name,"\"")); ( a, e( K8 E! x
end;
; V2 n- t9 l/ v n7 x# X else U: \) c9 I0 Y5 d; {
@.Destination := assignLObj[1,row];; m" \( q V/ `+ z4 m4 I
end;
. `$ D( Y# m% f3 ^! t newDirection(@);
5 X0 [; h8 i& |! r" {' D @.HasOrder := true;- ]: A+ m& E& ?: @
end;# ]0 ]! k/ Q! r5 Z0 i& P. I
end;
; A( A! b9 a! W! W# [3 lend; -- of the method9 K2 c; \; _% o" Y5 \" g
|