Skip to content

Commit

Permalink
Create two versions of all traffic sign presets
Browse files Browse the repository at this point in the history
This adds separate versions of the traffic sign presets for separate
nodes and for way nodes with match_expressions. The later is supported
in Vespucci 20.2.

Fixes #467
  • Loading branch information
simonpoole committed Oct 22, 2024
1 parent afb6580 commit c5e5fec
Showing 1 changed file with 68 additions and 25 deletions.
93 changes: 68 additions & 25 deletions master_preset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -904,9 +904,25 @@
<check key="embankment" text="Embankment" disable_off="true"/>
</optional>
</chunk>
<chunk id="traffic_signals_direction">
<combo key="direction" text="For traffic direction" values="forward,backward,N,E,S,W,0,90,180,270"
display_values="Forward,Backward,North,East,South,West,0°,90°,180°,270°" values_sort="false" value_type="cardinal_direction" />
<chunk id="traffic_sign_direction">
<combo key="direction" text="For traffic direction" values="forward,backward"
display_values="Forward,Backward" values_sort="false" match="key" />
</chunk>
<chunk id="traffic_sign_direction_standalone">
<combo key="direction" text="Facing" values="N,E,S,W,0,90,180,270"
display_values="North,East,South,West,0°,90°,180°,270°" values_sort="false" match="key" value_type="cardinal_direction" />
</chunk>
<chunk id="city_limit_base">
<link wiki="Tag:traffic_sign=city_limit"/>
<space/>
<key key="traffic_sign" value="city_limit"/>
<text key="name" text="Name"/>
<text key="alt_name" text="Alternate name" alternative_autocomplete_keys="name" />
<combo key="city_limit" values="begin,end,both" display_values="Begin,End,Both" values_sort="false" />
<combo key="colour:back" text="Background colour" values_context="colour" >
<reference ref="colour_values"/>
</combo>
<preset_link preset_name="Name"/>
</chunk>
<chunk id="min_age">
<text key="min_age" text="Minimum age"/>
Expand Down Expand Up @@ -3747,17 +3763,28 @@
<text key="name" text="Name"/>
</optional>
</item> <!-- Traffic Signal -->
<item name="Stop" icon="${highway_stop}" type="node" preset_name_label="true">
<item name="Stop" icon="${highway_stop}" type="node" preset_name_label="true" match_expression="child highway=*">
<link wiki="Tag:highway=stop"/>
<key key="highway" value="stop"/>
<combo key="stop" text="Type" values="all,minor" display_values="All,Minor"/>
<reference ref="traffic_signals_direction" />
<reference ref="traffic_sign_direction" />
</item> <!-- Stop -->
<item name="Give Way" icon="${highway_give_way}" type="node" preset_name_label="true">
<item name="Stop (separate)" icon="${highway_stop}" type="node" preset_name_label="true" match_expression="-child highway=*">
<link wiki="Tag:highway=stop"/>
<key key="highway" value="stop"/>
<combo key="stop" text="Type" values="all,minor" display_values="All,Minor"/>
<reference ref="traffic_sign_direction_standalone" />
</item> <!-- Stop (separate)-->
<item name="Give Way" icon="${highway_give_way}" type="node" preset_name_label="true" match_expression="child highway=*">
<link wiki="Tag:highway=give_way"/>
<key key="highway" value="give_way"/>
<reference ref="traffic_signals_direction" />
<reference ref="traffic_sign_direction" />
</item> <!-- Give Way -->
<item name="Give Way (separate)" icon="${highway_give_way}" type="node" preset_name_label="true" match_expression="-child highway=*">
<link wiki="Tag:highway=give_way"/>
<key key="highway" value="give_way"/>
<reference ref="traffic_sign_direction_standalone" />
</item> <!-- Give Way (separate) -->
<item name="Advanced stop line" icon="${highway_cycleway_asl}" type="node" preset_name_label="true">
<link wiki="Tag:cycleway=asl" />
<key key="cycleway" value="asl" object="true" />
Expand Down Expand Up @@ -3883,40 +3910,56 @@
<link wiki="Tag:highway=turning_loop"/>
<key key="highway" value="turning_loop"/>
</item> <!-- Turning Loop -->
<item name="City Limit" icon="${traffic_sign_city_limit}" type="node" preset_name_label="true">
<link wiki="Tag:traffic_sign=city_limit"/>
<space/>
<key key="traffic_sign" value="city_limit"/>
<text key="name" text="Name"/>
<text key="alt_name" text="Alternate name" alternative_autocomplete_keys="name" />
<combo key="city_limit" values="begin,end,both" display_values="Begin,End,Both" values_sort="false" />
<reference ref="traffic_signals_direction" />
<combo key="colour:back" text="Background colour" values_context="colour" >
<reference ref="colour_values"/>
</combo>
<preset_link preset_name="Name"/>
<item name="City limit" icon="${traffic_sign_city_limit}" type="node" preset_name_label="true" match_expression="child highway=*">
<reference ref="city_limit_base" />
<reference ref="traffic_sign_direction" />
</item> <!-- City Limit -->
<item name="Speed Limit Sign" icon="${traffic_sign_speed_limit}" type="node" preset_name_label="true">
<item name="City limit (separate)" icon="${traffic_sign_city_limit}" type="node" preset_name_label="true" match_expression="-child highway=*">
<reference ref="city_limit_base" />
<reference ref="traffic_sign_direction_standalone" />
</item> <!-- City Limit (separate)-->
<item name="Speed limit sign" icon="${traffic_sign_speed_limit}" type="node" preset_name_label="true" match_expression="child highway=*">
<link wiki="Key:traffic_sign"/>
<space/>
<key key="traffic_sign" value="maxspeed"/>
<reference ref="maxspeed"/>
<reference ref="traffic_signals_direction" />
<reference ref="traffic_sign_direction" />
</item> <!-- Speed Limit Sign -->
<item name="Stop sign" icon="${traffic_sign_stop}" type="node" preset_name_label="true">
<item name="Speed limit sign (separate)" icon="${traffic_sign_speed_limit}" type="node" preset_name_label="true" match_expression="-child highway=*">
<link wiki="Key:traffic_sign"/>
<space/>
<key key="traffic_sign" value="maxspeed"/>
<reference ref="maxspeed"/>
<reference ref="traffic_sign_direction_standalone" />
</item> <!-- Speed Limit Sign (separate)-->
<item name="Stop sign" icon="${traffic_sign_stop}" type="node" preset_name_label="true" match_expression="child highway=*">
<link wiki="Key:traffic_sign"/>
<space/>
<key key="traffic_sign" value="stop"/>
<reference ref="traffic_signals_direction" />
<reference ref="traffic_sign_direction" />
</item> <!-- Stop sign -->
<item name="Traffic sign" icon="${traffic_sign}" type="node" preset_name_label="true">
<item name="Stop sign (separate)" icon="${traffic_sign_stop}" type="node" preset_name_label="true" match_expression="-child highway=*">
<link wiki="Key:traffic_sign"/>
<space/>
<key key="traffic_sign" value="stop"/>
<reference ref="traffic_sign_direction_standalone" />
</item> <!-- Stop sign (separate)-->
<item name="Traffic sign" icon="${traffic_sign}" type="node" preset_name_label="true" match_expression="child highway=*">
<link wiki="Key:traffic_sign"/>
<space/>
<combo key="traffic_sign" text="Traffic sign" match="key" editable="true">
<reference ref="traffic_sign_values"/>
</combo>
<reference ref="traffic_signals_direction" />
<reference ref="traffic_sign_direction" />
</item> <!-- Traffic sign -->
<item name="Traffic sign (separate)" icon="${traffic_sign}" type="node" preset_name_label="true" match_expression="-child highway=*">
<link wiki="Key:traffic_sign"/>
<space/>
<combo key="traffic_sign" text="Traffic sign" match="key" editable="true">
<reference ref="traffic_sign_values"/>
</combo>
<reference ref="traffic_sign_direction_standalone" />
</item> <!-- Traffic sign (separate)-->
<item name="Traffic Sign Forward" text="Traffic sign forward" icon="${traffic_sign_forward}" type="node" preset_name_label="true">
<link wiki="Key:traffic_sign"/>
<space/>
Expand Down

0 comments on commit c5e5fec

Please sign in to comment.