Module: GamesAndRpgParadise::Lpc::Geas::Paths
- Defined in:
- lib/games_and_rpg_paradise/lpc/geas/paths.rb
Defined Under Namespace
Modules: Lpc
Constant Summary collapse
- STD =
#
Some shortcuts for paths in the mud called Geas.
#
'/std/'
- STD_MISC =
/std/misc.
STD+'misc/'
- MISC =
STD_MISC
- SYSTEM =
!/usr/bin/ruby -w
'/d/System/'
- SYSTEM_MONSTER =
forumcompacter
SYSTEM+'monster/'
- SYS_HUMANOIDS =
SYSTEM_MONSTER+'humanoid/'
- ARBOREA =
'/d/Arborea/'
- ARBOREA_ROOMS =
ARBOREA+'rooms/'
- AMWARD =
ARBOREA_ROOMS+'amward/'
- BANDAMA =
AMWARD+'bandama/'
- WEAPONS =
SYSTEM+'weapons/'
- IRONHOLD =
AMWARD+'ironhold/'
- IRONHOLD_PARK =
#
GamesAndRpgParadise::Lpc::Geas::Paths::IRONHOLD_PARK
#
IRONHOLD+'park/'
Class Method Summary collapse
-
.get_path(this_path) ⇒ Object
# === GamesAndRpgParadise::Lpc::Geas::Paths.get_path.
Instance Method Summary collapse
-
#get_path(i) ⇒ Object
# === get_path ========================================================================= #.
-
#is_included?(i, be_verbose = false) ⇒ Boolean
# === is_included?.
Class Method Details
.get_path(this_path) ⇒ Object
#
GamesAndRpgParadise::Lpc::Geas::Paths.get_path
This will get the path.
#
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/games_and_rpg_paradise/lpc/geas/paths.rb', line 149 def self.get_path(this_path) if this_path.is_a? Array this_path = this_path.join(' ') end this_path = this_path.downcase # We work with a downcased variant. _ = '' # Default value. _ = case this_path when 'toironholdpark','park','parks','topark' IRONHOLD_PARK when 'ironhold','ih','toironhold' IRONHOLD when 'arborea','arb' ARBOREA_ROOMS when 'bandama', 'ban', 'band', 'tobandama' BANDAMA when 'rope' STD_MISC+'rope' when 'orc' SYS_HUMANOIDS+'orc' when 'ogre' SYS_HUMANOIDS+'ogre' when 'goblin', 'gobbo', 'gob' SYS_HUMANOIDS+'goblin' when 'gremlin' SYS_HUMANOIDS+'gremlin' when 'torch' MISC+'torch' when 'knife' WEAPONS+'dagger/knife/' when 'small_club','sclub' else this_path end return _ end |
Instance Method Details
#get_path(i) ⇒ Object
#
get_path
#
217 218 219 |
# File 'lib/games_and_rpg_paradise/lpc/geas/paths.rb', line 217 def get_path(i) ::GamesAndRpgParadise::Lpc::Geas::Paths.get_path(i) end |
#is_included?(i, be_verbose = false) ⇒ Boolean
#
is_included?
This method can be used to query whether something is included or not.
#
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
# File 'lib/games_and_rpg_paradise/lpc/geas/paths.rb', line 196 def is_included?( i, be_verbose = false ) be_verbose = true if be_verbose == :be_verbose possibly_modified_input = ::GamesAndRpgParadise::Lpc::Geas::Paths.get_path(i) case i when possibly_modified_input puts 'No, `'+i+'` is not included.' if be_verbose return false else if be_verbose puts 'Yes, `'+i+'` is included.' puts 'It points at `'+get_path(i)+'`.' end return true end end |