forked from noxious/client
Removed weather effects booleans, now to disable weather effects, setting the value to 0 is the way
This commit is contained in:
parent
41005735f9
commit
a61e05592d
@ -242,15 +242,11 @@ export type Chat = {
|
|||||||
|
|
||||||
export type WorldSettings = {
|
export type WorldSettings = {
|
||||||
date: Date
|
date: Date
|
||||||
isRainEnabled: boolean
|
weatherState: WeatherState
|
||||||
isFogEnabled: boolean
|
|
||||||
fogDensity: number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type WeatherState = {
|
export type WeatherState = {
|
||||||
isRainEnabled: boolean
|
|
||||||
rainPercentage: number
|
rainPercentage: number
|
||||||
isFogEnabled: boolean
|
|
||||||
fogDensity: number
|
fogDensity: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,9 +35,7 @@ const effects = {
|
|||||||
|
|
||||||
// Weather state
|
// Weather state
|
||||||
const weatherState = ref<WeatherState>({
|
const weatherState = ref<WeatherState>({
|
||||||
isRainEnabled: false,
|
|
||||||
rainPercentage: 0,
|
rainPercentage: 0,
|
||||||
isFogEnabled: false,
|
|
||||||
fogDensity: 0
|
fogDensity: 0
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -123,8 +121,8 @@ const updateScene = () => {
|
|||||||
? mapEffects
|
? mapEffects
|
||||||
: {
|
: {
|
||||||
light: timeBasedLight,
|
light: timeBasedLight,
|
||||||
rain: weatherState.value.isRainEnabled ? weatherState.value.rainPercentage : 0,
|
rain: weatherState.value.rainPercentage,
|
||||||
fog: weatherState.value.isFogEnabled ? weatherState.value.fogDensity * 100 : 0
|
fog: weatherState.value.fogDensity * 100
|
||||||
}
|
}
|
||||||
applyEffects(finalEffects)
|
applyEffects(finalEffects)
|
||||||
}
|
}
|
||||||
|
@ -15,9 +15,10 @@ export const useGameStore = defineStore('game', {
|
|||||||
character: null as Character | null,
|
character: null as Character | null,
|
||||||
world: {
|
world: {
|
||||||
date: new Date(),
|
date: new Date(),
|
||||||
isRainEnabled: false,
|
weatherState: {
|
||||||
isFogEnabled: false,
|
rainPercentage: 0,
|
||||||
fogDensity: 0
|
fogDensity: 0
|
||||||
|
}
|
||||||
} as WorldSettings,
|
} as WorldSettings,
|
||||||
game: {
|
game: {
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
@ -119,9 +120,8 @@ export const useGameStore = defineStore('game', {
|
|||||||
this.uiSettings.isGmPanelOpen = false
|
this.uiSettings.isGmPanelOpen = false
|
||||||
|
|
||||||
this.world.date = new Date()
|
this.world.date = new Date()
|
||||||
this.world.isRainEnabled = false
|
this.world.weatherState.rainPercentage = 0
|
||||||
this.world.isFogEnabled = false
|
this.world.weatherState.fogDensity = 0
|
||||||
this.world.fogDensity = 0
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user