public override void ToTreeAttributes(ITreeAttribute tree) { base.ToTreeAttributes(tree); tree.SetBool("squeezezd", squeezed); tree.SetInt("state", (int)state); }
public override void ToTreeAttributes(ITreeAttribute tree) { base.ToTreeAttributes(tree); tree.SetBytes("voxels", serializeVoxels()); tree.SetInt("selectedRecipeNumber", selectedRecipeNumber); tree.SetItemstack("baseMaterial", BaseMaterial); }
public override void ToTreeAttributes(ITreeAttribute tree) { base.ToTreeAttributes(tree); tree.SetFloat("remainingSeconds", remainingSeconds); tree.SetInt("lit", lit ? 1 : 0); tree.SetString("ignitedByPlayerUid", ignitedByPlayerUid); }
public override void ToTreeAttributes(ITreeAttribute tree) { base.ToTreeAttributes(tree); tree.SetInt("color", color); tree.SetString("text", text); }
public override void ToTreeAttributes(ITreeAttribute tree) { base.ToTreeAttributes(tree); tree.SetBool("canTele", canTeleport); tree.SetInt("repairState", repairState); tree.SetBool("findNextChunk", findNextChunk); tree.SetBool("activated", activated); if (tpLocation != null) { tree.SetInt("teleX", tpLocation.X); tree.SetInt("teleY", tpLocation.Y); tree.SetInt("teleZ", tpLocation.Z); } }
public override void ToTreeAttributes(ITreeAttribute tree) { base.ToTreeAttributes(tree); tree.SetItemstack("contents", contents); tree.SetInt("units", units); }
public override void ToTreeAttributes(ITreeAttribute tree) { base.ToTreeAttributes(tree); tree.SetItemstack("contents", metalContent); tree.SetInt("fillLevel", fillLevel); }
public override void ToTreeAttributes(ITreeAttribute tree) { base.ToTreeAttributes(tree); ITreeAttribute invtree = new TreeAttribute(); Inventory.ToTreeAttributes(invtree); tree["inventory"] = invtree; tree.SetFloat("inputGrindTime", inputGrindTime); tree.SetInt("nowOutputFace", nowOutputFace); List <int> vals = new List <int>(); foreach (var val in playersGrinding) { IPlayer plr = Api.World.PlayerByUid(val.Key); if (plr == null) { continue; } vals.Add(plr.ClientId); } tree["clientIdsGrinding"] = new IntArrayAttribute(vals.ToArray()); }
public override void ToTreeAttributes(ITreeAttribute tree) { base.ToTreeAttributes(tree); tree.SetInt("quantityServings", QuantityServings); tree.SetString("recipeCode", RecipeCode == null ? "" : RecipeCode); }
public override void ToTreeAttributes(ITreeAttribute tree) { base.ToTreeAttributes(tree); tree.SetFloat("remainingBurnDuration", remainingBurnDuration); tree.SetFloat("startDuration", startDuration); tree.SetInt("fromFacing", fromFacing.Index); }
public override void ToTreeAttributes(ITreeAttribute tree) { base.ToTreeAttributes(tree); tree.SetLong("networkid", NetworkId); tree.SetInt("turnDirFromFacing", turnDirFromFacing.Index); }
public override void ToTreeAttributes(ITreeAttribute tree) { base.ToTreeAttributes(tree); tree.SetBool(BlockCompass.ATTR_BOOL_CRAFTED, this.IsCrafted); tree.SetString(BlockCompass.ATTR_STR_CRAFTED_BY_PLAYER_UID, this.CraftedByPlayerUID); if (this.TargetPos != null) { tree.SetInt(BlockCompass.ATTR_INT_TARGET_POS_X, this.TargetPos.X); tree.SetInt(BlockCompass.ATTR_INT_TARGET_POS_Y, this.TargetPos.Y); tree.SetInt(BlockCompass.ATTR_INT_TARGET_POS_Z, this.TargetPos.Z); } if (this.AngleRad != null) { tree.SetFloat("AngleRad", (float)this.AngleRad); } }
public override void ToTreeAttributes(ITreeAttribute tree) { base.ToTreeAttributes(tree); tree.SetInt("blockid", block.BlockId); tree.SetBytes("voxels", serializeVoxels()); }
public override void ToTreeAttributes(ITreeAttribute tree) { base.ToTreeAttributes(tree); tree.SetInt("capacitor", Capacitor); tree.SetBool("isOn", isOn); }
public override void ToTreeAttributes(ITreeAttribute tree) { base.ToTreeAttributes(tree); tree.SetInt("color", color); tree.SetString("text", text); tree.SetFloat("meshAngle", MeshAngleRad); }
public override void ToTreeAttributes(ITreeAttribute tree) { base.ToTreeAttributes(tree); tree.SetInt("currentBuildStage", currentBuildStage); tree.SetBool("lit", Lit); tree.SetDouble("burnUntil", BurningUntilTotalHours); }
public override void ToTreeAttributes(ITreeAttribute tree) { base.ToTreeAttributes(tree); tree.SetItemstack("contents", contents); tree.SetFloat("fuelLevel", fuelLevel); tree.SetInt("burning", burning ? 1 : 0); }
public override void ToTreeAttributes(ITreeAttribute tree) { base.ToTreeAttributes(tree); tree.SetLong("networkid", NetworkId); tree.SetInt("turnDirFromFacing", propagationDir.Index); tree.SetFloat("g", gearedRatio); }
public override void ToTreeAttributes(ITreeAttribute tree) { base.ToTreeAttributes(tree); tree.SetInt("firepitConstructionStage", firepitStage); tree.SetDouble("lastTickTotalHours", lastTickTotalHours); tree.SetFloat("fuelHours", fuelHours); }
public override void ToTreeAttributes(ITreeAttribute tree) { base.ToTreeAttributes(tree); tree.SetDouble("totalHoursTillGrowth", totalHoursTillGrowth); tree.SetInt("growthStage", (int)stage); tree.SetBool("plantedFromSeed", plantedFromSeed); }
public override void ToTreeAttributes(ITreeAttribute tree) { base.ToTreeAttributes(tree); if (ownBlock != null) { tree.SetInt("forBlockId", ownBlock.BlockId); } }
public override void ToTreeAttributes(ITreeAttribute tree) { base.ToTreeAttributes(tree); tree.SetDouble("transitionHoursLeft", transitionHoursLeft); tree.SetDouble("lastCheckAtTotalDays", lastCheckAtTotalDays); tree.SetInt("roomness", roomness); }
public override void ToTreeAttributes(ITreeAttribute tree) { base.ToTreeAttributes(tree); bloomeryInv.ToTreeAttributes(tree); tree.SetInt("burning", burning ? 1 : 0); tree.SetDouble("burningUntilTotalDays", burningUntilTotalDays); tree.SetDouble("burningStartTotalDays", burningStartTotalDays); }
public override void ToTreeAttributes(ITreeAttribute tree) { base.ToTreeAttributes(tree); tree.SetInt("color", color); for (int i = 0; i < 8; i++) { tree.SetString("text" + i, textByCardinalDirection[i]); } }
public void WriteToTreeAttribute(ITreeAttribute tree) { tree.SetLong("networkId", networkId); tree.SetFloat("totalAvailableTorque", totalAvailableTorque); tree.SetFloat("totalResistance", networkResistance); tree.SetFloat("speed", speed); tree.SetFloat("angle", angle); tree.SetInt("rot", (int)TurnDir); }
private void PlaceFarmland(ItemSlot slot, EntityAgent byEntity, BlockSelection blockSel, ITreeAttribute treeAttributes) { int id = slot.Itemstack.Attributes.GetInt("farmId"); BlockPos pos = blockSel.Position.AddCopy(blockSel.Face); byEntity.World.BlockAccessor.SetBlock(id, pos); BlockEntity blockEntity = byEntity.World.BlockAccessor.GetBlockEntity(pos); if (blockEntity is BlockEntityFarmland) { treeAttributes.SetInt("posx", pos.X); treeAttributes.SetInt("posy", pos.Y); treeAttributes.SetInt("posz", pos.Z); blockEntity.FromTreeAttributes(treeAttributes, byEntity.World); blockEntity.MarkDirty(); } slot.Itemstack.Attributes.RemoveAttribute("farmland"); slot.Itemstack.Attributes.RemoveAttribute("farmId"); }
public override void ToTreeAttributes(ITreeAttribute tree) { tree.SetInt("ExchangesCount", Exchanges.Count); for (int i = 0; i < Exchanges.Count; i++) { string strI = "Exchanges" + i + "Input", strO = "Exchanges" + i + "Output"; tree.SetItemstack(strI, Exchanges[i].Input); tree.SetItemstack(strO, Exchanges[i].Output); } base.ToTreeAttributes(tree); }
public static void Prefix(BlockEntityChisel __instance, ref ITreeAttribute tree) { ChiselPlusPropertyAccessor accessor = new ChiselPlusPropertyAccessor(__instance.Api); var store = accessor.Properties[__instance.Pos]; tree.SetInt("chiselplusmesh", (int)store.Mesh); tree.SetFloat("chiselplusRotX", store.Rotation.X); tree.SetFloat("chiselplusRotY", store.Rotation.Y); tree.SetFloat("chiselplusRotZ", store.Rotation.Z); }
public override void ToTreeAttributes(ITreeAttribute tree) { base.ToTreeAttributes(tree); tree.SetDouble("finishedAfterTotalHours", finishedAfterTotalHours); tree.SetInt("state", state); if (startedByPlayerUid != null) { tree.SetString("startedByPlayerUid", startedByPlayerUid); } }
public override void ToTreeAttributes(ITreeAttribute tree) { base.ToTreeAttributes(tree); tree.SetBool("receivesHeat", receivesHeat); tree.SetDouble("totalHoursLastUpdate", totalHoursLastUpdate); tree.SetDouble("progress", progress); tree.SetBool("processComplete", processComplete); tree.SetBool("structureComplete", structureComplete); tree.SetInt("tempStoneCoffin", tempStoneCoffin); }