mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 09:42:21 +00:00
fix(picking): settle which layers act on a click when it resolves
The flights and military layers treat the aircraft they already track as a passive pick, but they start tracking during the click itself. A card handler running later in the same click then saw the plane as passive and acted too: a quake card opened its source while the plane started tracking, and fire, CCTV and vessel cards could do the same. The pick registry now records the acting owners of a click's exact hit and touch contact when the dispatcher first resolves them, and the quake, FIRMS, CCTV, vessel and Context checks read that record for the rest of the click. Calls without a click keep the live lookup.
This commit is contained in:
1 parent
830c980ca6
commit
54fd3d3bed
13 files changed
+239
-48
No files matched your search
@@ -437,7 +437,7 @@ export function createLifecycle({
|
||||
typeof pickedId === 'string' &&
|
||||
Boolean(isActedOnByOtherLayer) &&
|
||||
isOwnedByOtherLayer?.('cctv', pickedId) &&
|
||||
!isActedOnByOtherLayer('cctv', pickedId);
|
||||
!isActedOnByOtherLayer('cctv', pickedId, { click: event });
|
||||
if (pickedId !== null && !cardBackground && !passiveUnderCard) return;
|
||||
// A coarse tap's touch contact (not the exact pick) that its layer
|
||||
// acts on (an aircraft, a vessel, a radio station) is that layer's
|
||||
@@ -447,7 +447,10 @@ export function createLifecycle({
|
||||
cardId &&
|
||||
contactId &&
|
||||
contactId !== pickedId &&
|
||||
isActedOnByOtherLayer?.('cctv', contactId, { expanded: true })
|
||||
isActedOnByOtherLayer?.('cctv', contactId, {
|
||||
expanded: true,
|
||||
click: event,
|
||||
})
|
||||
)
|
||||
return;
|
||||
if (cardHit && cardHit.sourceId !== CCTV_OVERLAY_SOURCE_ID) return;
|
||||
|
||||
Reference in new issue
Block a user