// Token: 0x060004EF RID: 1263 RVA: 0x0001AC5C File Offset: 0x00018E5C private void PlaceItem() { if (!this.PlaceholderIsClear() && !GameData.cheats.ignoreBuildCollisionCheck) { return; } this.placedItem = this.buildItemCatalog.SpawnItem(this.selectedBuildItemVariant.id, this.buildPlacement.position, this.buildPlacement.rotation); if (this.placedItem != null) { WorldData.AddItemToLog(this.placedItem.transform, this.selectedBuildItemVariant.id); } if (this.OnPlace != null) { this.OnPlace(); } }
// Token: 0x06000507 RID: 1287 RVA: 0x0001AFE0 File Offset: 0x000191E0 public void LoadWorld(string fileLocation) { WorldData.Data data = FileManager.Load <WorldData.Data>(fileLocation); if (data == null) { return; } this.data.worldName = data.worldName; this.data.player = data.player; this.data.settings = data.settings; for (int i = 0; i < data.items.Count; i++) { WorldData.AddItemToLog(WorldData.instance.buildItemCatalog.SpawnItem(data.items[i].itemVariantID, data.items[i].position, Quaternion.Euler(data.items[i].eularRotation)).transform, data.items[i].itemVariantID); } this.autoSave = true; WorldData.loadWorldOnStart = false; if (this.gravityDropdown != null) { this.gravityDropdown.value = this.data.settings.gravityStrength; this.ApplyAndSaveGravityStrength(this.gravityDropdown); } }