mirror of
https://github.com/cliffe/BreakEscape.git
synced 2026-02-20 13:50:46 +00:00
feat: Update NPC and avatar configurations for phone interactions and enhance avatar sizes in chat UI
This commit is contained in:
@@ -166,8 +166,8 @@
|
||||
}
|
||||
|
||||
.contact-avatar {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
border: 2px solid #000;
|
||||
display: flex;
|
||||
@@ -178,6 +178,13 @@
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
|
||||
.contact-avatar img {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
object-fit: cover;
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
|
||||
.contact-details {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
@@ -277,8 +284,8 @@
|
||||
|
||||
.conversation-avatar,
|
||||
.conversation-avatar-placeholder {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
border: 2px solid #000;
|
||||
image-rendering: pixelated;
|
||||
flex-shrink: 0;
|
||||
|
||||
@@ -65,16 +65,21 @@ export default class NPCManager {
|
||||
}
|
||||
if (!realId) throw new Error('registerNPC requires an id');
|
||||
|
||||
// Build entry with defaults, but only set phoneId for phone NPCs
|
||||
const entry = Object.assign({
|
||||
id: realId,
|
||||
displayName: realId,
|
||||
metadata: {},
|
||||
eventMappings: {},
|
||||
phoneId: 'player_phone', // Default to player's phone
|
||||
npcType: 'phone', // Default to phone-based NPC
|
||||
itemsHeld: [] // Initialize empty inventory for NPC item giving
|
||||
}, realOpts);
|
||||
|
||||
// Only set default phoneId for phone NPCs (not person NPCs)
|
||||
if (entry.npcType === 'phone' && !entry.phoneId) {
|
||||
entry.phoneId = 'player_phone';
|
||||
}
|
||||
|
||||
this.npcs.set(realId, entry);
|
||||
|
||||
// Register in global character registry for speaker resolution
|
||||
@@ -260,9 +265,11 @@ export default class NPCManager {
|
||||
this.conversationHistory.set(npcId, []);
|
||||
}
|
||||
|
||||
// Get all NPCs for a specific phone
|
||||
// Get all NPCs for a specific phone (only returns phone-type NPCs)
|
||||
getNPCsByPhone(phoneId) {
|
||||
return Array.from(this.npcs.values()).filter(npc => npc.phoneId === phoneId);
|
||||
return Array.from(this.npcs.values()).filter(npc =>
|
||||
npc.npcType === 'phone' && npc.phoneId === phoneId
|
||||
);
|
||||
}
|
||||
|
||||
// Get total unread message count for a phone
|
||||
|
||||
@@ -322,7 +322,7 @@ password_hints = "Common passwords: Marketing123, Campaign2024, Viral_Dynamics_A
|
||||
"displayName": "Agent 0x99 'Haxolottle'",
|
||||
"npcType": "phone",
|
||||
"storyPath": "scenarios/m01_first_contact/ink/m01_phone_agent0x99.json",
|
||||
"avatar": "assets/npc/avatars/npc_helper.png",
|
||||
"avatar": "assets/characters/female_spy_headshot.png",
|
||||
"phoneId": "player_phone",
|
||||
"currentKnot": "first_call",
|
||||
"timedMessages": [
|
||||
@@ -360,7 +360,7 @@ password_hints = "Common passwords: Marketing123, Campaign2024, Viral_Dynamics_A
|
||||
"displayName": "Agent 0x99",
|
||||
"npcType": "phone",
|
||||
"storyPath": "scenarios/m01_first_contact/ink/m01_closing_debrief.json",
|
||||
"avatar": "assets/npc/avatars/npc_helper.png",
|
||||
"avatar": "assets/characters/female_spy_headshot.png",
|
||||
"phoneId": "player_phone",
|
||||
"currentKnot": "start",
|
||||
"eventMappings": [
|
||||
|
||||
Reference in New Issue
Block a user