C# Class TEditXNA.Terraria.World

Inheritance: GalaSoft.MvvmLight.ObservableObject
Mostra file Open project: TEdit/Terraria-Map-Editor Class Usage Examples

Public Properties

Property Type Description
CaveBackX int[]
CompatibleVersion uint
Guid System.Guid
MaxMoons byte
Rand System.Random
SectionCount short
TileCount short
TileFrameImportant bool[]
Tiles ].Tile[
TreeBG int[]
TreeMntBG int[]
TreeX int[]
Version uint

Public Methods

Method Description
DeserializeTileData ( BinaryReader r, int &rle ) : Tile
FixChand ( int x, int y ) : void
FixNpcs ( ) : void
GetAnchor ( int x, int y ) : Vector2Int32
GetChestAtTile ( int x, int y ) : TEditXNA.Terraria.Chest
GetMannequin ( int x, int y ) : Vector2Int32
GetNpc ( int id ) : TEditXNA.Terraria.Objects.NpcName
GetRack ( int x, int y ) : Vector2Int32
GetSignAtTile ( int x, int y ) : TEditXNA.Terraria.Sign
GetTileEntityAtTile ( int x, int y ) : TileEntity
LoadChestData ( BinaryReader r ) : IEnumerable
LoadFooter ( BinaryReader r, World w ) : void
LoadHeaderFlags ( BinaryReader r, World w, int expectedPosition ) : void
LoadMobsData ( BinaryReader r, World w ) : void
LoadNPCsData ( BinaryReader r, World w ) : void
LoadPressurePlate ( BinaryReader r, World w ) : void
LoadSectionHeader ( BinaryReader r, bool &tileFrameImportant, int &sectionPointers, World w ) : bool
LoadSignData ( BinaryReader r ) : IEnumerable
LoadTileData ( BinaryReader r, int maxX, int maxY ) : ].Tile[
LoadTileEntities ( BinaryReader r, World w ) : void
LoadV2 ( BinaryReader b, string filename, World w ) : void
LoadWorld ( string filename ) : World
ReadBitArray ( BinaryReader reader ) : bool[]

Read an array of booleans from a bit-packed array.

ResetTime ( ) : void
Save ( World world, string filename, bool resetTime = false ) : void
SaveChests ( IList chests, BinaryWriter bw ) : int
SaveFooter ( World world, BinaryWriter bw ) : int
SaveHeaderFlags ( World world, BinaryWriter bw ) : int
SaveMobs ( IEnumerable mobs, BinaryWriter bw ) : int
SaveNPCs ( IEnumerable npcs, BinaryWriter bw ) : int
SavePressurePlate ( IList plates, BinaryWriter bw ) : int
SaveSectionHeader ( World world, BinaryWriter bw ) : int
SaveSigns ( IList signs, BinaryWriter bw ) : int
SaveTileEntities ( World w, BinaryWriter bw ) : int
SaveTiles ( Tile tiles, int maxX, int maxY, BinaryWriter bw ) : int
SerializeTileData ( Tile tile, int &dataIndex, int &headerIndex ) : byte[]

BitPack tile data and headers

UpdateSectionPointers ( int sectionPointers, BinaryWriter bw ) : int
ValSpecial ( int x, int y ) : void
ValidTileLocation ( Vector2Int32 v ) : bool
ValidTileLocation ( int x, int y ) : bool
Validate ( ) : void
World ( ) : System
World ( int height, int width, string title, int seed = -1 ) : System
WriteBitArray ( BinaryWriter writer, bool values ) : void

Write an array of booleans to a binary stream as a bit-packed array.

Private Methods

Method Description
FixChand ( ) : void
FixSunflowers ( ) : void
GetNewNpc ( int id ) : TEditXNA.Terraria.Objects.NpcName
OnProgressChanged ( object sender, ProgressChangedEventArgs e ) : void
SaveV2 ( World world, BinaryWriter bw ) : void

Method Details

DeserializeTileData() public static method

public static DeserializeTileData ( BinaryReader r, int &rle ) : Tile
r System.IO.BinaryReader
rle int
return Tile

FixChand() public method

public FixChand ( int x, int y ) : void
x int
y int
return void

FixNpcs() public method

public FixNpcs ( ) : void
return void

GetAnchor() public method

public GetAnchor ( int x, int y ) : Vector2Int32
x int
y int
return Vector2Int32

GetChestAtTile() public method

public GetChestAtTile ( int x, int y ) : TEditXNA.Terraria.Chest
x int
y int
return TEditXNA.Terraria.Chest

GetMannequin() public method

public GetMannequin ( int x, int y ) : Vector2Int32
x int
y int
return Vector2Int32

GetNpc() public method

public GetNpc ( int id ) : TEditXNA.Terraria.Objects.NpcName
id int
return TEditXNA.Terraria.Objects.NpcName

GetRack() public method

public GetRack ( int x, int y ) : Vector2Int32
x int
y int
return Vector2Int32

GetSignAtTile() public method

public GetSignAtTile ( int x, int y ) : TEditXNA.Terraria.Sign
x int
y int
return TEditXNA.Terraria.Sign

GetTileEntityAtTile() public method

public GetTileEntityAtTile ( int x, int y ) : TileEntity
x int
y int
return TileEntity

LoadChestData() public static method

public static LoadChestData ( BinaryReader r ) : IEnumerable
r System.IO.BinaryReader
return IEnumerable

LoadFooter() public static method

public static LoadFooter ( BinaryReader r, World w ) : void
r System.IO.BinaryReader
w World
return void

LoadHeaderFlags() public static method

public static LoadHeaderFlags ( BinaryReader r, World w, int expectedPosition ) : void
r System.IO.BinaryReader
w World
expectedPosition int
return void

LoadMobsData() public static method

public static LoadMobsData ( BinaryReader r, World w ) : void
r System.IO.BinaryReader
w World
return void

LoadNPCsData() public static method

public static LoadNPCsData ( BinaryReader r, World w ) : void
r System.IO.BinaryReader
w World
return void

LoadPressurePlate() public static method

public static LoadPressurePlate ( BinaryReader r, World w ) : void
r System.IO.BinaryReader
w World
return void

LoadSectionHeader() public static method

public static LoadSectionHeader ( BinaryReader r, bool &tileFrameImportant, int &sectionPointers, World w ) : bool
r System.IO.BinaryReader
tileFrameImportant bool
sectionPointers int
w World
return bool

LoadSignData() public static method

public static LoadSignData ( BinaryReader r ) : IEnumerable
r System.IO.BinaryReader
return IEnumerable

LoadTileData() public static method

public static LoadTileData ( BinaryReader r, int maxX, int maxY ) : ].Tile[
r System.IO.BinaryReader
maxX int
maxY int
return ].Tile[

LoadTileEntities() public static method

public static LoadTileEntities ( BinaryReader r, World w ) : void
r System.IO.BinaryReader
w World
return void

LoadV2() public static method

public static LoadV2 ( BinaryReader b, string filename, World w ) : void
b System.IO.BinaryReader
filename string
w World
return void

LoadWorld() public static method

public static LoadWorld ( string filename ) : World
filename string
return World

ReadBitArray() public static method

Read an array of booleans from a bit-packed array.
public static ReadBitArray ( BinaryReader reader ) : bool[]
reader System.IO.BinaryReader BinaryReader at start of bit array.
return bool[]

ResetTime() public method

public ResetTime ( ) : void
return void

Save() public static method

public static Save ( World world, string filename, bool resetTime = false ) : void
world World
filename string
resetTime bool
return void

SaveChests() public static method

public static SaveChests ( IList chests, BinaryWriter bw ) : int
chests IList
bw System.IO.BinaryWriter
return int

SaveFooter() public static method

public static SaveFooter ( World world, BinaryWriter bw ) : int
world World
bw System.IO.BinaryWriter
return int

SaveHeaderFlags() public static method

public static SaveHeaderFlags ( World world, BinaryWriter bw ) : int
world World
bw BinaryWriter
return int

SaveMobs() public static method

public static SaveMobs ( IEnumerable mobs, BinaryWriter bw ) : int
mobs IEnumerable
bw BinaryWriter
return int

SaveNPCs() public static method

public static SaveNPCs ( IEnumerable npcs, BinaryWriter bw ) : int
npcs IEnumerable
bw BinaryWriter
return int

SavePressurePlate() public static method

public static SavePressurePlate ( IList plates, BinaryWriter bw ) : int
plates IList
bw BinaryWriter
return int

SaveSectionHeader() public static method

public static SaveSectionHeader ( World world, BinaryWriter bw ) : int
world World
bw BinaryWriter
return int

SaveSigns() public static method

public static SaveSigns ( IList signs, BinaryWriter bw ) : int
signs IList
bw BinaryWriter
return int

SaveTileEntities() public static method

public static SaveTileEntities ( World w, BinaryWriter bw ) : int
w World
bw BinaryWriter
return int

SaveTiles() public static method

public static SaveTiles ( Tile tiles, int maxX, int maxY, BinaryWriter bw ) : int
tiles Tile
maxX int
maxY int
bw BinaryWriter
return int

SerializeTileData() public static method

BitPack tile data and headers
public static SerializeTileData ( Tile tile, int &dataIndex, int &headerIndex ) : byte[]
tile Tile
dataIndex int
headerIndex int
return byte[]

UpdateSectionPointers() public static method

public static UpdateSectionPointers ( int sectionPointers, BinaryWriter bw ) : int
sectionPointers int
bw BinaryWriter
return int

ValSpecial() public method

public ValSpecial ( int x, int y ) : void
x int
y int
return void

ValidTileLocation() public method

public ValidTileLocation ( Vector2Int32 v ) : bool
v Vector2Int32
return bool

ValidTileLocation() public method

public ValidTileLocation ( int x, int y ) : bool
x int
y int
return bool

Validate() public method

public Validate ( ) : void
return void

World() public method

public World ( ) : System
return System

World() public method

public World ( int height, int width, string title, int seed = -1 ) : System
height int
width int
title string
seed int
return System

WriteBitArray() public static method

Write an array of booleans to a binary stream as a bit-packed array.
public static WriteBitArray ( BinaryWriter writer, bool values ) : void
writer BinaryWriter BinaryWriter stream.
values bool Collection of booleans to write as a bit-packed array.
return void

Property Details

CaveBackX public_oe property

public int[] CaveBackX
return int[]

CompatibleVersion public_oe static_oe property

public static uint CompatibleVersion
return uint

Guid public_oe property

public Guid,System Guid
return System.Guid

MaxMoons public_oe static_oe property

public static byte MaxMoons
return byte

Rand public_oe property

public Random,System Rand
return System.Random

SectionCount public_oe static_oe property

public static short SectionCount
return short

TileCount public_oe static_oe property

public static short TileCount
return short

TileFrameImportant public_oe static_oe property

public static bool[] TileFrameImportant
return bool[]

Tiles public_oe property

public Tile[,] Tiles
return ].Tile[

TreeBG public_oe property

public int[] TreeBG
return int[]

TreeMntBG public_oe property

public int[] TreeMntBG
return int[]

TreeX public_oe property

public int[] TreeX
return int[]

Version public_oe property

public uint Version
return uint