Hi, I was hoping someone could help me tweak the code a little on the following script to keep a category hidden until it's list contains at least 1 entry.
The script is Venka's Bestiary v1.8 which can be found here in full:
https://www.dropbox.com/s/j43haetbe00k0gq/Beastiary.txt?dl=0the line of code I believe is needed for modification is the following, however, not being a coder I have almost 0 knowledge of how to link it up correctly. [line 921-923]
def make_command_list
@categories.each{|key, info| add_command(info[:name], key)}
end
I thought it might be something simple like inserting an if function before adding a command to check if there is a monster in the list discovered. But to someone like me with no real coding experience, I couldn't fathom how to insert a check before the category command list is formed.
Either the seemingly simpler method I'm wanting or an option to hide only some categories until a monster is discovered would be brilliant if anyone knows how to solve my issue I would be very grateful for your help
I love the script but the author seems inactive and I'd like to keep some locations secret until visited.
Thanks