Skip to content

Commit

Permalink
merge #24 from nonoesimposible/18-misc
Browse files Browse the repository at this point in the history
heightmap.cfg sound.cfg stdedit.cfg ui.cfg fkey.cfg hud.cfg lib.cfg options.cfg serverbrowser.cfg
  • Loading branch information
no-lex committed Feb 14, 2021
2 parents 9246716 + 1b08775 commit 6c04712
Show file tree
Hide file tree
Showing 10 changed files with 114 additions and 56 deletions.
22 changes: 11 additions & 11 deletions config/heightmap.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ hbrushverts = [

newhbrush = [
hbrushmax = (+ $hbrushmax 1)
do [
do [
hbrush_@hbrushmax = [
hbrushname = [@@@arg1]
clearhbrush
Expand All @@ -50,34 +50,34 @@ newhbrush = [
]
]

newhbrush "Circle 1-0" 0 0 [
newhbrush (concat $uistr_heightmap_0 "1-0") 0 0 [
"1"
]
newhbrush "Circle 2-1" 1 1 [
newhbrush (concat $uistr_heightmap_0 "2-1") 1 1 [
"0 1 0"
"1 2 1"
"0 1 0"
]
newhbrush "Circle 4-2-1" 2 2 [
newhbrush (concat $uistr_heightmap_0 "4-2-1") 2 2 [
"0 0 1 0 0"
"0 1 2 1 0"
"1 2 4 2 1"
"0 1 2 1 0"
"0 0 1 0 0"
]
newhbrush "Square 3x3" 1 1 [
newhbrush (concat $uistr_heightmap_1 "3x3") 1 1 [
"1 1 1"
"1 1 1"
"1 1 1"
]
newhbrush "Square 5x5" 2 2 [
newhbrush (concat $uistr_heightmap_1 "5x5") 2 2 [
"1 1 1 1 1"
"1 1 1 1 1"
"1 1 1 1 1"
"1 1 1 1 1"
"1 1 1 1 1"
]
newhbrush "Square 7x7" 3 3 [
newhbrush (concat $uistr_heightmap_1 "7x7") 3 3 [
"1 1 1 1 1 1 1"
"1 1 1 1 1 1 1"
"1 1 1 1 1 1 1"
Expand All @@ -87,19 +87,19 @@ newhbrush "Square 7x7" 3 3 [
"1 1 1 1 1 1 1"
]

newhbrush "Smooth 3x3" 1 1 [
newhbrush (concat $uistr_heightmap_2 "3x3") 1 1 [
"0 0 0"
"0 0 0"
"0 0 0"
]
newhbrush "Smooth 5x5" 2 2 [
newhbrush (concat $uistr_heightmap_2 "5x5") 2 2 [
"0 0 0 0 0"
"0 0 0 0 0"
"0 0 0 0 0"
"0 0 0 0 0"
"0 0 0 0 0"
]
newhbrush "Smooth 7x7" 3 3 [
newhbrush (concat $uistr_heightmap_2 "7x7") 3 3 [
"0 0 0 0 0 0 0"
"0 0 0 0 0 0 0"
"0 0 0 0 0 0 0"
Expand All @@ -109,7 +109,7 @@ newhbrush "Smooth 7x7" 3 3 [
"0 0 0 0 0 0 0"
]

newhbrush "Noise 25x25" 12 12 [
newhbrush (concat $uistr_heightmap_3 "25x25") 12 12 [
"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0"
"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"
"0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0"
Expand Down
89 changes: 74 additions & 15 deletions config/lang_en.cfg
Original file line number Diff line number Diff line change
@@ -1,17 +1,54 @@
////////////////////////////////////////////////////////////////////////////////////////
// game.cfg //
////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// game.cfg //
///////////////////////////////////////////////////////////////////////////////
uistr_game_0 = "team"
uistr_game_1 = "chat"

////////////////////////////////////////////////////////////////////////////////////////
// options.cfg //
////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// heightmap.cfg //
///////////////////////////////////////////////////////////////////////////////
uistr_heightmap_0 = "Circle"
uistr_heightmap_1 = "Square"
uistr_heightmap_2 = "Smooth"
uistr_heightmap_3 = "Noise"

//"opt_ratios_assoc"
uistr_options_ora_0 = "custom"
//aspect ratio
uistr_options_asp_0 = "custom"
///////////////////////////////////////////////////////////////////////////////
// hud.cfg //
///////////////////////////////////////////////////////////////////////////////

//weapon names
uistr_hud_0 = "Carbine"
uistr_hud_1 = "Railgun"
uistr_hud_2 = "Demo Gun"
uistr_hud_3 = "Block Layer"

//edit stats (box with numbers in the bottom left corner in edit mode)
uistr_hud_4 = "gridsize"
uistr_hud_5 = "worldsize"
uistr_hud_6 = "floatspeed"
uistr_hud_7 = "heightmap brush"
uistr_hud_8 = "index"
uistr_hud_9 = "selected"
uistr_hud_10 = "cube"

//varicons (list of current configurations in the bottom right corner in edit mode)
uistr_hud_11 = "allfaces"
uistr_hud_12 = "entselsnap"
uistr_hud_13 = "entediting"
uistr_hud_14 = "fullbright"
uistr_hud_15 = "showmat"
uistr_hud_16 = "nompedit"

///////////////////////////////////////////////////////////////////////////////
// lib.cfg //
///////////////////////////////////////////////////////////////////////////////

// a "custom" option, e.g. a custom resolution
uistr_lib_0 = "custom"

///////////////////////////////////////////////////////////////////////////////
// options.cfg //
///////////////////////////////////////////////////////////////////////////////

//tab names
uistr_options_0 = "Game"
Expand Down Expand Up @@ -122,9 +159,32 @@ uistr_options_65 = "Music Volume"
//section 3
uistr_options_66 = "Hit Confirmation"

////////////////////////////////////////////////////////////////////////////////////////
// ui.cfg //
////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// serverbrowser.cfg //
///////////////////////////////////////////////////////////////////////////////

uistr_serverbrowser_0 = "Update List"
uistr_serverbrowser_1 = "Search LAN"
uistr_serverbrowser_2 = "Auto-refresh"
uistr_serverbrowser_3 = "Auto-sort"

///////////////////////////////////////////////////////////////////////////////
// sound.cfg //
///////////////////////////////////////////////////////////////////////////////
//these are part of the same sentence.
uistr_soundpack_0 = "Failed to load soundpack: "
uistr_soundpack_1 = ". Using default sounds."

///////////////////////////////////////////////////////////////////////////////
// stdedit.cfg //
///////////////////////////////////////////////////////////////////////////////

uistr_stdedit_0 = "Move Selection"
uistr_stdedit_1 = "Cut Selection"

///////////////////////////////////////////////////////////////////////////////
// ui.cfg //
///////////////////////////////////////////////////////////////////////////////

//main menu, when the game is first opened
uistr_main_0 = "Server Browser"
Expand All @@ -149,7 +209,6 @@ uistr_main_ingame_6 = "Disconnect"
//player setup
uistr_player_setup_0 = "Name"
uistr_player_setup_1 = "Solo"
uistr_player_setup_2 = "Player Setup"

//credits
uistr_credits_0 = "Imprimis Game"
Expand Down Expand Up @@ -201,4 +260,4 @@ uistr_copymapcfg_1 = "does not exist!"
//cmc_confirm (copy map config confirmation dialog)
uistr_cmc_confirm_0 = "Copy map config:"
uistr_cmc_confirm_1 = "Proceed"
uistr_cmc_confirm_2 = "Cancel"
uistr_cmc_confirm_2 = "Cancel"
3 changes: 1 addition & 2 deletions config/sound.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ defaultsoundpack = [
loadsoundpack = [
if $soundpack [
if (! (exec [media/sound/game/@soundpack/soundpack.cfg] 0)) [
error [Failed to load soundpack: @soundpack. Using default sounds.]
error [@(concatword $uistr_soundpack_0 $soundpack $uistr_soundpack_1)]
defaultsoundpack
]
] [
Expand All @@ -32,4 +32,3 @@ loadsoundpack = [
defsvarp soundpack "" [loadsoundpack]

defaultsoundpack

2 changes: 1 addition & 1 deletion config/stdedit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ entdirection = [
selmovecut = 1
toggleeditmovecut = [
selmovecut = (! $selmovecut)
echo (? $selmovecut "Move Selection" "Cut Selection")
echo (? $selmovecut $uistr_stdedit_0 $uistr_stdedit_1)
]
editmovecut = [
if $selmovecut [editmove] [editcut]
Expand Down
2 changes: 1 addition & 1 deletion config/ui.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ UImenu "player_setup" [
]
]
]
] [] [] [] $uistr_player_setup_2
] [] [] [] $uistr_main_2
///////////////////////////////////////////////////////////////////////////////
// Credits //
Expand Down
2 changes: 1 addition & 1 deletion config/ui/fkey.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ UImenu "map_browser" [
UI_selmap = ""
custommaps = ""
hideui "newmap"
] [] [] "Map Browser"
] [] [] $uistr_main_1

UImenu "newmap" [
uispace 0.008 0.015 [
Expand Down
20 changes: 10 additions & 10 deletions config/ui/hud.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ carbine = [
uispace $UIwindow_padding $UIwindow_padding [
uialign -1 1
uivlist 0 [
uitext "Carbine" $fontsize
uitext $uistr_hud_0 $fontsize
uiimage "media/interface/weapon/carbineicon.png" $imgx $imgy
]
]
Expand Down Expand Up @@ -122,15 +122,15 @@ newui "weaponbar" [
uialign -1 1
uivlist 0 [
if (= (getcombatclass) 0) [
uitext "Railgun" $fontsize
uitext $uistr_hud_1 $fontsize
uiimage "media/interface/weapon/rifleicon.png" $imgx $imgy
]
if (= (getcombatclass) 1) [
uitext "Demo Gun" $fontsize
uitext $uistr_hud_2 $fontsize
uiimage "media/interface/weapon/pulseicon.png" $imgx $imgy
]
if (= (getcombatclass) 2) [
uitext "Block Layer" $fontsize
uitext $uistr_hud_3 $fontsize
uiimage "media/interface/weapon/pulseicon.png" $imgx $imgy
]
]
Expand All @@ -152,15 +152,15 @@ newui "editstats" [
uispace $UIwindow_padding $UIwindow_padding [
uivlist 0 [
uicontext (
format "%4^f7%5^f7gridsize :^f8 %1 ^f7| worldsize :^f8 %2 ^f7| floatspeed :^f8 %3" $gridpower $mapscale $floatspeed (
if $hmapedit [format "heightmap brush^f8 %1 ^f7:^f8 %2^n" $hbrushindex $hbrushname] [
format (concatword "%4^f7%5^f7" $uistr_hud_4 " :^f8 %1 ^f7| " $uistr_hud_5 " :^f8 %2 ^f7| " $uistr_hud_6 " :^f8 %3") $gridpower $mapscale $floatspeed (
if $hmapedit [format (concatword $uistr_hud_7 "^f8 %1 ^f7:^f8 %2^n") $hbrushindex $hbrushname] [
if (! (enthavesel)) [
format "index^f8 %1 ^f7:^f8 %2^n" (max 0 (getseltex)) (gettexname (getseltex))
format (concatword $uistr_hud_8 "^f8 %1 ^f7:^f8 %2^n") (max 0 (getseltex)) (gettexname (getseltex))
]
]
) (if (enthavesel) [concat (entget) ":^f8" (enthavesel) "^f7selected^n"])
) (if (enthavesel) [concat (entget) ":^f8" (enthavesel) (concatword "^f7" $uistr_hud_9 "^n")])
)
uicontext (format "cube %1%2" $selchildcount (if $showmat [selchildmat ": "]))
uicontext (format (concatword $uistr_hud_10 " %1%2") $selchildcount (if $showmat [selchildmat ": "]))
uihlist 0 [
uicontextfill 16 0 [uicontext (format "wtr:%1 (%2%%)" $editstatwtr $editstatvtr) ; uialign- -1 0]
uicontextfill 16 0 [uicontext (format "wvt:%1 (%2%%)" $editstatwvt $editstatvvt) ; uialign- -1 0]
Expand Down Expand Up @@ -189,7 +189,7 @@ newui "varicons" [
uialign 1 1
uispace 0.01 0.1 [
uivlist 0 [
looplist i (concatword "allfaces entselsnap entediting fullbright showmat " (? $scoreboardmultiplayer "nompedit")) [
looplist i (concat $uistr_hud_11 $uistr_hud_12 $uistr_hud_13 $uistr_hud_14 $uistr_hud_15 (? $scoreboardmultiplayer $uistr_hud_16)) [
uifont "default_outline" [
uialign 1
if $$i [
Expand Down
2 changes: 1 addition & 1 deletion config/ui/lib.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ UIlistslider = [
uicolor $c_slider
uiclamp* 1 1 1 1
if (=s $arg8 "") [
uitext (|| [[listassoc@arg2] $arg3 $$arg1] [result "custom"]) 0.6
uitext (|| [[listassoc@arg2] $arg3 $$arg1] [result $uistr_lib_0]) 0.6
] arg8
]
UIarrowbutton $arg5 $arg5 270 [
Expand Down
18 changes: 9 additions & 9 deletions config/ui/options.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ UI_ratio32:9 = [
"5120 1440"
]
opt_ratios = [5:4 4:3 3:2 16:10 16:9 21:9 32:9]
opt_ratios_assoc = (concat $uistr_options_ora_0 $uistr_options_ora_0 (looplistconcat ratio $opt_ratios [concat $ratio $ratio]))
opt_ratios_assoc = (concat $uistr_lib_0 $uistr_lib_0 (looplistconcat ratio $opt_ratios [concat $ratio $ratio]))
UI_findratio = [
looplist ratio $opt_ratios [
looplist res $[UI_ratio@ratio] [
Expand Down Expand Up @@ -512,7 +512,7 @@ UImenu "options" [
uitablerow [
uihlist 0.01 [uifill $UI_optc1wA ; uitext $uistr_options_59 0.6]
UIlistslider UI_aspectratio =s $opt_ratios_assoc 0.3 $UI_optrowh [
if (=s $UI_aspectratio $uistr_options_asp_0) [] [
if (=s $UI_aspectratio $uistr_lib_0) [] [
UI_resolution = (at $[UI_ratio@UI_aspectratio] 1)
screenw (at $UI_resolution 0)
screenh (at $UI_resolution 1)
Expand All @@ -522,22 +522,22 @@ UImenu "options" [
]
uitablerow [
UIbutton "hold2" [
UIcheckbox (!=s $UI_aspectratio $uistr_options_asp_0) 0.016
UIcheckbox (!=s $UI_aspectratio $uistr_lib_0) 0.016
uitext $uistr_options_60 0.6
] $UI_optc1wB $UI_optrowh [
if (=s $UI_aspectratio $uistr_options_asp_0) [
if (=s $UI_aspectratio $uistr_lib_0) [
UI_findratio
if (=s $UI_aspectratio $uistr_options_asp_0) [
if (=s $UI_aspectratio $uistr_lib_0) [
UI_aspectratio = "16:10"
UI_resolution = (at $[UI_ratio@UI_aspectratio] 1)
screenw (at $UI_resolution 0)
screenh (at $UI_resolution 1)
]
] [
UI_aspectratio = $uistr_options_asp_0
UI_aspectratio = $uistr_lib_0
]
] -1
if (=s $UI_aspectratio $uistr_options_asp_0) [
if (=s $UI_aspectratio $uistr_lib_0) [
uihlist 0.009 [
uifield screenw 5 [] 0.65 style_generic_focus
uitext "x" 0.6
Expand Down Expand Up @@ -610,8 +610,8 @@ UImenu "options" [
UIvscroll 0.02 0.6 1.421 0.5
]
] [
UI_aspectratio = $uistr_options_asp_0
UI_aspectratio = $uistr_lib_0
UI_resolution = (concat $screenw $screenh)
UI_findratio
] [if (pendingchanges) [showui "changes"]] [] "Options"
] [if (pendingchanges) [showui "changes"]] [] $uistr_main_3

10 changes: 5 additions & 5 deletions config/ui/serverbrowser.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ UImenu "server_browser" [
uivlist 0.01 [
uihlist 0 [
uiclamp 1 1
UIbutton "" [uitext "Update List" 0.6] 0.2 0.032 [updatefrommaster] 0 [uialign -1 0]
UIbutton "" [uitext $uistr_serverbrowser_0 0.6] 0.2 0.032 [updatefrommaster] 0 [uialign -1 0]
uihlist 0 [
UIbutton "" [
UIcheckbox $searchlan 0.016
uitext "Search LAN" 0.6
uitext $uistr_serverbrowser_1 0.6
] 0.18 0.032 [searchlan (! $searchlan)] -1
UIbutton "" [
UIcheckbox $autoupdateservers 0.016
uitext "Auto-refresh" 0.6
uitext $uistr_serverbrowser_2 0.6
] 0.18 0.032 [autoupdateservers (! $autoupdateservers)] -1
UIbutton "" [
UIcheckbox $autosortservers 0.016
uitext "Auto-sort" 0.6
uitext $uistr_serverbrowser_3 0.6
] 0.18 0.032 [
_sb_sort = (! $_sb_sort)
autosortservers $_sb_sort
Expand Down Expand Up @@ -141,4 +141,4 @@ UImenu "server_browser" [
UIvscroll 0.02 0.65 1.3
]
]
] [initservers] [] [] "Server Browser"
] [initservers] [] [] $uistr_main_0

0 comments on commit 6c04712

Please sign in to comment.