Package/weather system#53
Draft
Raild3x wants to merge 4 commits into
Draft
Conversation
Introduce a complete weather management package: server and client implementations, networking primitive, shared types/utilities, and package manifest. WeatherServer manages registration, start/stop, timed expiration, weighted weather cycling, and bootstraps a client-side loader. WeatherClient syncs active weather via RemoteProperty, auto-registers server-provided weather modules, and applies prioritized visual effects (Atmosphere/Clouds/Lighting) using Fusion and Janitor for lifecycle management. RemoteProperty provides a simple replicated property API (server-set / client-observe) backed by RemoteEvent. Also add WeatherUtil (signals and type validation), an init entrypoint, and wally.toml metadata with dependencies.
Refactors client/server networking to support per-player weather overrides and introduces a Fusion-driven visual effects system. Key changes: - Client: switch requires to use Packages path; add Fusion-based setup for Sky, Atmosphere, Bloom, Blur, ColorCorrection, DepthOfField, SunRays, Clouds and Lighting with baseline tracking, priority-based blending, and dynamic hydration. Automatically creates missing Roblox instances for categories when a weather effect activates and listens for ChildAdded to handle late-created instances. - Networking: enhance RemoteProperty typing, add RemoteProperty:SetFor to send values to a single client, and allow server-side requestHandler to return per-player values. - Server: add PlayerWeatherEffects to support per-player weather with optional Duration (number or NumberRange) and Players list in StartWeather; ActiveWeatherProperty now returns effective per-player weather on request. Expiration loop now handles per-player expirations; StopWeather can target specific players or sweep per-player overrides when stopping a global effect. Added helper APIs: GetActiveWeatherForPlayer, IsWeatherActiveForPlayer, StopAllWeatherForPlayer, and cleanup on PlayerRemoving. These changes enable smoother client visuals via Fusion and flexible server control for global or per-player weather effects.
Introduce per-player overrides and lifecycle management for RemoteProperty: add _playerValues and _playerRemovingConn, import Players, and store per-player values in SetFor. Remove the requestHandler parameter from RemoteProperty.new and respond to client requests using GetFor. Add GetFor, ClearFor, and Destroy methods and automatically clear per-player entries on PlayerRemoving to avoid memory leaks. Update WeatherServer to use ActiveWeatherProperty:GetFor, initialize per-player entries on PlayerAdded, simplify IsWeatherActiveForPlayer, and fix PlayerRemoving cleanup so player state is fully cleared.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new modular weather system for Roblox, focusing on client-server synchronization, extensibility, and utility. The main changes include the addition of core networking infrastructure, shared utilities and types, a client bootstrapper, and the package manifest for dependency management.
Core Networking and Synchronization:
RemotePropertyinRemoteProperty.luau, a replicated property system for synchronizing weather-related state between server and clients, supporting observers, promises, and per-player updates.Shared Utilities and Types:
WeatherUtil.luauwith type definitions (e.g.,WeatherData), validation functions, signals for weather events, and helpers for loading lighting data, providing a foundation for extensible weather effects.Client and Server Initialization:
init.luauas the main entry point, conditionally loading server or client modules and exposing shared utilities, enabling seamless integration in different runtime contexts.ClientWeatherBootstrapper.client.luauto initialize the weather system on the client by requiring the weather client module via an object reference, ensuring robust client-side setup.Dependency Management:
wally.tomlmanifest, specifying package metadata and dependencies (such asJanitor,Signal,Promise, and others), facilitating package management and reproducibility.