Originally Posted by
Lukc
I think the palette looks great. How are you inserting the place names automatically?
It's a bit crude, but it's just a plain old search and replace on the file. The actual code looks like this:
Code:
Generators={"Inland Town"=>Town, "River Town"=>RiverTown, "Coast Town"=>CoastTown, "Delta Town"=>DeltaTown, "Lake Town"=>LakeTown, "Mountains"=> Mountains, "Island"=> Island}
$stdin.each do |line|
Generators.each_pair do |key, gen|
line.gsub! key, gen.to_s.title_caps
end
puts line
end