
// 32x stuff

: indbluepanel
	spawn special_objects32_base_id 0x 20 0 2 rnd + + lt .spriteid!
	rndflip bbox swoleweight as-metal -1 movey
;

: indgreenpanel
	spawn special_objects32_base_id 0x 23 0 2 rnd + + lt .spriteid!
	rndflip bbox swoleweight as-metal -1 movey
;

: indwallstuff
	spawn special_objects32_base_id 0x 2a 0 5 rnd + + lt .spriteid!
	rndflip bbox immovable as-metal
;

: indwalls
	indwallstuff -10 movey 1 movex indwallstuff -10 movey -1 movex
	
;

: 3indwalls
	indwallstuff -10 movey 2 movex indwallstuff -10 movey -2 movex indwallstuff -10 movey
	
;

: indshelf
	spawn special_objects32_base_id 0x 28 0 1 rnd + + lt .spriteid!
	rndflip bbox swoleweight as-wood dropswood
;

: indsmallcover
	spawn special_objects32_base_id 0x 38 0 7 rnd + + lt .spriteid!
	rndflip bbox immovable as-wood dropswood
;

: indbarrel
	spawn special_objects32_base_id 0x 30 0 3 rnd + + lt .spriteid!
	rndflip bbox 

;
: indcrate
	spawn special_objects32_base_id 0x 34 90 %chance if 0 2 rnd else 3 then + + lt .spriteid!
	rndflip bbox as-wood dropswood
	
;

: industsmall 50 %chance if indbarrel else indcrate then ;
: industsmalls for industsmall drift next ;
: indcrates for indcrate drift next ;
: indbarrels for indbarrel drift next ;

: indrndcover 66 %chance if  indsmallcover else 2 4 rnd indcrates then ;

// 48x stuff

: indlargecover
	spawn special_objects48_base_id 0x 10 0 9 rnd + + lt .spriteid!
	rndflip bbox immovable as-wood dropswood
;

: indbigtank
	spawn special_objects48_base_id 0x 8 0 2 rnd + + lt .spriteid!
	rndflip bbox swoleweight as-metal
;

: indfurnace
	spawn special_objects48_base_id 0x 1a + lt .spriteid!
	rndflip bbox immovable as-metal
;

: indrndlargecover 66 %chance if indlargecover else 5 7 rnd indcrates then ;
: indrndtank 60 %chance if indbigtank else 3 5 rnd indbarrels then ;

// 64x stuff

: indmega
	spawn special_objects64_base_id 0x 4 0 4 rnd + + lt .spriteid!
	rndflip bbox immovable as-metal
;

: indmegasame
	spawn special_objects64_base_id 0x 4 theme-num + + lt .spriteid!
	rndflip bbox immovable as-metal
;

: indmeganobox
	spawn special_objects64_base_id 0x 5 0 2 rnd + + lt .spriteid!
	rndflip bbox immovable as-metal
;

: indmegapump
	spawn special_objects64_base_id 0x 8 + lt .spriteid!
	rndflip bbox immovable as-metal
;

: indmegabox
	spawn special_objects64_base_id 0x 4 + lt .spriteid!
	rndflip bbox immovable as-metal
;

: indrndind
	0 3 rnd case
		0 of indmegabox endof
		1 of indrndtank endof
		2 of indrndlargecover endof
		3 of indrndcover endof
	endcase	
;

: factorylloot
	35 %chance if wrench .scatter then
	20 %chance if metal .scatter then
	10 %chance if crowbar .scatter then
	2 %chance if blowtorch .scatter then
;

: indust-rnd rnd5050 if "indust-hall" else "indust-room" then ;

cyoa{ road{

cyoa: indust-test
	cyoa-start
	"Factory Complex" cyoa-title!
	someicon
	($ Thegroup .. " gets overwhelmed by a horde, and flees for a nearby factory. There must be another way out inside." $) cyoa-text! 3 500 tone
		1.3 13 23 rnd 2 3 rnd zforecast
		mission{ ' door-no-escape to main-event-mission-location-leave }
		"events/industrial/region/industrytest.df" $load-region
		choice( "DIVE IN" )choice: premission
;

cyoa: indust-safe
	cyoa-start
	"Successful Factory" cyoa-title!
	someicon
	($ Thegroup .. " sees a large factory that looked like it was busy, before the apocalypse. It's less run down that most other factories, at least on the outside." $) cyoa-text! 3 500 tone
	1 1.3 frnd 8 15 frnd 0 2 rnd zforecast
	"events/industrial/region/industrysafe.df" $load-region
		choice( "Explore Factory" )choice: premission
		gas-draw
;

cyoa: rescueindust
	cyoa-start
	"Factory Rescue" cyoa-title!
	someicon
	($ Thegroup .. " is driving through a quiet factory district. They run into a horde distracted with chasing someone down." $) cyoa-text! 3 500 tone
	1 1.3 frnd 7 16 frnd 2 4 rnd zforecast
	"events/industrial/region/rescueindust.df" $load-region
		choice( "Attempt Rescue!" )choice: premission
		gas-draw
;

cyoa: indust-easy
	cyoa-start
	"Quiet Factory" cyoa-title!
	someicon
	($ Thegroup .. " finds a run down factory, like most factories one would see nowadays. Sometimes people try to set up a safe hideout in a factory side closet, but this usually doesn't end well." $) cyoa-text! 3 500 tone
	0.7 0.9 frnd 7 14 frnd 0 2 rnd zforecast
	"events/industrial/region/industryeasy.df" $load-region
		choice( "Explore Factory" )choice: premission
		gas-draw
;

} }



