Class: Establishment

Establishment

Establishment

new Establishment()

A restaurant. Game entity class.

After you leased a restaurant you need to buy at least a COUNTER, but it makes sense to buy a complete set of interior accessories.
Source:
Establishment.js

Members


address :String

Where the property is located. Read-only.
Type:
  • String
Source:
Establishment.js

salePrice :Number

The price to buy in USD for this property. Read-only.
Type:
  • Number
Source:
Establishment.js

leaseCost :Number

The price to lease in USD per month for this property. Read-only.
Type:
  • Number
Source:
Establishment.js

locationQuality :Number

The quality of this property. Ranges from 1 to 10. Higher means better. Read-only.
Type:
  • Number
Source:
Establishment.js

locationSize :Number

The size of this property in square-meters. Ranges from 25 to 250. Read-only.
Type:
  • Number
Source:
Establishment.js

rented :Boolean

Whether the real estate is just rented (or bought). Read-only.
Type:
  • Boolean
Source:
Establishment.js

interiorAccessories :List

A string list of interior accessories in this establishment. Read-only.
Type:
Source:
Establishment.js

storedFoodUnits :Set

set of FoodUnit currently stored in this property. Rotten food gets removed automatically. Read-Only.
Type:
Source:
Establishment.js

employees :List

Returns a list of all employees for this establishment. Read-only.
Type:
Source:
Establishment.js

Methods


buy()

Buys this establishment.
Source:
Establishment.js

buyInteriorAccessories(interiorAccessory)

Buys one or more interior accessories. These are:
TABLE for $500
CHAIR for $100
COUNTER for $2500
VERTICAL_ROTISSERIE for $1500
TOASTER for $700
OVEN for $5000
COFFEE_MACHINE for $2000
BEVERAGE_COOLER for $1500
FRIDGE for $3500
Parameters:
Name Type Description
interiorAccessory Object A single item (string) or an array of items (string) you want to buy and add to the establishment
Source:
Establishment.js
Example
company.establishments.get(0).
	buyInteriorAccessories("COUNTER", "VERTICAL_ROTISSERIE", 
	"TOASTER", "COFFEE_MACHINE", "BEVERAGE_COOLER");

buyInteriorAccessoriesNotExist(interiorAccessory)

Buys one or more interior accessories if they haven't been bought for this establishment yet. These are:
TABLE for $500
CHAIR for $100
COUNTER for $2500
VERTICAL_ROTISSERIE for $1500
TOASTER for $700
OVEN for $5000
COFFEE_MACHINE for $2000
BEVERAGE_COOLER for $1500
FRIDGE for $3500
You can buy more than one item of any kind with this method. Just pass it more than once. However the method will only buy an item (or many of a kind) if it wasn't there at all before the call.
Parameters:
Name Type Description
interiorAccessory Object A single item (string) or an array of items (string) you want to buy and add to the establishment
Source:
Establishment.js
Example
company.establishments.get(0).
	buyInteriorAccessoriesNotExist("COUNTER", "VERTICAL_ROTISSERIE", 
	"TOASTER", "COFFEE_MACHINE", "BEVERAGE_COOLER");

sendFood(foodUnit)

Sends a FoodUnit (you got in Campaigns foodDelivery method) to this establishment.
Parameters:
Name Type Description
foodUnit FoodUnit A foodUnit you want to deliver.
Source:
Establishment.js

vacate()

Vacates the property. Works only if you rented it. This method lays off all employees and sells all interior accessories as well.
Source:
Establishment.js

sell()

Sells the property. Works only if you own it. This method lays off all employees and sells all interior accessories as well.
Source:
Establishment.js

layOffAllEmployees()

Lays off all employees at this property.
Source:
Establishment.js

sellInteriorAccessories()

Sells all interior accessories in this property for 90% of the acquisition cost.
Source:
Establishment.js

getEmployees(jobProfile)

Returns a list employees. This list is a subset of all employee at this establishment.
Parameters:
Name Type Description
jobProfile String A job profile to filter for: CHEF, WAITER, MANAGER
Source:
Establishment.js
Returns:
a filtered set of employees matching your desired job profile
Type
List

getTotalFoodUnits(foodName)

Returns the total number of available food for this establishment.
Parameters:
Name Type Description
foodName String a food like BREAD or CHICKEN_MEAT
Source:
Establishment.js
Returns:
Sum of all FoodUnit
Type
Number