19 Commits

Author SHA1 Message Date
Dan Albert
15fa73a514 Add option to limit squadron sizes and begin full.
Adding temporarily as an option to make sure it's not a terrible idea,
but the old mode will probably go away.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1583.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2808.
2023-05-05 18:16:42 -07:00
Dan Albert
7f94b34277 Add an option to prefer primary tasked aircraft.
We're still using mostly the same aircraft selection as we have before
we added squadrons: the closest aircraft is the best choice.

This adds an option to obey the primary task set by the campaign
designer (can be overridden by players), even if the squadron is farther
away than one that is capable of it as a secondary task.

I don't expect this option to live very long. I'm making it optional for
now to give people a chance to test it, but it'll either replace the old
selection strategy or will be removed.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1892.
2023-05-04 23:08:11 -07:00
Dan Albert
cf47dd82d7 Remember player preferences for plugins. 2023-04-26 00:24:46 -07:00
Dan Albert
77f1706cbb Extract plugins from settings.
There isn't really any need for these two types to interact. The lua
plugin manager effectively fully owned its properties, it just delegated
all reads and writes to the settings object.

Instead, break the plugin settings out into the plugin manager and
preserve the manager in the Game. This will make it possible to expose
plugin options in the NGW without breaking the game on cancel.
2023-04-25 23:28:01 -07:00
Dan Albert
e2c6d6788c Persist some campaign creation options.
We should also persist mod options, but those will go in a separate file
because they aren't a part of Settings.

Plugins need some work before that can be saved here. They're not
configurable in the NGW currently, so that needs to be fixed first. It
also appears that it may not be safe to inject the settings object with
plugin options until the game is created, but that needs more
investigation (see the comment in Settings.save_player_settings).

Another obvious candidate would be the desired player mission duration,
but we need to implement custom serialization for that first.
2023-04-24 22:49:30 -07:00
Dan Albert
2585dcc130 Add (very!) rough simulation of frozen combat.
There are some TODOs here but th behavior is flagged off by default. The
biggest TODO here is that the time spent frozen is not simulated, so
flights that are engaged by SAMs will unfreeze, move slightly, then re-
freeze.

https://github.com/dcs-liberation/dcs_liberation/issues/1680
2022-02-26 13:01:46 -08:00
SnappyComebacks
3987f26689
Add performance option to not cull threatening IADS (#1953)
- Don't cull EWRs in detection range.
- Don't cull SAMs within threat range + small buffer.
2022-02-05 18:38:25 -07:00
leemarov
5d291846d5
Fix unculled zones not updating when needed.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1034.
2022-01-16 13:54:09 -08:00
RndName
2c21644a2c
Add Easy Communication Setting
allow to enforce the mission setting for easy communication
implements #1425
2021-12-12 01:20:17 +01:00
MetalStormGhost
d11d3b58f7
Add option to limit convoy travel distances.
CPU load seems to scale with route length, so add an option to limit
the length of the convoy route. The tradeoff is that the performance
sensitive route won't necessarily be a correct route.
2021-11-27 01:40:06 -08:00
Dan Albert
12f420f50e Pre-emptive Python 3.10 compat.
Iterator is no longer exposed directly in collections, but is in
collections.abc.
2021-11-20 18:49:14 -08:00
Dan Albert
748d80ff3b Re-flip fast-forward option.
This was set to default on by mistake (turned on for debugging and
forgot to turn off before check in). The option itself may be going away
soon in favor of explicit buttons, but keep the experimental feature off
by default for now.
2021-11-02 23:22:35 -07:00
Dan Albert
b2cbf4b6f4 Halt sim on A2A contact.
https://github.com/dcs-liberation/dcs_liberation/issues/1681
2021-10-30 10:18:49 -07:00
Dan Albert
5db1b94ac4 Add option to fast forward to first contact.
This is the first step in a larger project to add play/pause buttons to
the Liberation UI so the mission can be generated at any point.
docs/design/turnless.md describes the plan.

This adds an option to fast forward the turn to first contact before
generating the mission. None of that is reflected in the UI (for now),
but the miz will be generated with many flights in the air.

For now "first contact" means as soon as any flight reaches its IP. I'll
follow up to add threat checking so that air-to-air combat also triggers
this, as will entering a SAM's threat zone.

This also includes an option to halt fast-forward whenever a player
flight reaches a certain mission-prep phase. This can be used to avoid
fast forwarding past the player's startup time, taxi time, or takeoff
time. By default this option is disabled so player aircraft may start in
the air (possibly even at their IP if they're the first mission to reach
IP).

Fuel states do not currently account for distance traveled during fast
forward. That will come later.

https://github.com/dcs-liberation/dcs_liberation/issues/1681
2021-10-24 17:40:45 -07:00
Dan Albert
b0787d9a3f Build a proper type for StartType. 2021-10-22 11:42:13 -07:00
Dan Albert
6dae5b98d5 Fix carrier option not taking effect this turn.
This really shouldn't need to happen but I don't feel like rewriting the
culling code right now. There's no reason for these to be persisted to
the Game at all, we should be generating these once they're needed.
2021-10-21 20:05:07 -07:00
Dan Albert
626740366b Port the mission generator settings to auto.
Done now. Not porting the cheat menu because it contains non-settings
elements as well.
2021-10-21 19:54:58 -07:00
Dan Albert
a618f00662 Port the campaign management page to auto.
Also fixes the oversight in the previous commit where float options were
not saved when changed.
2021-10-21 19:16:47 -07:00
Dan Albert
7bec4c62f7 Generate settings pages automatically.
This adds metadata to settings fields that can be used to automatically
generate the settings window. For now I have replaced the Difficulty
page. Will follow up to replace the others.
2021-10-21 18:30:56 -07:00