//typ: tarcza ostrzegawcza, dwukomorowa na słupie odchylonym  w prawo (dla toru n) ze wskaźnikiem W19 (uprzedzającym o skróconej drodze hamowania)
//komory: pomarańczowa, zielona
//drabinka: jest
//komory rewizyjne: stary typ
//daszek: stary typ długi
//typ tekstury: nowy semafor
//autorzy: Pitek

origin (p2) (p3) (p4)
rotate 0 (p5) 0
// model tarczy ostrzegawczej:
node 1000 0 (p1) model 0 0 0 0 sem/to_2_y_pz_ks_ds_03.t3d tabl/(p6) lights 1 0 endmodel           
node 800 0 none model 0 0 0.1 0 sem/wskazniki/w1new_d.t3d sem/slupy endmodel
node 800 0 (p1)w19 model 0 3.1 0.05 180 sem/wskazniki/w19led.t3d none lights 0 endmodel 



rotate 0 0 0
endorigin

//sygnalizacja shp:
event (p1)_shp putvalues 1.0 none (p2) (p3) (p4) CabSignal -1 -1 endevent

// zdarzena zasadnicze
event (p1)_os1 multiple 0.0 none (p1)_ligh1 (p1)_sem_distinfo_slow (p1)_w19off endevent
event (p1)_os2 multiple 0.0 none (p1)_ligh2 (p1)_sem_distinfo_fast endevent
event (p1)_os3 multiple 0.0 none (p1)_ligh3 (p1)_sem_distinfo_v100 endevent
event (p1)_os4 multiple 0.0 none (p1)_ligh4 (p1)_sem_distinfo_v40 endevent
event (p1)_os4old multiple 0.0 none (p1)_ligh4old (p1)_sem_distinfo_v40 endevent

event (p1)_sem_distinfo getvalues 1.0 (p1)_sem_distmem endevent

node -1 0 (p1)_sem_distmem memcell (p2) (p3) (p4) SetProximityVelocity 500.0 0.0 none endmemcell

//zdarzenia okreslajace przyblizona predkosc przy nastepnym semaforze
event (p1)_sem_distinfo_slow updatevalues 0.0 (p1)_sem_distmem SetProximityVelocity 500 0 endevent
event (p1)_sem_distinfo_fast updatevalues 0.0 (p1)_sem_distmem SetProximityVelocity 500 -1 endevent
event (p1)_sem_distinfo_v100 updatevalues 0.0 (p1)_sem_distmem SetProximityVelocity 500 100 endevent
event (p1)_sem_distinfo_v40 updatevalues 0.0 (p1)_sem_distmem SetProximityVelocity 500 40 endevent

// przelaczanie swiatel
event (p1)_ligh1 lights 0.0 (p1) 1 0 endevent
event (p1)_ligh2 lights 0.0 (p1) 0 1 endevent
event (p1)_ligh3 lights 0.0 (p1) 0 2 endevent
event (p1)_ligh4 lights 0.0 (p1) 2 0 endevent
event (p1)_ligh4old lights 0.0 (p1) 1 1 endevent

//podswietlanie wskaznika w19:
event (p1)_w19 lights 0.0 (p1)w19 1 endevent

//gaszenie wskaznika w19:
event (p1)_w19off lights 0.0 (p1)w19 0 endevent

// uszkodzony semafor - nieoswietlony:
event (p1)_uszk lights 0.0 (p1) 0 0 endevent
