/***************************
 * DEPRECATED THINGS BELOW *
 ***************************/
// todo the bank-specific stuff should be defined elsewhere
var bankCustomer = {  extend: npcBase, components: [
	{
		c: SpriteComponent, d:
		{
			name: "civilianA",
		}
	},
	{
		c: AIComponent,
/*			d: untyped {
			reactions: [
				CommonAIReactions.gotoPanicHear,
				CommonAIReactions.gotoPanicSawGun,
				CommonAIReactions.gotoPanicOtherDrewGun
			],
			states: [
				CommonAIStates.inPanic,
				{
					name: "leaving",
					conditions: [
						{
							name: "flagSet",
							params: {
								name: "hasVisitedCashier",
							}
						}
					],
					steps: [
						{
							name: "gotoHotspot",
							params: {
								category: "mapExit"
							}
						},
						{
							name: "removeEntity"
						}
					]
				},
				// this is here in case the entity can't pathfind to the exit point
				{
					name: "loiteringReadyToLeave",
					conditions: [
						{
							name: "flagSet",
							params: {
								name: "hasVisitedCashier",
							}
						}
					],
					steps: [
						{
							name: "gotoRandomWaypoint",
							params: {
								minX: 0,
								minY: 0,
								maxX: 28,
								maxY: 13
							}
						},
						{
							name: "specialAction",
							params: {
								name: "loitering"
							}
						}
					]
				},
				{
					name: "atCashier",
					conditions: [
						{
							name: "atHotspot",
							params: {
								names: ["queue1_1", "queue2_1", "queue3_1"]
							}
						}
					],
					steps: [
						{
							name: "setFlag",
							params: {
								name: "hasVisitedCashier",
							}
						},
						{
							name: "specialAction",
							params: {
								name: "atCashier"
							}
						}
					],
				},
				{
					name: "queuing",
					steps: [
						{
							name: "gotoHotspot",
							params: {
								category: "queue",
								behavior: "queue"
							}
						}
					]
				},
				{
					name: "inQueue",
					conditions: [
						{
							name: "atHotspot",
							params: {
								categories: ["queue"]
							}
						}
					],
					steps: [
						{
							name: "specialAction",
							params: {
								name: "idleInQueue"
							}
						}
					]
				},
				{
					name: "loitering",
					steps: [
						{
							name: "gotoRandomWaypoint",
							params: {
								minX: 0,
								minY: 0,
								maxX: 28,
								maxY: 13
							}
						},
						{
							name: "specialAction",
							params: {
								name: "loitering"
							}
						}
					]
				},
			]
		}*/
	},
	{
		c: SpecialActionComponent,
		d: {
			actions: {
				use: {
					anims: ["use"],
				},
				poop: {
					anims: ["toilet"],
					minDuration: 2,
					maxDuration: 15,
					showProgress: true
				},
				call: {
					anims: ["use"],
					minDuration: 2,
					maxDuration: 3,
					showProgress: true
				},
				idleInQueue: { // plays one of the specific animations at random, after which specialAction is done
					anims: ["idle", "smoke"],
					order: "random"
				},
				loitering: { // plays the idle animation for 5 to 10 seconds, after which specialAction is done
					anims: ["idle", "smoke"],
					minDuration: 3,
					maxDuration: 15
				},
				atCashier: {
					anims: ["use", "idle", "atCashier"],
					minDuration: 3,
					maxDuration: 15,
					showProgress: true
				}
			}
		}
	},
]};

