Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/data/lots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const mapRentDetails = (lot: Lot): RentDetailsDTO => {
rent: inGame?.rent ?? null,
deposit: inGame?.deposit ?? null,
furniture: inGame?.furniture ?? null,
period: inGame?.period ?? null,
period: inGame?.period ?? 'week',
price_history: {
in_game: { furniture: inGame?.furniture ?? null },
pre_game: { furniture: preGame?.furniture ?? null },
Expand Down Expand Up @@ -112,6 +112,7 @@ const mapLot = (lot: Lot, neighborhood: LotDTO['neighborhood'], world: LotDTO['w
building_details: {
type: lot.buildingDetails?.type,
apartment_title: lot.buildingDetails?.apartmentTitle ?? null,
apartment_number: lot.buildingDetails?.apartmentNumber ?? null,
bedrooms: lot.buildingDetails?.bedrooms ?? null,
bathrooms: lot.buildingDetails?.bathrooms ?? null,
floors: lot.buildingDetails?.floors ?? null,
Expand Down Expand Up @@ -166,6 +167,7 @@ const mapToDTO = (lotsByWorld: LotDataByWorld) => {
const neighborhood = neighborhoodSummaryById[neighId];
const neighTitle = neighborhood?.title || neighId;
const neighColor = neighborhood?.color || 'default';
const neighDescription = neighborhood?.description || '';

const world = neighborhood?.world;
const worldId = world?.id || '';
Expand Down Expand Up @@ -197,6 +199,7 @@ const mapToDTO = (lotsByWorld: LotDataByWorld) => {
id: neighId,
title: neighTitle,
color: neighColor,
description: neighDescription,
};

// for each lot
Expand Down
1 change: 1 addition & 0 deletions src/data/neighborhoods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ const createNeighborhoodSummaryById = (list: NeighborhoodDTO[]) =>
id: n.id,
title: n.title,
color: n.color,
description: n.description,
world: {
id: n.world.id,
title: n.world.title,
Expand Down
35 changes: 28 additions & 7 deletions src/data/source/lotData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1404,6 +1404,7 @@ export const lotData: LotDataByWorld = {
availability: 'available',
buildingDetails: {
apartmentTitle: 'Culpepper Apartments',
apartmentNumber: '17',
type: 'apartment',
bedrooms: 1,
bathrooms: 1,
Expand Down Expand Up @@ -1438,6 +1439,7 @@ export const lotData: LotDataByWorld = {
availability: 'available',
buildingDetails: {
apartmentTitle: 'Culpepper Apartments',
apartmentNumber: '18',
type: 'apartment',
bedrooms: 1,
bathrooms: 1,
Expand Down Expand Up @@ -1471,6 +1473,7 @@ export const lotData: LotDataByWorld = {
availability: 'available',
buildingDetails: {
apartmentTitle: 'Culpepper Apartments',
apartmentNumber: '19',
type: 'apartment',
bedrooms: 2,
bathrooms: 1,
Expand Down Expand Up @@ -1502,6 +1505,7 @@ export const lotData: LotDataByWorld = {
owner: 'Rasoya',
buildingDetails: {
apartmentTitle: 'Culpepper Apartments',
apartmentNumber: '20',
type: 'apartment',
bedrooms: 2,
bathrooms: 2,
Expand Down Expand Up @@ -1533,6 +1537,7 @@ export const lotData: LotDataByWorld = {
owner: 'Bheeda',
buildingDetails: {
apartmentTitle: 'Jasmine Suites Apartments',
apartmentNumber: '2A',
type: 'apartment',
bedrooms: 1,
bathrooms: 1,
Expand Down Expand Up @@ -1566,6 +1571,7 @@ export const lotData: LotDataByWorld = {
availability: 'available',
buildingDetails: {
apartmentTitle: 'Jasmine Suites Apartments',
apartmentNumber: '2B',
type: 'apartment',
bedrooms: 2,
bathrooms: 1,
Expand Down Expand Up @@ -1652,6 +1658,7 @@ export const lotData: LotDataByWorld = {
owner: 'Benali',
buildingDetails: {
apartmentTitle: 'Medina Studios Apartments',
apartmentNumber: '910',
type: 'apartment',
bedrooms: 1,
bathrooms: 1,
Expand Down Expand Up @@ -1682,6 +1689,7 @@ export const lotData: LotDataByWorld = {
availability: 'available',
buildingDetails: {
apartmentTitle: 'Medina Studios Apartments',
apartmentNumber: '920',
type: 'apartment',
bedrooms: 2,
bathrooms: 1,
Expand Down Expand Up @@ -1715,6 +1723,7 @@ export const lotData: LotDataByWorld = {
availability: 'available',
buildingDetails: {
apartmentTitle: 'Medina Studios Apartments',
apartmentNumber: '930',
type: 'apartment',
bedrooms: 3,
bathrooms: 1,
Expand Down Expand Up @@ -1747,6 +1756,7 @@ export const lotData: LotDataByWorld = {
owner: 'Jang',
buildingDetails: {
apartmentTitle: 'Hakim House Apartments',
apartmentNumber: '121',
type: 'apartment',
bedrooms: 2,
bathrooms: 1,
Expand Down Expand Up @@ -1776,6 +1786,7 @@ export const lotData: LotDataByWorld = {
availability: 'available',
buildingDetails: {
apartmentTitle: 'Hakim House Apartments',
apartmentNumber: '122',
type: 'apartment',
bedrooms: 3,
bathrooms: 2,
Expand All @@ -1802,8 +1813,9 @@ export const lotData: LotDataByWorld = {
type: 'residential',
availability: 'available',
buildingDetails: {
apartmentTitle: 'Hakim House Apartments',
type: 'apartment',
apartmentTitle: 'FountainView',
apartmentNumber: '',
type: 'penthouse',
bedrooms: 1,
bathrooms: 1,
floors: 1,
Expand All @@ -1830,7 +1842,6 @@ export const lotData: LotDataByWorld = {
availability: 'unavailable',
buildingDetails: {
type: 'arts center',

bathrooms: 2,
floors: 4,
},
Expand Down Expand Up @@ -1862,6 +1873,7 @@ export const lotData: LotDataByWorld = {
owner: 'Karaoke Legends',
buildingDetails: {
apartmentTitle: 'ZenView Apartments',
apartmentNumber: '701',
type: 'apartment',
bedrooms: 2,
bathrooms: 2,
Expand Down Expand Up @@ -1891,6 +1903,7 @@ export const lotData: LotDataByWorld = {
availability: 'available',
buildingDetails: {
apartmentTitle: 'ZenView Apartments',
apartmentNumber: '702',
type: 'apartment',
bedrooms: 2,
bathrooms: 2,
Expand Down Expand Up @@ -1925,6 +1938,7 @@ export const lotData: LotDataByWorld = {
availability: 'available',
buildingDetails: {
apartmentTitle: '21 Chic Street Apartments',
apartmentNumber: '1310',
type: 'apartment',
bedrooms: 2,
bathrooms: 1,
Expand Down Expand Up @@ -1956,6 +1970,7 @@ export const lotData: LotDataByWorld = {
owner: 'Pizzazz',
buildingDetails: {
apartmentTitle: '21 Chic Street Apartments',
apartmentNumber: '1312',
type: 'apartment',
bedrooms: 1,
bathrooms: 1,
Expand Down Expand Up @@ -1985,6 +2000,7 @@ export const lotData: LotDataByWorld = {
availability: 'available',
buildingDetails: {
apartmentTitle: '21 Chic Street Apartments',
apartmentNumber: '1313',
type: 'apartment',
bedrooms: 2,
bathrooms: 1,
Expand All @@ -2011,10 +2027,12 @@ export const lotData: LotDataByWorld = {
type: 'residential',
availability: 'available',
buildingDetails: {
type: 'apartment',
apartmentTitle: 'Torendi Tower',
apartmentNumber: '1',
type: 'penthouse',
bedrooms: 3,
bathrooms: 3,
floors: 1,
floors: 2,
},
imageURL:
'http://static.wikia.nocookie.net/sims/images/1/11/Torendi_Tower.jpg/revision/latest?cb=20161221005932',
Expand All @@ -2025,7 +2043,6 @@ export const lotData: LotDataByWorld = {
title: 'Planet Honey Popl',
description:
"Built in the center of the Fashion District, Planet Honey Pop! Karaoke Bar's sprightly melodies are in perfect harmony with the songs of the metro train below",

buyDetails: {
preGame: PRICE_NOT_AVAILABLE_IN_PREGAME,
inGame: 91464,
Expand All @@ -2038,7 +2055,6 @@ export const lotData: LotDataByWorld = {
availability: 'unavailable',
buildingDetails: {
type: 'karaoke bar',

bathrooms: 2,
floors: 1,
},
Expand Down Expand Up @@ -2069,6 +2085,7 @@ export const lotData: LotDataByWorld = {
availability: 'available',
buildingDetails: {
apartmentTitle: 'Alto Apartments',
apartmentNumber: '1010',
type: 'apartment',
bedrooms: 4,
bathrooms: 3,
Expand Down Expand Up @@ -2101,6 +2118,7 @@ export const lotData: LotDataByWorld = {
owner: 'Lobo',
buildingDetails: {
apartmentTitle: 'Alto Apartments',
apartmentNumber: '1020',
type: 'apartment',
bedrooms: 1,
bathrooms: 2,
Expand Down Expand Up @@ -2131,6 +2149,7 @@ export const lotData: LotDataByWorld = {
availability: 'available',
buildingDetails: {
apartmentTitle: 'Landgraab Apartments',
apartmentNumber: 'VIII',
type: 'apartment',
bedrooms: 2,
bathrooms: 2,
Expand Down Expand Up @@ -2163,6 +2182,7 @@ export const lotData: LotDataByWorld = {
owner: 'Feng',
buildingDetails: {
apartmentTitle: 'Landgraab Apartments',
apartmentNumber: 'IX',
type: 'apartment',
bedrooms: 1,
bathrooms: 2,
Expand Down Expand Up @@ -2193,6 +2213,7 @@ export const lotData: LotDataByWorld = {
availability: 'available',
buildingDetails: {
apartmentTitle: 'Spire Apartments',
apartmentNumber: '888',
type: 'apartment',
bedrooms: 2,
bathrooms: 3,
Expand Down
7 changes: 6 additions & 1 deletion src/types/lot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { ThemeColors } from './neighborhood.js';
// SPECIFIC INFO - residential x community x special
type LotCategory = 'residential' | 'community' | 'special';

type ResidentialBuildingType = 'empty' | 'house' | 'apartment';
type ResidentialBuildingType = 'empty' | 'house' | 'apartment' | 'penthouse';
type ResidentialAvailability = 'available' | 'occupied';
type ResidentialTransactionType = 'rent' | 'buy' | 'both';
type ResidentialOwner = string;
Expand Down Expand Up @@ -72,6 +72,7 @@ type ResidentialLot = BaseLot & {
buildingDetails: {
type: ResidentialBuildingType;
apartmentTitle?: string;
apartmentNumber?: string;
// TBD: only lots that are not empty have bedroom, bathrooms and floors
bedrooms?: number;
bathrooms?: number;
Expand All @@ -89,6 +90,7 @@ type CommunityLot = BaseLot & {
buildingDetails: {
type: CommunityBuildingType;
apartmentTitle?: never;
apartmentNumber?: never;
bedrooms?: never;
bathrooms?: number;
floors?: number;
Expand All @@ -105,6 +107,7 @@ type SpecialLot = BaseLot & {
buildingDetails: {
type: SpecialBuildingType;
apartmentTitle?: never;
apartmentNumber?: never;
bedrooms?: never;
bathrooms?: never;
floors?: never;
Expand All @@ -127,6 +130,7 @@ type NeighborhoodReference = {
id: string;
title: string;
color: ThemeColors;
description: string;
};

export type MainPriceDTO = number | null;
Expand Down Expand Up @@ -170,6 +174,7 @@ export type LotDTO = {
building_details: {
type: ResidentialBuildingType | CommunityBuildingType | SpecialBuildingType;
apartment_title: string | null;
apartment_number: string | null;
bedrooms: number | null;
bathrooms: number | null;
floors: number | null;
Expand Down
2 changes: 1 addition & 1 deletion src/types/neighborhood.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ export type NeighborhoodDTO = {
};
};

export type NeighborhoodSummaryDTO = Omit<NeighborhoodDTO, 'description'>;
export type NeighborhoodSummaryDTO = NeighborhoodDTO;
export type NeighborhoodSummaryById = Record<string, NeighborhoodSummaryDTO>;