Skip to content

Commit

Permalink
Merge pull request #6983 from MahtraDR/prep_for_core_lich
Browse files Browse the repository at this point in the history
[scripts][dependency][bootstrap] More prep for components in core lich
  • Loading branch information
MahtraDR authored Nov 13, 2024
2 parents 0564516 + 8ebda13 commit 06bb98c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
11 changes: 6 additions & 5 deletions bootstrap.lic
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
Documentation: https://elanthipedia.play.net/Lich_script_development#bootstrap
=end

$BOOTSTRAP_VERSION = '1.0.2'
$BOOTSTRAP_VERSION = '1.0.3'
DRINFOMON_IN_CORE_LICH ||= false
DRINFOMON_CORE_LICH_DEFINES ||= []

class_defs = {
'drinfomon' => :DRINFOMON,
Expand Down Expand Up @@ -54,17 +55,17 @@ $MODERN_LICH = lich_version >= if Regexp.last_match(1)
Gem::Version.new('4.6.49')
end

if args.wipe_constants
if args.wipe_constants && !DRINFOMON_IN_CORE_LICH
class_defs.each_value { |symb| remove_constant(symb) if constant_defined?(symb) }
exit
end

scripts_to_run = args.flex || []
echo scripts_to_run.to_s if UserVars.bootstrap_debug

if scripts_to_run.include?("drinfomon") && DRINFOMON_IN_CORE_LICH
scripts_to_run -= ['drinfomon']
echo("Removing drinfomon from scripts_to_run") if UserVars.bootstrap_debug
if (scripts_to_run & DRINFOMON_CORE_LICH_DEFINES).any?
scripts_to_run -= DRINFOMON_CORE_LICH_DEFINES
echo("Removing core lich defines from scripts_to_run") if UserVars.bootstrap_debug
end

until scripts_to_run.empty?
Expand Down
5 changes: 3 additions & 2 deletions dependency.lic
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ require 'ostruct'
require 'digest/sha1'
require 'monitor'

$DEPENDENCY_VERSION = '1.7.9'
$DEPENDENCY_VERSION = '1.7.10'
$MIN_RUBY_VERSION = '3.2.2'
DRINFOMON_IN_CORE_LICH ||= false
DRINFOMON_CORE_LICH_DEFINES ||= []

no_pause_all
no_kill_all
Expand Down Expand Up @@ -1604,7 +1605,7 @@ def custom_require
respond("CR:starting:#{script_names}") if UserVars.bootstrap_debug
if DRINFOMON_IN_CORE_LICH
echo("DRInfomon in core lich detected. Skipping loading drinfomon and commons") if UserVars.bootstrap_debug
script_names -= %W(drinfomon common common-arcana common-crafting common-healing common-healing-data common-items common-money common-moonmage common-summoning common-theurgy common-travel common-validation events slackbot equipmanager spellmonitor)
script_names -= DRINFOMON_CORE_LICH_DEFINES
end
bootstrapper = force_start_script('bootstrap', script_names)
pause 0.05
Expand Down

0 comments on commit 06bb98c

Please sign in to comment.