KaukausInsurgency / ki-dcs

Kaukasus Insurgency
5 stars 2 forks source link

Save Static Objects #218

Open Igneous01 opened 6 years ago

Igneous01 commented 6 years ago

Currently only Cargo objects part of SLC/Depot are saved - other statics are not - need to add ability to also save static objects as well (and prevent saving cargo objects twice?)

thebgpikester commented 6 years ago

Statics could be required for these reasons: -Farp objects -Mission objectives placed at the start of the mission. -Spawned statics used for other reasons.

It's not high up on my list, despite using statics a lot, but I can see how this would be useful.

The use case we have is we spawn randomly for mission re-use. However, after restart we have to spawn randomly again since it's not saved. Net affect is that I can't do it once only, I have to respawn statics after each restart. It only really affects randomisation, thus its a low priority.

Igneous01 commented 6 years ago

Add code to filter out FARP pads from being saved/reloaded into mission as those could screw up the placements of aircraft. Everything else should be saved.

Igneous01 commented 6 years ago

Need to modify a new KI.Data container to hold side mission static objects that have been spawned in.

We don't want to spawn the same static object twice (since by design, Side Missions are regenerated 'from scratch' on mission restart) so because the side mission will be regenerated on mission restart, we need to filter out static objects that are part of an existing side mission and prevent it from respawning when we read the save file.