require 'json'

JSON_OPTS = { :indent => "\t", :space => " ", :space_before => " ", :object_nl => "\n", :array_nl => "\n" }

def main
	puts "Relic type?"
	relictype = gets.chomp()
	lootname = relictype.gsub('-', '-loot_relic_')
	puts "Visible name?"
	visiblename = gets.chomp()
	puts "Sprite name?"
	iconname = gets.chomp()

	info = {}
	info['Name'] = lootname
	info['VisibleName'] = visiblename
	info['LootType'] = 'Relic'
	info['AutoPickup'] = false
	info['PickupSFX'] = 'base-pickup-ammo-generic'
	info['RelicType'] = relictype
	info['Cost'] = 1000
	info['Radius'] = 1.0
	info['SpriteName'] = iconname

	output = JSON.generate(info, JSON_OPTS)
	puts output

	filename = lootname.gsub('base-', '') + ".json"
	puts "Saving to #{filename}"
	File.write(filename, output)
end

main()
