Exemplo n.º 1
0
        public void SaveTypes(ConstructionArea area, JSONNode node)
        {
            var itt = area.IterationType as ArchitectIterator;

            if (itt != null)
            {
                node.SetAs(NAME + ".ArchitectSchematicName", itt.SchematicName);
                node.SetAs(NAME + "PreviousPosition", (JSONNode)((ArchitectIterator)area.IterationType).PreviousPosition);
                SchematicReader.SaveSchematic(area.Owner, itt.BuilderSchematic);
            }
        }
Exemplo n.º 2
0
        private static void CleanupJob(IIterationType iterationType, IAreaJob areaJob, ConstructionJobInstance job, ArchitectIterator bpi, int prvX, int prvY, int prvZ)
        {
            if (_needsChunkLoaded.Contains(bpi))
            {
                _needsChunkLoaded.Remove(bpi);
            }

            if (bpi.PreviousPosition != Pipliz.Vector3Int.invalidPos &&
                prvX <= bpi.BuilderSchematic.XMax &&
                prvY <= bpi.BuilderSchematic.YMax &&
                prvZ <= bpi.BuilderSchematic.ZMax &&
                !bpi.BuilderSchematic.Blocks[prvX, prvY, prvZ].BlockID.Contains("bedend"))
            {
                ServerManager.TryChangeBlock(bpi.PreviousPosition, ItemId.GetItemId(bpi.BuilderSchematic.Blocks[prvX, prvY, prvZ].BlockID).Id, new BlockChangeRequestOrigin(job.Owner), ESetBlockFlags.DefaultAudio);
            }

            SchematicReader.SaveSchematic(areaJob.Owner, bpi.BuilderSchematic);
            AreaJobTracker.RemoveJob(areaJob);
        }