{
id: "soda_machine",
zorder: -3,
on_create: "[spawn('soda_machine.glow_mask',midpoint_x,midpoint_y,facing),
			spawn('sfx_falloff_generator',midpoint_x,midpoint_y,1,[set(effect_name,'ambient/fridge.ogg'),set(x_bound,x-50),set(x2_bound,x+50),set(y_bound,y-50),set(y2_bound,y+50)])
]",


platform_area: [11,5,37,6],
on_interact: "if(level.player.hitpoints < level.player.max_hitpoints and level.player.coins > 0, [
		sound('insert-coin.ogg'),
		schedule(50, sound('soda-vend.ogg')),
		schedule(60, spawn('heart_object',level.player.midpoint_x,level.player.midpoint_y,1)), add(level.player.coins,-1),
		fire_event(level.player, 'start_interact'),
		schedule(60,fire_event(level.player, 'end_interact'))])",
editor_info: {
	category: "decor, general",
},
animation: {
	id: "normal",
	image: "props/furniture2.png",
	rect: [64,96,111,159],
	interact_area: "all",
},
object_type: {
	id: "glow_mask",
	zorder: -2,
	on_create: "set(alpha,0)",
	timer_frequency: 2,
	on_timer: "if(1d3=3, [ set(lights, circle_light(me, 100+foo*2)), schedule(5, set(lights, circle_light(me, 100)) ), set(alpha,foo),set(brightness,1100),schedule(5,[set(alpha,0),set(brightness,255)]) ] where foo = 1d10+5)",
	animation: {
		id: "normal",
		image: "props/furniture2.png",
		rect: [64,160,111,223],
	},
},
}