Skip to content

Commit

Permalink
File>Reload Mission command to reload the current mission, discarding
Browse files Browse the repository at this point in the history
changes.
  • Loading branch information
vfig committed Dec 9, 2024
1 parent 9535d55 commit dfc9b82
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Common/Cmds/NewFile.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
; The `clear_world` command resets the `world` variable, but `new_world`
; (which also reloads the gamesys) does not. So we clear it here.
unset world
new_world
3 changes: 3 additions & 0 deletions Common/Cmds/ReloadFile.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
; Reload the current mission
ifndef world mprint Not saved, cannot reload.
ifdef world eval world load_file %s
4 changes: 2 additions & 2 deletions Common/MENUS.CFG
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ menu_edit_2 &Link:menu_qlink | &Multibrush:menu_mbrush | E&xtra:menu_extra | &Hi
menu_edit_3 &Textures:menu_textures | E&AX:menu_eax

;File
menu_file &New:new_world|Open Template:load_file levels\template.mis|&Open... (Alt+L):load_file
menu_file &New:run .\cmds\NewFile.cmd|Open Template:load_file levels\template.mis|&Open... (Alt+L):load_file
menu_file_1 Save &Cow...:save_cow|Save &GameSys... (Ctrl+Shift+S):save_gamesys
menu_file_2 Save &Mission... (Ctrl+S):save_mission|mru_files:&Recent Files ;Newdark only
menu_file_3 sep|Set Custom GameSys...:set_gamesys|sep|Export:menu_export ;Newdark only
menu_file_3 sep|Set Custom GameSys...:set_gamesys|sep|Reload Mission:run .\cmds\ReloadFile.cmd|sep|Export:menu_export ;Newdark only
menu_file_4 sep|Script:menu_script|sep|Run .cmd...:run @@.\cmds\example.cmd
menu_file_5 sep|Load DbMod...:dbmod_load ;Newdark only
menu_file_6 Load Savegame...:edit_load_game @@saves\quick.sav ;T2 Newdark only
Expand Down

0 comments on commit dfc9b82

Please sign in to comment.