Added Setting that prompts compiling upon startup

This commit is contained in:
Maruno17
2023-10-01 18:52:48 +01:00
parent cd32b5e725
commit a6c7e2c1ff
4 changed files with 15 additions and 1 deletions

View File

@@ -452,6 +452,13 @@ module Settings
"Pizza"
]
end
#=============================================================================
# Whether the game will ask you if you want to fully compile every time you
# start the game (in Debug mode). You will not need to hold Ctrl/Shift to
# compile anything.
PROMPT_TO_COMPILE = false
end
# DO NOT EDIT THESE!

View File

@@ -555,6 +555,7 @@ module PluginManager
def self.needCompiling?(order, plugins)
# fixed actions
return false if !$DEBUG || FileTest.exist?("Game.rgssad")
return true if $full_compile
return true if !FileTest.exist?("Data/PluginScripts.rxdata")
Input.update
return true if Input.press?(Input::SHIFT) || Input.press?(Input::CTRL)

View File

@@ -1078,7 +1078,7 @@ module Compiler
mustCompile |= (latestTextTime >= latestDataTime)
# Should recompile if holding Ctrl
Input.update
mustCompile = true if Input.press?(Input::CTRL)
mustCompile = true if $full_compile || Input.press?(Input::CTRL)
# Delete old data files in preparation for recompiling
if mustCompile
data_files.each do |filename|

View File

@@ -25,6 +25,12 @@ end
def mainFunctionDebug
begin
MessageTypes.load_default_messages if FileTest.exist?("Data/messages_core.dat")
if $DEBUG && !FileTest.exist?("Game.rgssad") && Settings::PROMPT_TO_COMPILE
pbSetResizeFactor(1) # Needed to make the message look good
if pbConfirmMessage("\\ts[]" + "Do you want to compile your data and plugins?")
$full_compile = true
end
end
PluginManager.runPlugins
Compiler.main
Game.initialize