Files
assaultcube-/config/resetbinds.cfg
T
ac-stef b650fca2ca persistidents cleanup
Restore the old persistidents system from AC 1.0, since it's working as
intended - if used properly.

As a reminder:

  * aliases created by "const" and "tempalias" are never persistent
  * aliases created or altered by "alias" or "=" become persistent, if
    the persistidents flag is set during that operation
  * persistidents if false during the execution of almost all config files
    during game start - those files can create aliases with default values
    which will not be persistent (until changed later while the flag is
    set)
  * before saved.cfg is executed, the flag is set and stays set all
    throughout the game - which means, that all changes (from menus, for
    example) will change the altered alias to "persistent"
  * exceptions for map or model config files are unnecessary, since those
    run restricted and can't create aliases anyway
  * exceptions are necessary for "late run" config files like those in
    config/opt/

The new command "persistidents" may be used to manually set or clear the
flag. It also returns the current state of the flag. If used in a config
file, the flag is restored to its original value when the file ends
execution.

In short: only late-run config files (meaning: run after saved.cfg was
restored) may need to manually set/reset the flag. Use const and tempalias
where appropriate and clear persistidents before creating an alias with a
not-to-save default value that may be changed and made persistent later.

DOCREF persistidents
2017-05-05 15:50:59 +02:00

275 lines
8.0 KiB
INI

