Skip to content

Commit

Permalink
(bridge) add parametesr
Browse files Browse the repository at this point in the history
  • Loading branch information
ahyangyi committed Dec 1, 2023
1 parent 1467d29 commit b5eb5ea
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bridge/dovemere_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ def main():
preferred_blitter=grf.NewGRF.BLITTER_BPP_32,
)

from bridge.lib.parameters import parameter_list

parameter_list.add(g, s)

from bridge.bridges.dovemere import test

g.add(test.the_bridge)
Expand Down
15 changes: 15 additions & 0 deletions bridge/lang/english-uk.lng
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
##grflangid 0x00
STR_GRF_NAME :AWBS - Ahyangyi's Wuhu Bridge Set
STR_GRF_DESC :A bridge set based on bridges in Wuhu, Anhui, China.

STR_PARAM_SPEED_LIMIT :Speed Limit
STR_PARAM_SPEED_LIMIT_DESC :The speed limit of the bridges{}{}Normal - Balanced against vanilla bridges
STR_PARAM_SPEED_LIMIT_SEVERE :SEVERE
STR_PARAM_SPEED_LIMIT_RESTRICTIVE :Restrictive
STR_PARAM_SPEED_LIMIT_NORMAL :Normal
STR_PARAM_SPEED_LIMIT_PERMISSIVE :Permissive
STR_PARAM_SPEED_LIMIT_FANTASY :Fantasy
STR_PARAM_SPEED_LIMIT_NO_LIMIT :No Limit

STR_PARAM_NIGHT_MODE :Night mode
STR_PARAM_NIGHT_MODE_DESC :Use night graphics suitable for NightGFX
STR_PARAM_NIGHT_MODE_AUTO_DETECT:Auto Detect
STR_PARAM_NIGHT_MODE_DISABLED :Disabled
STR_PARAM_NIGHT_MODE_ENABLED :Enabled
20 changes: 20 additions & 0 deletions bridge/lib/parameters.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from agrf.parameters import Parameter, ParameterList


parameter_list = ParameterList(
[
Parameter(
"SPEED_LIMIT",
2,
{
0: "SEVERE",
1: "RESTRICTIVE",
2: "NORMAL",
3: "PERMISSIVE",
4: "FANTASY",
5: "NO_LIMIT",
},
),
Parameter("NIGHT_MODE", 0, {0: "AUTO_DETECT", 1: "ENABLED", 2: "DISABLED"}),
]
)

0 comments on commit b5eb5ea

Please sign in to comment.