Darkness9724

RMVXA Script Loader

May 7th, 2022 (edited)
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.40 KB | None | 0 0
  1. $imported = {} if $imported.nil?
  2. $imported['DARK_Externalizer'] = true
  3.  
  4. module Externalizer
  5.     DIR = 'Scripts/**'
  6.     LOADER = 'Loader'
  7. end
  8.  
  9. $TEST = false
  10.  
  11. def load_script(path)
  12.     v, $VERBOSE = $VERBOSE, nil unless $TEST || $BTEST
  13.     Dir["#{Externalizer::DIR}/#{path}.rb"].each { |f| eval(File.new(f).read) }
  14.     $VERBOSE = v unless $TEST || $BTEST
  15. end
  16.  
  17. load_script(Externalizer::LOADER)
  18.  
Add Comment
Please, Sign In to add comment