Capture current mission, AI, map and administration development
Include the current addon, terrain integrations, tools, regression tests and recorded development evidence.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
// Private startup experiment, backend disabled and isolated from production.
|
||||
modded class ArmaReforgerScripted
|
||||
{
|
||||
override protected void OnMissionSet(MissionHeader mission)
|
||||
{
|
||||
if (mission && mission.GetHeaderResourceName() == "{469880DFE1B48F95}Missions/Nogova_TerrainTest.conf")
|
||||
{
|
||||
Resource clone = BaseContainerTools.CreateContainerFromInstance(mission);
|
||||
BaseContainer container;
|
||||
if (clone && clone.IsValid()) container = clone.GetResource().ToBaseContainer();
|
||||
PrintFormat("ERR REGISTRATION PROBE: beforeWorld=%1 container=%2", mission.GetWorldResourceName(), container != null);
|
||||
if (container)
|
||||
{
|
||||
ResourceName before;
|
||||
bool readable = container.Get("World", before);
|
||||
container.Set("World", "{B6C516F86302C679}Worlds/ERR_Everon.ent");
|
||||
ResourceName after; container.Get("World", after);
|
||||
BaseContainerTools.WriteToInstance(mission, container);
|
||||
PrintFormat("ERR REGISTRATION PROBE: readableWorld=%1 old=%2 containerWorld=%3 instanceWorld=%4", readable, before, after, mission.GetWorldResourceName());
|
||||
}
|
||||
}
|
||||
super.OnMissionSet(mission);
|
||||
}
|
||||
override bool OnGameStart()
|
||||
{
|
||||
PrintFormat("ERR REGISTRATION PROBE COMPLETE: loadedWorld=%1 headerWorld=%2", GetWorldFile(), GetMissionHeader().GetWorldResourceName());
|
||||
return super.OnGameStart();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user