mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Added Setting that prompts compiling upon startup
This commit is contained in:
@@ -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!
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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|
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user