forked from noxious/client
Merge branch 'main' of ssh://gitea.directonline.io:29417/sylvan-quest/client
This commit is contained in:
commit
b3d68ef562
@ -76,9 +76,12 @@ const initializeEffects = (scene: Phaser.Scene) => {
|
||||
// Effect updates
|
||||
const updateScene = () => {
|
||||
const timeBasedLight = calculateLightStrength(gameStore.world.date)
|
||||
const zoneEffects = zoneStore.zone?.zoneEffects as Array<{ effect: string, strength: number }>
|
||||
const zoneEffects = zoneStore.zone?.zoneEffects?.reduce((acc, curr) => ({
|
||||
...acc,
|
||||
[curr.effect]: curr.strength
|
||||
}), {}) as { [key: string]: number }
|
||||
|
||||
if (zoneEffects?.length) {
|
||||
if (zoneEffects && Object.keys(zoneEffects).length) {
|
||||
applyEffects(zoneEffects)
|
||||
} else {
|
||||
applyEffects({
|
||||
|
Loading…
x
Reference in New Issue
Block a user