New event: Approaching unknown shuttle (#24490)

* setup codebase

* Add first shuttle

* tak

* sync striker

* sync 2

* pipipi

* Preloaded roundstart shuttles!

* Make it abstract "PreloaderGrid" not "PreloaderShuttle"

* to do

* added china cuisin shuttle

* fixes

* add disaster evacpod

* remove enemy

* final shuttles

* weight 5 -> 10

* move data to component

* remove autotrailer touching

* doc, respath

* fix frozen positioning

* fixes + cvar

* finally

* fix evacpod

* remove blacklistrules

* remove `UnknownShuttleSpawnRule`, refactor `LoadMapRule` to support preloaded grids

* use tryload

* cleanup

* fixes

* use preloadedgrid for loneops

* weight unknown shuttles differently (preliminal)

* leftover

* cleanup and raffling

* partial review

* singleton gridpreloader no station coupling

* fix grid atmoses

* `roleLoadout` support for `LoadoutComponent`, fix missing gear

* weighting changes

* init logic fix

---------

Co-authored-by: Kara <lunarautomaton6@gmail.com>
This commit is contained in:
Ed
2024-05-10 14:35:59 +03:00
committed by GitHub
parent d061aa437e
commit e522bbf90d
30 changed files with 8252 additions and 47 deletions

View File

@@ -200,27 +200,7 @@ public sealed class StationSpawningSystem : SharedStationSpawningSystem
loadout.SetDefault(_prototypeManager);
}
// Order loadout selections by the order they appear on the prototype.
foreach (var group in loadout.SelectedLoadouts.OrderBy(x => roleProto.Groups.FindIndex(e => e == x.Key)))
{
foreach (var items in group.Value)
{
if (!_prototypeManager.TryIndex(items.Prototype, out var loadoutProto))
{
Log.Error($"Unable to find loadout prototype for {items.Prototype}");
continue;
}
if (!_prototypeManager.TryIndex(loadoutProto.Equipment, out var startingGear))
{
Log.Error($"Unable to find starting gear {loadoutProto.Equipment} for loadout {loadoutProto}");
continue;
}
// Handle any extra data here.
EquipStartingGear(entity.Value, startingGear, raiseEvent: false);
}
}
EquipRoleLoadout(entity.Value, loadout, roleProto);
}
var gearEquippedEv = new StartingGearEquippedEvent(entity.Value);