uses paul/region-layout.df

"../deathforth/events/trade/loothut.txt" $load-rooms

locdef{

location: camphut
		max-rooms: 1
		entry-tags: camphut
		pre-script: set-theme-cabin
		script: set-theme-cabin
		post-script: 
		
		room-choice: camphut
			room-weight: 10
			room-count: 1
			room-script: ndx 
			room-post-script: tradecamploot
			filter-only

}

map{ regiondef{

trade-camp-reset

: bldg tanchor!
	"camphut" $picklocid addloc prefab{ mrand 7 house1 } 
;

' plotdirt >defer ft

: pt
	xyp.xy ft // Plot the current floor by default

	xyp.i char v = if tradercarhere then;
	xyp.i char P = if pictable1 lt-here 8 rdrift then;
	xyp.i char x = if quietgravehere then;
	xyp.i char c = if campfirehere then;
	xyp.i char G = if ' plotgrass to ft xyp.xy ft then;
	xyp.i char C = if tenthere then;
	xyp.i char * = if ttenthere then;
	xyp.i char $ = if xyp.xy grassedge then;
	xyp.i char T = if traderhere then;
	xyp.i char S = if trader-food-for-gas then;
	xyp.i char g = if ' plotpave to ft xyp.xy ft xyp.xy grassedge xyp.xy then;
	xyp.i char r = if ' plotpave to ft xyp.xy ft then;
	xyp.i char w = if docarwreck then;
	xyp.i char s = if dotirestack then;
	xyp.i char t = if wooded then;
	xyp.i char { = if dirtstart then;
	xyp.i char } = if dirtend then;
	xyp.i char [ = if dirtstart then;
	xyp.i char ] = if gravelendw then;
	xyp.i char ( = if grassstart then;
	xyp.i char ) = if grassend then;
	xyp.i char < = if grassstart2 then;
	xyp.i char > = if grassend2 then;
	xyp.i char @ = if xyp.xy bldg then;
;

"
...........................
..........t...t...t........
......t.............t......
...t.t.....................
.t...........T..........t..
...t.t................t....
.t.........................
...........................
...........................
..........T.....T..........
...........................
.@.................@.......
[..........................
...........................
...........................
...........................
...........................
..........................]"
constant maplayout

: plotmap
	0 -1 maplayout xyplot: pt
;

: site-setup
	1 no_time!
	7 14 rnd o'clock
	
	-1 1 frnd wind_force!
	20 %chance if 0 1 frnd weather! then

	' plotgrass to ft
	plotmap
	mission{ no-edge-spawns }

	// Put char and chars in middle of map
	15 %mv-up
	30 %chars-up
;

region: campsite
	w: maplayout layoutw
	h: maplayout layouth

	start-mode: 1

	post-script: site-setup

} }
