Merge branch 'staging' of https://github.com/RecentRunner/cursor-hackathon into mason
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
export const DEFAULT_STARTING_COINS = 100;
|
||||
|
||||
/** Demo grant amount from Profile → Demo tools. */
|
||||
export const DEMO_COINS_GRANT = 100;
|
||||
|
||||
export const COINS_PER_TASK_COMPLETE = 50;
|
||||
export const COINS_PER_TASK_UNCHECK = -50;
|
||||
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
/** Percentage bounds for pet wander within the LCD viewport. */
|
||||
/** Ground band height as a fraction of the LCD — matches room PNG floor (~bottom 22%). */
|
||||
export const PET_GROUND_ZONE_HEIGHT_RATIO = 0.22;
|
||||
|
||||
/** Wander bounds inside the ground zone (not the full LCD). */
|
||||
export const PET_WANDER_BOUNDS = {
|
||||
/** Horizontal inset — keep pet off side walls */
|
||||
minX: 15,
|
||||
maxX: 85,
|
||||
/** Lower third of LCD — ground where hills/grass/floor render */
|
||||
minY: 66,
|
||||
maxY: 90,
|
||||
/** Vertical offset from floor, as % of ground zone height (0 = feet on floor) */
|
||||
minY: 0,
|
||||
maxY: 65,
|
||||
} as const;
|
||||
|
||||
export const PET_WANDER_START = {
|
||||
x: 50,
|
||||
y: 78,
|
||||
y: 12,
|
||||
} as const;
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
import type { AvatarCustomization } from "@/lib/avatar-customization-storage";
|
||||
import { parseVariantId, parseShopStyleItem, type ShopItemRecord } from "@/lib/shop-catalog";
|
||||
import type { HSL } from "@/lib/character/color-utils";
|
||||
import type { LayerColorState } from "@/lib/character/types";
|
||||
import {
|
||||
isShopLayerId,
|
||||
parseVariantId,
|
||||
parseShopStyleItem,
|
||||
type ShopItemRecord,
|
||||
} from "@/lib/shop-catalog";
|
||||
import {
|
||||
normalizeRoomBackgroundId,
|
||||
type RoomBackgroundId,
|
||||
@@ -17,6 +24,21 @@ export function getShopPreviewRoomId(
|
||||
return normalizeRoomBackgroundId(base.roomBackground);
|
||||
}
|
||||
|
||||
/** Tint colors for shop grid thumbnails — match the user's current layer colors. */
|
||||
export function getShopItemThumbnailColors(
|
||||
item: ShopItemRecord,
|
||||
colors: LayerColorState,
|
||||
): { color: HSL; skinColor?: HSL } {
|
||||
if (!isShopLayerId(item.type)) {
|
||||
return { color: colors.torso };
|
||||
}
|
||||
|
||||
return {
|
||||
color: colors[item.type],
|
||||
skinColor: item.type === "eyes" ? colors.skin : undefined,
|
||||
};
|
||||
}
|
||||
|
||||
/** Build a non-persisted avatar state showing how a shop item would look. */
|
||||
export function buildShopItemPreviewCustomization(
|
||||
base: AvatarCustomization,
|
||||
|
||||
Reference in New Issue
Block a user