1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
[object_type]
id=fireplace
zorder=-3
collide_dimensions="level_only"
[editor_info]
category=furniture
[var]
name=is_burning
value="1"
type=boolean
[/var]
[/editor_info]
[vars]
fire="null()"
[/vars]
platform_area=9,11,70,12
on_create="[if(is_burning,spawn('fire_generator',midpoint_x+10*facing,midpoint_y+28,facing,set(zorder,-2) )),if(is_burning,animation('burn'),animation('normal'))]"
on_end_normal_anim="animation('normal')"
on_end_burn_anim="[animation('burn'),set(time_in_animation,1d10)]"
on_child_spawned="set(vars.fire, child)"
on_extinguish="[animation('normal'),set(is_burning,0),if(vars.fire, [remove_object(vars.fire),set(vars.fire, null())])]"
on_ignite="[animation('burn'),set(is_burning,1),if(not vars.fire, spawn('fire_generator',midpoint_x+10*facing,midpoint_y+28,facing,set(zorder,-2) ))]"
[base:animation]
image=props/fireplace.png
pad=0
interact_area=all
[/animation]
[animation]
id=normal
rect=0,0,79,63
frames=1
duration=100
[/animation]
[animation]
id=burn
rect=0,64,79,127
frames=3
frames_per_row=1
duration=4
[/animation]
[/object_type]
|