コード例 #1
0
 public override JSONNode GetJSON()
 {
     return(base.GetJSON()
            .SetAs("position", (JSONNode)position)
            .SetAs("type", ItemTypes.IndexLookup.GetName(blockType))
            .SetAs("inventory", blockInventory.GetJSON())
            .SetAs("storedFuel", storedFuel));
 }
コード例 #2
0
        public override JSONNode GetJSON()
        {
            JSONNode jsonTodos = new JSONNode(NodeType.Array);

            foreach (BlueprintTodoBlock block in Todoblocks)
            {
                jsonTodos.AddToArray(block.GetJSON());
            }
            return(base.GetJSON()
                   .SetAs("inventory", BlockInventory.GetJSON())
                   .SetAs("shouldTakeItems", ShouldTakeItems)
                   .SetAs("fullname", Fullname)
                   .SetAs("todoblocks", jsonTodos));
        }
コード例 #3
0
 public override JSONNode GetJSON()
 {
     return(base.GetJSON()
            .SetAs("inventory", blockInventory.GetJSON()));
 }