TEHE-Studios / ExpandedHelicopterEvents

Makes the helicopter event an interactive experience
GNU Affero General Public License v3.0
21 stars 21 forks source link

Should the mod even fire when Sandbox Option `Helicopter` set to never? #340

Closed youkwhd closed 1 week ago

youkwhd commented 3 weeks ago

Is your feature request related to a problem? Please describe.

When a player is setting the option Helicopter to never; in-game from the Sandbox Sadistic AI Director options, should this mod even function? I've had one game session and a helicopter icon popped out, and I was confused because the Helicopter option was disabled.

Describe the solution you'd like

From the file shared/ExpandedHelicopter09b_SandboxOverride.lua: abort/return from the function if SandboxVars.Helicopter is already disabled beforehand, set a global boolean like: EHE_DISABLED = true or, prefably EHE_ENABLED = false.

From the entry file (idk which) server/ExpandedHelicopter06_EventScheduler.lua, line 335:

-- I suppose this is the entry call that would start the events
--
-- Stop the eHeli events to occur if disabled
if not isClient() and EHE_ENABLED then
    Events.OnTick.Add(eHeliEvent_OnHour)
end

Describe alternatives you've considered

Additional context

I know that this problem can be easily solved by just disabling the mod (from Mods selection), but re-enabling, and re-disabling when you have tons of mod installed is a kinda tedious to do.



Also, if this would get implemented, could I be assigned to do the work? Thanks :)

Chuckleberry-Finn commented 2 weeks ago

I'm not sure I follow. You want the vanilla event to still occur or you want a way to disable the Expanded Heli Events? If the latter, if someone installs the mod why wouldn't it be enabling events to occur?

The FAQ states that the vanilla sandbox option is automatically set to false regardless and is not related to this mod.

youkwhd commented 2 weeks ago

I'm not sure I follow. You want the vanilla event to still occur or you want a way to disable the Expanded Heli Events? If the latter, if someone installs the mod why wouldn't it be enabling events to occur?

The FAQ states that the vanilla sandbox option is automatically set to false regardless and is not related to this mod.

To clarify my thoughts:

screenshot

Basically, we're using this sandbox option to control the Expanded Heli Events behavior, cause my first thought was, this mod is an 'Expansion', not a replacement for the vanilla events. Thus why, the mod should follow the vanilla config/option.

So, what we achieve here is: we can 'support' the vanilla event options. If it's set to never, then don't fire any. if it's once, then just fire once, etc..

Why even support the vanilla options? because maybe later on the future, when other PZ Builds (42, and beyond) has a new heli option/behavior, we could implement so.

Chuckleberry-Finn commented 2 weeks ago

If I could safely hide that sandbox option I would. That being said, there is a section for the mod.