aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking/tcb_ts_ui.lua
Commit message (Collapse)AuthorAge
* Apply minetest.formspec_escape() to prevent formspec injection (H#143)MT0.4Blockhead2020-01-04
|
* Don't allow to remove TCB when a signal is assignedorwell962019-08-26
|
* Disable-ARS switch in signal and set this when cancelling an ARS routeorwell962019-03-15
|
* Fix cancelling "Unknown Route" when section is deleted.orwell962019-03-15
|
* Signalling form auto-updateorwell962019-02-05
|
* Prohibit removing/changing of TCBs and sections while routes or signals are setorwell962019-01-22
|
* Can disable automatic working without cancelling routeorwell962019-01-15
|
* Add Automatic Routesetting UIorwell962019-01-09
| | | | Settings have no effect so far
* Permit basic signal aspect settingorwell962018-11-19
| | | | (basically only usable with Ks signals, because they're the only signals supporting slow move and/or shunt move
* Do not allow static signals for routesettingorwell962018-10-30
|
* Fix typo in signal assignment, causing crashorwell962018-10-29
|
* Miscellaneous routesetting fixesorwell962018-10-29
| | | | | | | - Move handling of "route_committed" to the routesetting function - Put aspect in every TCBS on the way - Add "route_origin" to TCBS fields to prevent subroute cancelling - Cancel entire route when another train enters from the wrong TCB
* Add Interlocking Tool to inspect route locksorwell962018-10-26
|
* Add "Reset track section" functionorwell962018-10-26
|
* Make signal influence point (~halt point) specifiableorwell962018-10-09
| | | | Also extend signal api necessarily
* Fix various bugs found while testingorwell962018-08-13
|
* Add 'interlocking' privilege and add security checksorwell962018-08-12
|
* Automatic working (re-set certain route on train pass)orwell962018-08-12
|
* fix digging unconfigured tcbsorwell962018-08-12
|
* Signal aspect handling, make default signals compatible, fix signal diggingorwell962018-08-12
|
* Add routesetting callbacks.orwell962018-08-12
| | | | Now, only the signal aspect setting is still missing
* Uncommitted route handling (update_route function)orwell962018-08-03
|
* Implement routesettingorwell962018-07-21
| | | | Missing things: signal aspect updating, waiting routes handling, management /info tool
* Basic route management from signalling formspecorwell962018-07-04
|
* Signal assignment and route programming procedureorwell962018-07-04
|
* Implement trains blocking sectionsorwell962018-06-29
|
* Complete Track Section handling, incl. removing tcb's and marker entitiesorwell962018-06-26
* Add track section concept and rework TCB design, implement new linking behaviororwell962018-06-21
/span> [2]={x=1, z=1, y=0}, [3]={x=2, z=1, y=0}, [4]={x=1, z=0, y=0}, [5]={x=2, z=-1, y=0}, [6]={x=1, z=-1, y=0}, [7]={x=1, z=-2, y=0}, [8]={x=0, z=-1, y=0}, [9]={x=-1, z=-2, y=0}, [10]={x=-1, z=-1, y=0}, [11]={x=-2, z=-1, y=0}, [12]={x=-1, z=0, y=0}, [13]={x=-2, z=1, y=0}, [14]={x=-1, z=1, y=0}, [15]={x=-1, z=2, y=0}, } local dir_angle_tbl={} for d,v in pairs(dir_trans_tbl) do local uvec = vector.normalize(v) dir_angle_tbl[d] = math.atan2(-uvec.x, uvec.z) end function advtrains.dir_to_angle(dir) return dir_angle_tbl[dir] or error("advtrains: in helpers.lua/dir_to_angle() given dir="..(dir or "nil")) end function advtrains.dirCoordSet(coord, dir) return vector.add(coord, advtrains.dirToCoord(dir)) end advtrains.pos_add_dir = advtrains.dirCoordSet function advtrains.pos_add_angle(pos, ang) -- 0 is +Z -> meaning of sin/cos swapped return vector.add(pos, {x = -math.sin(ang), y = 0, z = math.cos(ang)}) end function advtrains.dirToCoord(dir) return dir_trans_tbl[dir] or error("advtrains: in helpers.lua/dir_to_vector() given dir="..(dir or "nil")) end advtrains.dir_to_vector = advtrains.dirToCoord function advtrains.maxN(list, expectstart) local n=expectstart or 0 while list[n] do n=n+1 end return n-1 end function advtrains.minN(list, expectstart) local n=expectstart or 0 while list[n] do n=n-1 end