#==============================================================================
# ■ むー素材用モジュール Ver 1.0
#------------------------------------------------------------------------------
# スクリプトに必要なモジュールです。 By むー
#------------------------------------------------------------------------------
# 使用スクリプト
# ・ドロップアイテム演出
# ・アイテム重量制
#==============================================================================
module MOO_GENERAL_MODULE
#--------------------------------------------------------------------------
# 以下、設定箇所です。
#--------------------------------------------------------------------------
# ウィンドウのサイズ(1=544x416 / 2=640x480)
WINDOW_SIZE = 1
# ここで指定しても、ウィンドウサイズが変わるわけではありません。
#--------------------------------------------------------------------------
# ここまで。
#--------------------------------------------------------------------------
#**************************************************************************
# ※ ここ以下は変更しないでください。
#**************************************************************************
#--------------------------------------------------------------------------
# ● 左右どちらかに指定文字を埋める
# word: 元々の文字列
# len: 全部で何文字にするか
# str: 埋める文字
# lr: 埋める文字を付ける方向(1=左/2=右)
# bury_plus("world", 8, " ", 1) → 結果: " world"
# bury_plus("world", 8, "@", 2) → 結果: "world@@@"
#--------------------------------------------------------------------------
def bury_plus(word, len, str, lr = 1)
return word if word.length >= len
str.to_s
pls = ""
for i in 1..len - word.length
pls += str
end
case lr
when 1; return pls + word
when 2; return word + pls
end
end
#--------------------------------------------------------------------------
# ● 重量制限用:アイテムウィンドウで総重量を示すウィンドウの位置
#--------------------------------------------------------------------------
def weight_item_window_x
return 384 if WINDOW_SIZE == 1
return 480 if WINDOW_SIZE == 2
end
#--------------------------------------------------------------------------
# ● 重量制限用:アイテムウィンドウで総重量を示すウィンドウの位置
#--------------------------------------------------------------------------
def weight_item_window_y
return 72 if WINDOW_SIZE == 1
return 72 if WINDOW_SIZE == 2
end
#--------------------------------------------------------------------------
# ● 重量制限用:アイテムウィンドウで総重量を示すウィンドウの位置
#--------------------------------------------------------------------------
def weight_item_window_w
return 160 if WINDOW_SIZE == 1
return 160 if WINDOW_SIZE == 2
end
#--------------------------------------------------------------------------
# ● 重量制限用:アイテムウィンドウで総重量を示すウィンドウの位置
#--------------------------------------------------------------------------
def weight_item_window_h
return 48 if WINDOW_SIZE == 1
return 48 if WINDOW_SIZE == 2
end
#--------------------------------------------------------------------------
# ● 重量制限用:ショップの売却画面で総重量を示すウィンドウの幅調整
#--------------------------------------------------------------------------
def weight_shop_buy_category_window_adjust_w
return 32 if WINDOW_SIZE == 1
return 32 if WINDOW_SIZE == 2
end
end