var bankClerk = { extend: npcBase, components: [
	{
		c: TeamComponent,
		d: {
			name: "clerks"
		}
	},
	{
		c: SpriteComponent,
		d: {
			name: "clerkA",
		}
	},
	{
		c: AIComponent,
/*			d: untyped {
			reactions: [
				CommonAIReactions.gotoPanicHear,
				CommonAIReactions.gotoPanicSawGun,
				CommonAIReactions.gotoPanicOtherDrewGun,
				CommonAIReactions.gotoAlarmSawInStaffOnly,
				CommonAIReactions.gotoAlarmEnteredStaffOnly,
			],
			states: [
				CommonAIStates.inPanic,
				CommonAIStates.inAlarm,
				{
					name: "pooping",
					conditions: [
						{
							name: "random",
							params: {
								probability: 0.1
							}
						}
					],
					steps: [
						{
							name: "gotoHotspot",
							params: {
								category: "toilet",
							}
						},
						{
							name: "specialAction",
							params: {
								name: "poop"
							}
						}
					]
				},
				{
					name: "cashiering",
					steps: [
						{
							name: "gotoHotspot",
							params: {
								category: "cashier",
							}
						},
						{
							name: "specialAction",
							params: {
								name: "atCashier"
							}
						}
					]
				},
				{
					name: "loitering",
					steps: [
						{
							name: "gotoRandomWaypoint",
							params: {
								minX: 7,
								minY: 25,
								maxX: 23,
								maxY: 30
							}
						},
						{
							name: "specialAction",
							params: {
								name: "loitering"
							}
						}
					]
				},
			]
		}*/
	},
	{
		c: SpecialActionComponent,
		d: {
			actions: {
				use: {
					anims: ["use"],
				},
				poop: {
					anims: ["toilet"],
					minDuration: 2,
					maxDuration: 15
				},
				loitering: {
					anims: ["smoke", "idle"],
					minDuration: 10,
					maxDuration: 30
				},
				atCashier: {
					anims: ["use", "idle"],
					minDuration: 10,
					maxDuration: 30,
					showProgress: true
				},
				setAlarm: {
					anims: ["use"],
					showProgress: true
				}
			}
		}
	},
]};

var movementTestGuard = { extend: npcBase, components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_FLOOR,
			sheet: "characters",
			name: "guardA",
		}
	},
	{
		c: AIComponent,
	},
	{
		c: SpecialActionComponent,
		d: {
			actions: {
				use: {
					anims: ["use"],
				},
				poop: {
					anims: ["toilet"],
					minDuration: 2,
					maxDuration: 15,
					showProgress: true
				},
				call: {
					anims: ["use"],
					minDuration: 2,
					maxDuration: 3,
					showProgress: true
				},
				wait: {
					anims: ["lookAround"],
					minDuration: 1,
					maxDuration: 1
				},
			}
		}
	},
	{
		c: InventoryComponent,
		d: {
			items: [
				"stickItem",
			]
		}
	},
]};

var standingTestGuard = { extend: npcBase, components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "characters",
			name: "guardA",
		}
	},
]};

var wanderTestGuard = { extend: npcBase, components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "characters",
			name: "guardA",
		}
	},
	{
		c: AIComponent,
		/*
		d: untyped {
			states: [
				{
					name: "wander",
					steps: [
						{
							name: "wander",
							params: {
								strength: 1, // strength ranging from 0 (no turning) to 1 (shown here) which can be thought of as moving the red dot out along the white line.
								rate: 0.6 // rate which controls how fast the "wander direction" changes, ranging from 0 (no change) to 1 (fast erratic change) represented here as the radius of the white circle (shown at 0.6) indicating the maximum random offset.
							}
						},
					]
				},
			]
		}
		*/
	},
	{
		c: InventoryComponent,
		d: {
			items: [
				"stickItem",
			]
		}
	},
]};

var patrolTestGuard = { extend: npcBase, components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "characters",
			name: "guardA",
		}
	},
	{
		c: AIComponent,
		/*
		d: untyped {
			states: [
				{
					name: "patrolling",
					steps: [
						{
							name: "gotoHotspot",
							params: {
								category: "patrol",
								behavior: "patrol"
							}
						},
					]
				},
			]
		}
		*/
	},
	{
		c: SpecialActionComponent,
		d: {
			actions: {
				use: {
					anims: ["use"],
				},
				poop: {
					anims: ["toilet"],
					minDuration: 2,
					maxDuration: 15,
					showProgress: true
				},
				call: {
					anims: ["use"],
					minDuration: 2,
					maxDuration: 3,
					showProgress: true
				},
				wait: {
					anims: ["lookAround"],
					minDuration: 1,
					maxDuration: 1
				},
			}
		}
	},
	{
		c: InventoryComponent,
		d: {
			items: [
				"stickItem",
			]
		}
	},
]};

