feat: Füge Debug-Overlay und Alters-/Geschlechtsanpassungen für 3D-Charaktere hinzu
All checks were successful
Deploy to production / deploy (push) Successful in 1m55s

This commit is contained in:
Torsten Schulz (local)
2026-05-21 09:55:11 +02:00
parent 3df7abe628
commit ad0ccd0281
11 changed files with 364 additions and 24 deletions

View File

@@ -4601,16 +4601,26 @@ class FalukantService extends BaseService {
if (!marriedType) {
throw new Error('Relationship type "married" not found');
}
await Relationship.create({
const newRel = await Relationship.create({
character1Id: proposal.requesterCharacterId,
character2Id: proposal.proposedCharacterId,
relationshipTypeId: marriedType.id,
});
await MarriageProposal.destroy({
where: { requesterCharacterId: character.id },
})
;
return { success: true, message: 'Marriage proposal accepted' };
await MarriageProposal.destroy({ where: { requesterCharacterId: character.id } });
// Ensure both households are marked as unburdened upon marriage creation
try {
const otherChar = await FalukantCharacter.findByPk(proposal.proposedCharacterId, { attributes: ['userId'] });
const otherFUserId = otherChar ? otherChar.userId : null;
const affectedUserIds = [user.id];
if (otherFUserId) affectedUserIds.push(otherFUserId);
await UserHouse.update({ householdTensionScore: 0, householdTensionReasonsJson: [] }, { where: { userId: affectedUserIds } });
} catch (err) {
console.error('Failed to reset household tension on marriage:', err);
}
return { success: true, message: 'Marriage proposal accepted', relationshipId: newRel.id };
}
async cancelWooing(hashedUserId) {