public Entry(NbtCompound tag) { this.cell = Main.instance.tileRegistry.getElement(tag.getInt("cellId")); this.position = new Position(tag.getVector3Int("offset")); this.addFogOnComplete = tag.getBool("addFog"); }
public override void readFromNbt(NbtCompound tag) { base.readFromNbt(tag); this.heldResources = tag.getInt("builderResources"); }
public Trainee(NbtCompound tag) { this.info = new WorkerInfo(tag.getCompound("info")); this.type = Main.instance.workerTypeRegistry.getElement(tag.getInt("type")); }
public override void readFromNbt(NbtCompound tag) { base.readFromNbt(tag); this.health = tag.getInt("health"); }
public void readFromNbt(NbtCompound tag) { this.plateState = (EnumPlateState)tag.getInt("plateState"); }
public override void readFromNbt(NbtCompound tag) { base.readFromNbt(tag); this.team = Team.getTeamFromId(tag.getInt("teamId")); }
public override void readFromNbt(NbtCompound tag) { base.readFromNbt(tag); this.lastPos = tag.getVector3("lastPos"); this.unitStats = new UnitStats(tag, this.unitData); bool flag = tag.getBool("hasMovementOverride"); if (flag) { this.overrideMovementDestination = tag.getVector3("overrideMovementDestination"); this.overrideMovementStopDis = tag.getFloat("overrideMovementStopDis"); this.moveHelper.setDestination((Vector3)this.overrideMovementDestination, this.overrideMovementStopDis); } NbtCompound tagTask = tag.getCompound("task"); ITask task = (ITask)Activator.CreateInstance(TaskManager.getTaskFromId(tagTask.getInt("taskID")), new object[] { (UnitBase)this }); task.readFromNbt(tagTask); this.setTask(task, true); }
public override void readFromNbt(NbtCompound tag) { this.value = tag.getInt(this.saveName); }
public void readFromNbt(NbtCompound tag) { this.heldItem = Main.instance.itemRegistry.getElement(tag.getInt("heldItemId", -1)); // -1 results in null being returned }
public Candidate(NbtCompound tag) { this.info = new WorkerInfo(tag.getCompound("info")); this.type = Main.instance.workerTypeRegistry.getElement(tag.getInt("type")); this.endAvailabilityTime = tag.getDouble("endAvailabilityTime"); }
public override void readFromNbt(NbtCompound tag) { base.readFromNbt(tag); this.teamID = tag.getInt("teamId"); // TODO Should the setter be called here? }
/// <summary> /// Creates a new map data from NBT. /// </summary> public MapData(NbtCompound tag) { this.saveName = tag.getString("mapName"); this.seed = tag.getInt("seed"); }
public void readFromNbt(NbtCompound tag) { this._time = tag.getDouble("time"); this.multiplyerIndex = Mathf.Clamp(tag.getInt("multiplyerIndex"), 0, this._timeMultipliers.Length - 1); }