Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[all][games.rb]bug:fix namespace constants #740

Merged
merged 8 commits into from
Feb 1, 2025
2 changes: 2 additions & 0 deletions lib/dragonrealms/drinfomon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ module DragonRealms
module DRInfomon
$DRINFOMON_VERSION = '3.0'

DRINFOMON_CORE_LICH_DEFINES = %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)

DRINFOMON_IN_CORE_LICH = true
require_relative 'drinfomon/drdefs'
require_relative 'drinfomon/drvariables'
Expand Down
4 changes: 2 additions & 2 deletions lib/games.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module Common
end

module Gemstone
include Lich::Common
include Lich
module Game
@@socket = nil
@@mutex = Mutex.new
Expand Down Expand Up @@ -620,7 +620,7 @@ def Scars.method_missing(_arg = nil)
end

module DragonRealms
include Lich::Common
include Lich
module Game
@@socket = nil
@@mutex = Mutex.new
Expand Down
6 changes: 3 additions & 3 deletions lib/stash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module Lich
module Stash
def self.find_container(param, loud_fail: true)
param = param.name if param.is_a?(Lich::Gemstone::GameObj)
param = param.name if param.is_a?(GameObj) # (Lich::Gemstone::GameObj)
found_container = GameObj.inv.find do |container|
container.name =~ %r[#{param.strip}]i || container.name =~ %r[#{param.sub(' ', ' .*')}]i
end
Expand Down Expand Up @@ -108,13 +108,13 @@ def self.stash_hands(right: false, left: false, both: false)
end
# weaponsack for both hands
if UserVars.weapon.class == String and UserVars.weaponsack.class == String and not UserVars.weapon.empty? and not UserVars.weaponsack.empty? and (right_hand.name =~ /#{Regexp.escape(UserVars.weapon.strip)}/i or right_hand.name =~ /#{Regexp.escape(UserVars.weapon).sub(' ', ' .*')}/i)
weaponsack = nil unless (weaponsack = find_container(UserVars.weaponsack, loud_fail: false)).is_a?(Lich::Gemstone::GameObj)
weaponsack = nil unless (weaponsack = find_container(UserVars.weaponsack, loud_fail: false)).is_a?(GameObj) # (Lich::Gemstone::GameObj)
end
# lootsack for both hands
if UserVars.lootsack.class != String || UserVars.lootsack.empty?
lootsack = nil
else
lootsack = nil unless (lootsack = find_container(UserVars.lootsack, loud_fail: false)).is_a?(Lich::Gemstone::GameObj)
lootsack = nil unless (lootsack = find_container(UserVars.lootsack, loud_fail: false)).is_a?(GameObj) # (Lich::Gemstone::GameObj)
end
# finding another container if needed
other_containers_var = nil
Expand Down