本帖最后由 魏玉龙 于 2012-3-21 20:44 编辑
如果想让任务选项没任务的时候灰色
应该这样加
Window_MenuCommand
#-------------------------------------------------------------------------- # ● 独自添加指令用 #-------------------------------------------------------------------------- def add_original_commands end
#--------------------------------------------------------------------------
# ● 独自添加指令用
#--------------------------------------------------------------------------
def add_original_commands
end
替换为
#-------------------------------------------------------------------------- # ● 独自添加指令用 #-------------------------------------------------------------------------- def add_original_commands add_command("任务", :task,task_enabled) end
#--------------------------------------------------------------------------
# ● 独自添加指令用
#--------------------------------------------------------------------------
def add_original_commands
add_command("任务", :task,task_enabled)
end
然后找
#-------------------------------------------------------------------------- # ● 添加整队指令 #-------------------------------------------------------------------------- def add_formation_command add_command(Vocab::formation, :formation, formation_enabled) end
#--------------------------------------------------------------------------
# ● 添加整队指令
#--------------------------------------------------------------------------
def add_formation_command
add_command(Vocab::formation, :formation, formation_enabled)
end
下添加
#-------------------------------------------------------------------------- # ● 获取任务的有效状态 #-------------------------------------------------------------------------- def task_enabled $game_party.unfinished_tasks.size>= 1 || $game_party.finished_tasks.size>= 1 end
#--------------------------------------------------------------------------
# ● 获取任务的有效状态
#--------------------------------------------------------------------------
def task_enabled
$game_party.unfinished_tasks.size>= 1 || $game_party.finished_tasks.size>= 1
end
|