RoomRentable = class(Room, function(o, x, y, world, ...)
	local arg = {...}
	if arg[1] == nil then
		options = {}
	else
		options = arg[1]
	end
	o.settingName = options.settingName or 'room_rentable_'
	o.prefix = options.prefix or '1star'
	o.typecount = 1
	Room.init(o, x, y, world, ...)
	
	o.shootRate = o.shootRate*4
	o.drawType = 'svg'
	o.svg = SvgLoader(svg_root .. "rooms/" .. o.prefix .. "_".. math.random(4) .. "_" .. player.currentWorld.id ..".svg", true)
	o.svg:setPosition(x, y)

	Room.setHealth(o, game_settings[o.settingName .. "health"], game_settings[o.settingName .. "health"])
end)
RoomRentable.rtype = RoomRentable
function RoomRentable:pulse()
	Room.pulse(self)
	if self.world.waveController.started then
		self.world.moneyController:setAmount(self.world.moneyController:getAmount()+game_settings[self.settingName .. 'earning'])
		-- squirt out some dollar signs
		local ppos = self:center()
		-- bludG.camera:worldToScreen(self:center())
		p = mainState.moneyParticles.pl.particles
		p:setPosition(ppos.x, ppos.y)
		p:add(1)
	end
end

RoomRentable.rtype = RoomRentable
RoomRentable.cost = 200
RoomRentable.color = {r=255, g=255, b=255, a=255, rtype=RoomRentable, typecount=1}
RoomRentable.settingName = "room_rentable_"


RoomRentable2 = class(RoomRentable, function(o, x, y, world, ...)
	local arg = {...}
	if arg[1] == nil then
		options = {}
	else
		options = arg[1]
	end
	options.settingName = 'room_rentable2_'
	options.prefix = '2star'
	RoomRentable.init(o, x, y, world, options)
end)
RoomRentable2.rtype = RoomRentable2
RoomRentable3 = class(RoomRentable, function(o, x, y, world, ...)
	local arg = {...}
	if arg[1] == nil then
		options = {}
	else
		options = arg[1]
	end
	options.settingName = 'room_rentable3_'
	options.prefix = '3star'

	RoomRentable.init(o, x, y, world, options)
end)
RoomRentable3.rtype = RoomRentable3
RoomRentable4 = class(RoomRentable, function(o, x, y, world, ...)
	local arg = {...}
	if arg[1] == nil then
		options = {}
	else
		options = arg[1]
	end
	options.settingName = 'room_rentable4_'
	options.prefix = '4star'
	RoomRentable.init(o, x, y, world, options)
end)
RoomRentable4.rtype = RoomRentable4
RoomRentable5 = class(RoomRentable, function(o, x, y, world, ...)
	local arg = {...}
	if arg[1] == nil then
		options = {}
	else
		options = arg[1]
	end
	options.settingName = 'room_rentable5_'
	options.prefix = '5star'
	RoomRentable.init(o, x, y, world, options)
end)
RoomRentable5.rtype = RoomRentable5