// All default binds belong in here.
// The command "resetbinds" executes this file.
// Do not modify.
alias key_console_end [ conskip -1000 ]
alias key_console_forward [ conskip -5 ]
alias key_console_rewind [ conskip 5 ]
alias key_console_scroll [ if (strcmp $modifier 0) [ tempalias __confade $confade ] ; onrelease "confade $__confade ; if (! $__scrolled) [ conskip -1000 ]" ; confade 0 ; tempalias __scrolled 0 ; domodifier conscroll ]
alias key_domodifier_1 [ domodifier 1 ]
alias key_domodifier_2 [ domodifier 2 ]
alias key_escape [ if $connected [ ingamemenu ] [ if (watchingdemo) [ showmenu [Watching demo] ] [ showmenu main ] ] ]
alias key_getdemo [ if (! (watchingdemo)) getdemo ]
alias key_knifeattack [ weapon ; attack ]
alias key_universaldelta_minus [ universaldelta -1 ]
alias key_universaldelta_plus [ universaldelta 1 ]
alias key_showmap [ showscores 0; toggleshowmap ]
alias key_showmenuweapons [ showmenu Weapons ]
alias key_showmenuvoicecom [ showmenu voicecom ]
alias key_showscores [ showscores 1; onrelease [ showscores 0 ] ]
alias key_toggleconsole [ conskip -1000; toggleconsole ]
alias key_voteyes [ if $votepending [ && (vote 1) (echo you voted yes) ] ]
alias key_voteno [ if $votepending [ && (vote 2) (echo you voted no) ] ]
alias key_teamchat [ saycommand % ]
alias key_commandline [ saycommand / ]
alias key_prevweapon [ weapon (prevweapon) ]
alias editkey_editmeta2 [ editmeta2down = 1 ; onrelease [ editmeta2down = 0 ] ]
alias editkey_delete_entity [if $editmeta2down [showmenu "deleted entities" ; menuselection "deleted entities" (- (unlistdeletedentity) 1)] [if $editmetakeydown undelent delent]]
alias editkey_show_menu [ showmenu editing ]
alias editkey_show_menu_light [ showmenu Lighting ]
alias editkey_equalize_floor [ equalize 0 ]
alias editkey_equalize_ceiling [ equalize 2 ]
alias editkey_vdelta_down [ vdelta -1 ]
alias editkey_vdelta_up [ vdelta 1 ]
alias editkey_move_floor_up [ editheight 0 1 ]
alias editkey_move_floor_down [ editheight 0 -1 ]
alias editkey_move_ceiling_up [ editheight 2 1 ]
alias editkey_move_ceiling_down [ editheight 2 -1 ]
alias editkey_cubes_space [ solid 0 ]
alias editkey_cubes_solid [ solid 1 ]
alias editkey_cubes_hf_floor [ heightfield 0 ]
alias editkey_cubes_hf_ceiling [ heightfield 2 ]
alias editkey_cubes_corner [ corner ]
alias editkey_scroll_moveent [ domodifier 6 ]
alias editkey_scroll_vdelta [ domodifier 1 ]
alias editkey_scroll_floorceiltex [ domodifier 2 ]
alias editkey_scroll_walluppertex [ domodifier 3 ]
alias editkey_fullbright [ if $fullbright [ fullbright 0 ] [ fullbright 1 ] ]
alias editkey_floortex_up [ edittex 0 1 ]
alias editkey_floortex_dn [ edittex 0 -1 ]
alias editkey_walltex_up [ edittex 1 1 ]
alias editkey_walltex_dn [ edittex 1 -1 ]
alias editkey_ceiltex_up [ edittex 2 1 ]
alias editkey_ceiltex_dn [ edittex 2 -1 ]
alias editkey_uppertex_up [ edittex 3 1 ]
alias editkey_uppertex_dn [ edittex 3 -1 ]
alias editkey_tagclip_none [ edittagclip none ]
alias editkey_tagclip_plclip [ edittagclip plclip ]
alias editkey_tagclip_clip [ edittagclip clip ]
alias editkey_scroll_spawns [ domodifier spawns ]
alias editkey_scroll_todoents [ domodifier todoents ]
alias speckey_demo_gamespeeddown [ if (watchingdemo) [ if (<= $gamespeed 100) [ gamespeed (- $gamespeed 10) ] [ gamespeed (- $gamespeed 100) ]; gamespeed ] ]
alias speckey_demo_gamespeedup [ if (watchingdemo) [ if (< $gamespeed 100) [ gamespeed (+ $gamespeed 10) ] [ gamespeed (+ $gamespeed 100) ]; gamespeed ] ]
alias speckey_demo_gamespeedreset [ if (watchingdemo) [ gamespeed 100; gamespeed ] ]
alias speckey_demo_togglespeed [ if (watchingdemo) [ onrelease (concat gamespeed $gamespeed) ; gamespeed 1000 ] ]
alias speckey_whois_spectatecn [ if (>= (spectatecn) 0) [ whois (spectatecn) ] ]
_defaultbinds 1 // do not save the following binds to saved.cfg
_resetallbinds
bind MOUSE1 attack
bind MOUSE2 altaction
editbind MOUSE2 editkey_show_menu
bind MOUSE3 key_knifeattack
editbind MOUSE3 toggleclosestentpin
bind MOUSE4 key_universaldelta_plus
bind MOUSE5 key_universaldelta_minus
bind BACKSPACE dropflag
editbind BACKSPACE editkey_delete_entity
bind TAB key_showscores
bind CLEAR []
bind RETURN []
bind PAUSE [ paused (! $paused) ]
bind ESCAPE key_escape
bind SPACE jump
bind EXCLAIM []
bind QUOTEDBL []
bind HASH key_console_scroll
bind DOLLAR []
bind AMPERSAND []
bind QUOTE []
bind LEFTPAREN []
bind RIGHTPAREN []
bind ASTERISK []
bind PLUS []
bind COMMA []
editbind COMMA editkey_equalize_floor
bind MINUS []
editbind MINUS copyent
bind PERIOD []
editbind PERIOD editkey_equalize_ceiling
bind SLASH key_commandline
bind 0 []
bind 1 primary
editbind 1 [ domodifier attr1 ]
bind 2 secondary
editbind 2 [ domodifier attr2 ]
bind 3 grenades
editbind 3 [ domodifier attr3 ]
bind 4 melee
editbind 4 [ domodifier attr4 ]
bind 5 []
editbind 5 [ domodifier attr5 ]
bind 6 []
editbind 6 [ domodifier attr6 ]
bind 7 []
editbind 7 [ domodifier attr7 ]
//editbind 7 nextclosestent
bind 8 []
editbind 8 editkey_vdelta_down
bind 9 []
editbind 9 editkey_vdelta_up
bind COLON []
bind SEMICOLON []
editbind SEMICOLON editent
bind LESS []
bind EQUALS []
editbind EQUALS pasteent
bind GREATER []
bind QUESTION []
bind AT []
bind LEFTBRACKET []
editbind LEFTBRACKET editkey_move_floor_down
bind BACKSLASH key_console_scroll
bind RIGHTBRACKET []
editbind RIGHTBRACKET editkey_move_floor_up
bind CARET key_commandline
bind UNDERSCORE []
bind BACKQUOTE key_commandline
bind A left
bind B key_showmenuweapons
editbind B showtagclipfocus
bind C []
editbind C copy
bind D right
bind E edittoggle
editbind E edittoggle
bind F []
editbind F editkey_cubes_solid
specbind F speckey_demo_togglespeed
bind G quicknadethrow
editbind G editkey_cubes_space
bind H []
editbind H editkey_cubes_hf_floor
bind I []
editbind I editkey_cubes_hf_ceiling
specbind I speckey_whois_spectatecn
bind J []
bind K []
editbind K corner
bind L []
editbind L editkey_show_menu_light
bind M []
editbind M editkey_scroll_moveent
bind N quickanswer
bind O []
editbind O editkey_move_ceiling_down
bind P []
editbind P editkey_move_ceiling_up
bind Q key_prevweapon
editbind Q editkey_scroll_vdelta
bind R reload
editbind R redo
bind S backward
bind T saycommand
bind U []
editbind U undo
bind V key_showmenuvoicecom
editbind V paste
bind W forward
bind X []
editbind X editkey_scroll_walluppertex
bind Y key_teamchat
bind Z []
editbind Z editkey_scroll_floorceiltex
bind DELETE []
editbind DELETE editkey_floortex_dn
bind KP0 []
bind KP1 []
editbind KP1 editkey_tagclip_none
bind KP2 []
editbind KP2 editkey_tagclip_plclip
bind KP3 []
editbind KP3 editkey_tagclip_clip
bind KP4 []
editbind KP4 editkey_uppertex_dn
bind KP5 []
bind KP6 []
bind KP7 []
editbind KP7 editkey_uppertex_up
bind KP8 []
bind KP9 []
bind KP_PERIOD []
bind KP_DIVIDE []
bind KP_MULTIPLY key_console_end
bind KP_MINUS key_console_rewind
bind KP_PLUS key_console_forward
bind KP_ENTER []
bind KP_EQUALS []
bind UP forward
bind DOWN backward
bind RIGHT right
bind LEFT left
bind INSERT []
editbind INSERT editkey_floortex_up
bind HOME []
editbind HOME editkey_walltex_up
specbind HOME speckey_demo_gamespeedreset
bind END []
editbind END editkey_walltex_dn
bind PAGEUP []
editbind PAGEUP editkey_ceiltex_up
specbind PAGEUP speckey_demo_gamespeedup
bind PAGEDOWN []
editbind PAGEDOWN editkey_ceiltex_dn
specbind PAGEDOWN speckey_demo_gamespeeddown
bind F1 key_voteyes
bind F2 key_voteno
bind F3 []
bind F4 []
bind F5 key_domodifier_1
editbind F5 toggleocull
bind F6 key_domodifier_2
editbind F6 showmip
bind F7 []
editbind F7 editkey_fullbright
bind F8 []
editbind F8 showfocuscubedetails
bind F9 []
bind F10 key_getdemo
bind F11 key_toggleconsole
bind F12 screenshot
bind F13 []
bind F14 []
bind F15 []
bind NUMLOCK []
bind CAPSLOCK []
bind SCROLLOCK []
bind RSHIFT []
bind LSHIFT crouch
editbind LSHIFT editkey_editmeta2
bind RCTRL jump
bind LCTRL []
editbind LCTRL editmeta
bind RALT []
bind LALT key_showmap
bind RMETA []
bind LMETA []
bind LSUPER []
bind RSUPER []
bind MODE []
bind COMPOSE []
bind HELP []
bind PRINT []
bind SYSREQ []
bind BREAK []
bind MENU []
_defaultbinds 0
omitunchangeddefaults 1 // switch to a clean saved.cfg when keybinds are reset