|
TModLoader v1.4.4.9
TModLoader source code documentation
|
Inheritance diagram for Terraria.Main:Classes | |
| class | CurrentFrameFlags |
| struct | CurrentPlayerOverride |
| struct | InfoToSetBackColor |
| struct | MouseTextCache |
| class | NativeMethods |
| struct | SceneArea |
| class | TextDisplayCache |
Public Types | |
| enum | WorldPreparationState { AwaitingData , ProcessingData , Ready } |
Static Public Member Functions | |
| static void | ToggleGameplayUpdates (bool state) |
| static void | SetRecommendedZoomContext (Matrix matrix) |
| static void | FindAnnouncementBoxStatus () |
| static bool | CanPlayCreditsRoll () |
| static void | SetCameraLerp (float lerp, int time) |
| static void | SetCameraGamepadLerp (float lerp) |
| static Vector2 | ReverseGravitySupport (Vector2 pos, float height=0f) |
| static Point | ReverseGravitySupport (Point pos, int height=0) |
| static Rectangle | ReverseGravitySupport (Rectangle box) |
| static MoonPhase | GetMoonPhase () |
| static Vector2 | DrawPlayerItemPos (float gravdir, int itemtype) |
| static void | SetupTileMerge () |
| static void | RegisterItemAnimation (int index, DrawAnimation animation) |
| Registers an animation for an item type to draw inside UI (not world or held item on player). To enable its animation in the world, use ItemID.Sets.AnimatesAsSoul in conjunction with this. | |
| static void | InitializeItemAnimations () |
| static void | AnglerQuestSwap () |
| static void | TrySetPreparationState (WorldPreparationState state) |
| static void | UpdateWorldPreparationState () |
| static bool | InSmartCursorHighlightArea (int x, int y, out bool actuallySelected) |
| static void | LoadWorlds () |
| static void | LoadPlayers () |
| static void | SaveRecent () |
| static bool | SaveSettings () |
| static string | GetPlayerPathFromName (string playerName, bool cloudSave) |
| static string | GetWorldPathFromName (string worldName, bool cloudSave) |
| static string | ConvertToSafeArgument (string arg) |
| static string | ConvertFromSafeArgument (string arg) |
| static void | startDedInput () |
| static void | startDedInputCallBack () |
| static void | ExecuteCommand (string text, CommandCaller commandCaller) |
| static bool | IsFastForwardingTime () |
| static void | Sundialing () |
| static void | Moondialing () |
| static void | UpdateTimeRate () |
| static void | UpdateTimeRate_Inner () |
| static void | LoadTestLog (string logname) |
| static void | CheckForMoonEventsStartingTemporarySeasons () |
| static void | CheckForMoonEventsScoreDisplay () |
| static void | stopMoonEvent () |
| static void | startPumpkinMoon () |
| static void | startSnowMoon () |
| static void | snowing () |
| static void | checkXMas () |
| static void | checkHalloween () |
| static void | TeleportEffect (Rectangle effectRect, int Style, int extraInfo=0, float dustCountMult=1f, TeleportationSide side=TeleportationSide.Entry, Vector2 otherPosition=default(Vector2)) |
| static void | Ambience () |
| static void | AnimateTiles_CritterCages () |
| static void | DoUpdate_AnimateItemIcons () |
| static void | QueueMainThreadAction (Action action) |
| static void | NotifyOfEvent (GameNotificationType type) |
| static bool | IsNPCActiveAndOneOfTypes (int npcIndex, params int[] types) |
| static void | OpenPlayerChat () |
| static void | ClosePlayerChat () |
| static void | InputTextSign () |
| static void | InputTextChest () |
| static void | InputTextSignCancel () |
| static void | clrInput () |
| static string | GetInputText (string oldString, bool allowMultiLine=false) |
| static void | MouseText_DrawItemTooltip_GetLinesInfo (Item item, ref int yoyoLogo, ref int researchLine, float oldKB, ref int numLines, string[] toolTipLine, bool[] preFixLine, bool[] badPreFixLine, string[] toolTipNames, out int prefixlineIndex) |
| static void | DrawGamepadInstructions () |
| static Color | shine (Color newColor, int type) |
| static void | shine (ref Vector3 newColor, int type) |
| static float | NPCAddHeight (NPC theNPC) |
| static int | GetProjectileDesiredShader (Projectile proj) |
| static void | GetItemDrawFrame (int item, out Texture2D itemTexture, out Rectangle itemFrame) |
| Gets the texture and frame of the given item type (F:Terraria.Item.type). | |
| static Vector2 | DrawWhip_BoneWhip (Projectile proj, List< Vector2 > controlPoints) |
| static Vector2 | DrawWhip_CoolWhip (Projectile proj, List< Vector2 > controlPoints) |
| static Vector2 | DrawWhip_FireWhip (Projectile proj, List< Vector2 > controlPoints) |
| static Vector2 | DrawWhip_RainbowWhip (Projectile proj, List< Vector2 > controlPoints) |
| static Vector2 | DrawWhip_ThornWhip (Projectile proj, List< Vector2 > controlPoints) |
| static Vector2 | DrawWhip_WhipSword (Projectile proj, List< Vector2 > controlPoints) |
| static Vector2 | DrawWhip_WhipMace (Projectile proj, List< Vector2 > controlPoints) |
| static Vector2 | DrawWhip_WhipScythe (Projectile proj, List< Vector2 > controlPoints) |
| static Vector2 | DrawWhip_WhipBland (Projectile proj, List< Vector2 > controlPoints) |
| static Vector2 | GetPlayerArmPosition (Projectile proj) |
| static void | PlayInteractiveProjectileOpenCloseSound (int projType, bool open) |
| static void | PrintTimedMessage (string message, params object[] arguments) |
| static void | EntitySpriteDraw (Texture2D texture, Vector2 position, Rectangle? sourceRectangle, Color color, float rotation, Vector2 origin, float scale, SpriteEffects effects, float worthless=0f) |
| static void | EntitySpriteDraw (Texture2D texture, Vector2 position, Rectangle? sourceRectangle, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float worthless=0f) |
| static void | EntitySpriteDraw (DrawData data) |
| static Color | buffColor (Color newColor, float R, float G, float B, float A) |
| static Color | quickAlpha (Color oldColor, float Alpha) |
| static bool | CanDryadPlayStardewAnimation (Player player, NPC npc) |
| static void | SetNPCShopIndex (int index) |
| static void | CloseNPCChatOrSign () |
| static void | SubmitSignText () |
| static void | LockCraftingForThisCraftClickDuration () |
| static void | CraftItem (Recipe r) |
| static void | DrawInterface_Resources_ClearBuffs () |
| static string | GetBuffTooltip (Player player, int buffType) |
| static bool | TryGetBuffTime (int buffSlotOnPlayer, out int buffTimeValue) |
| Checks if the buff at index buffSlotOnPlayer is allowed to draw a "remaining time" text, and sets buffTimeValue to it. | |
| static int | DrawBuffIcon (int drawBuffText, int buffSlotOnPlayer, int x, int y) |
| Draws the buff icon corresponding to the buff in Main.LocalPlayer.buffType[buffSlotOnPlayer ]. | |
| static void | TryRemovingBuff (int i, int b) |
| Calls Player.DelBuff with index i after checking Main.debuff of buff type b. Will toggle Player.hideMisc for pet and light pet. | |
| static void | TryRemovingBuff_CheckBuffHideMisc (int slot, int buffID) |
| static void | OpenHairWindow () |
| static void | CancelHairWindow () |
| static void | BuyHairWindow () |
| static int | UnlockedMaxHair () |
| static void | OpenClothesWindow () |
| static void | CancelClothesWindow (bool quiet=false) |
| static void | SaveClothesWindow () |
| static void | DrawInterface_29_SettingsButton () |
| static void | DrawSettingButton (ref bool mouseOver, ref float scale, int posX, int posY, string text, string textSizeMatcher, Action clickAction) |
| static void | ItemIconCacheUpdate (int selectedItemID) |
| static void | ItemIconCacheVerification () |
| static void | DrawWallOfFish () |
| static void | DrawWallOfStars () |
| static void | DrawItemIcon (SpriteBatch spriteBatch, Item theItem, Vector2 screenPositionForItemCenter, Color itemLightColor, float sizeLimit) |
| static void | CheckInvasionProgressDisplay () |
| static void | SyncAnInvasion (int toWho) |
| static void | ReportInvasionProgress (int progress, int progressMax, int icon, int progressWave) |
| static void | DrawInvasionProgress () |
| static Color | hslToRgb (Vector3 hslVector) |
| static Color | hslToRgb (float Hue, float Saturation, float Luminosity, byte a=byte.MaxValue) |
| static double | hue2rgb (double c, double t1, double t2) |
| static Vector3 | rgbToHsl (Color newColor) |
| static void | DrawCursor (Vector2 bonus, bool smart=false) |
| static void | ClearSmartInteract () |
| static Vector2 | DrawThickCursor (bool smart=false) |
| static void | GoToWorldSelect () |
| static void | StartClientGameplay () |
| static void | ReleaseHostAndPlayProcess () |
| static void | CycleFrameSkipMode () |
| static void | OnSubmitServerIP (string inputText) |
| static void | OpenCharacterSelectUI () |
| static void | OpenReportsMenu () |
| static void | OpenWorldSelectUI () |
| static void | OpenResourcePacksMenu (UIState uiStateToGoBackTo) |
| static void | ResetKeyBindings () |
| static void | CursorColor () |
| static Point | GetScreenOverdrawOffset () |
| static bool | WallLightAt (int i, int j) |
| static bool | WallLightAt (int i, int j, bool showInvisibleWalls) |
| static string | ValueToCoins (long value) |
| static void | TriggerPing (Vector2 position) |
| static Color | GetPlayerHeadBordersColor (Player plr) |
| static int | CalculateWaterStyle (bool ignoreFountains=false) |
| static bool | IsLiquidStyleWater (int liquidStyle) |
| static void | DrawTileInWater (Vector2 drawOffset, int x, int y) |
| static bool | ShouldShowInvisibleWalls () |
| static int | ConvertPaintIdToTileShaderIndex (int paintIndexOnTile, bool isUsedForPaintingGrass, bool useWallShaderHacks) |
| static void | ResetWindCounter (bool resetExtreme=false) |
| static void | NewLightning () |
| static bool | IsItDay () |
| static double | starGameMath (double value=1.0) |
| static void | GetAreaToLight (out int firstTileX, out int lastTileX, out int firstTileY, out int lastTileY) |
| static int | GetPreferredBGStyleForPlayer () |
| static bool | CanStartInvasion (int type=1, bool ignoreDelay=false) |
| static void | StartInvasion (int type=1) |
| static void | FakeLoadInvasionStart () |
| static void | NewText (object o, Color? color=null) |
| static void | NewText (string newText, byte R=byte.MaxValue, byte G=byte.MaxValue, byte B=byte.MaxValue) |
| Spawns chat text on the local client. Does nothing on the server. For floating text, such as damage, see T:Terraria.CombatText <VariousTextOptionsSummary> Summary of options to display text to the user: • M:Terraria.Main.NewText(System.String,System.Byte,System.Byte,System.Byte) to display a message in chat. • T:Terraria.CombatText to display floating damage numbers in-game. Used for damage and healing numbers. • T:Terraria.PopupText to display non-overlapping floating in-game text. Used for reforge and item pickup messages. </VariousTextOptionsSummary> | |
| static void | NewTextMultiline (string text, bool force=false, Color c=default(Color), int WidthLimit=-1) |
| static void | StopRain () |
| Stops rain. Should be called on the server (netMode != client) - vanilla syncs it using M:Terraria.Main.SyncRain. You can also call this on the client to update visuals immediately, assuming it was called serverside as well (Journey Mode rain slider does this). | |
| static void | StartRain () |
| Starts rain for a random amount of time. Should be called on the server (netMode != client) - vanilla syncs it using M:Terraria.Main.SyncRain. You can also call this on the client to update visuals immediately, assuming it was/will be called serverside as well (Journey Mode rain slider does this). | |
| static void | StartSlimeRain (bool announce=true) |
| static void | StopSlimeRain (bool announce=true) |
| static bool | AnyPlayerReadyToFightKingSlime () |
| static void | SkipToTime (int timeToSet, bool setIsDayTime) |
| static bool | ShouldNormalEventsBeAbleToStart () |
| static void | UpdateTime_StartNight (ref bool stopEvents) |
| static void | UpdateTime_StartDay (ref bool stopEvents) |
| static BestiaryUnlockProgressReport | GetBestiaryProgressReport () |
| static int | DamageVar (float dmg, float luck=0f) |
Multiplies the input damage by a random value between 0.85f and 1.15f. | |
| static int | DamageVar (float dmg, int percent, float luck=0f) |
| static void | ClearPendingPlayerSelectCallbacks () |
| static void | SelectPlayer (PlayerFileData data) |
| static void | ToggleFullScreen () |
| static void | SetFullScreen (bool fullscreen) |
| static void | SetResolution (int width, int height) |
| static void | SetDisplayMode (int width, int height, bool fullscreen) |
| static void | FixUIScale () |
| static void | OpenPlayerSelect (OnPlayerSelected method) |
| static void | SwitchNetMode (int mode) |
| static void | WeGameRequireExitGame () |
| static bool | IsTileSpelunkable (int tileX, int tileY) |
| Checks if a tile at the given coordinates counts towards tile coloring from the Spelunker buff, and is detected by various pets. | |
| static bool | IsTileBiomeSightable (int tileX, int tileY, ref Color sightColor) |
| Checks if a tile at the given coordinates counts towards tile coloring from the Biome Sight buff. | |
| static void | InfoDisplayPageHandler (int startX, ref string mouseText, out int startingDisplay, out int endingDisplay) |
| static void | BuilderTogglePageHandler (int startY, int activeToggles, out bool moveDownForButton, out int startIndex, out int endIndex) |
| static void | SyncRain () |
Syncs rain state if M:Terraria.Main.StartRain or M:Terraria.Main.StopRain were called in the same tick and caused a change to
. | |
| static Task | RunOnMainThread (Action action) |
| Wait for an action to be performed on the main thread. | |
| static Task< T > | RunOnMainThread< T > (Func< T > func) |
| Wait for an action to be performed on the main thread. | |
| static void | AddSignalTraps () |
Static Public Attributes | |
| const int | curRelease = 279 |
| const string | assemblyVersionNumber = "1.4.4.9" |
| const string | copyrightText = "Copyright © 2022 Re-Logic" |
| const ulong | WorldGeneratorVersion = 1198295875585uL |
| static int | mapDelay = 2 |
| static IAssetRepository | Assets |
| static AssetSourceController | AssetSourceController |
| static int | CurrentDrawnEntityShader |
| static Entity | CurrentDrawnEntity |
| static float | ForcedMinimumZoom = 1f |
| static SpriteViewMatrix | GameViewMatrix |
| static SpriteViewMatrix | BackgroundViewMatrix |
| static float | GameZoomTarget = 1f |
| static bool | LightingEveryFrame = true |
| static bool | SettingsUnlock_WorldEvil |
| static bool | SettingsEnabled_MinersWobble = true |
| static bool | SettingsEnabled_AutoReuseAllItems = false |
| static bool | SettingBlockGamepadsEntirely |
| static bool | SettingDontScaleMainMenuUp |
| static bool | SettingsEnabled_OpaqueBoxBehindTooltips = true |
| static bool | SettingMusicReplayDelayEnabled = false |
| static bool | HidePassword |
| static bool | ReversedUpDownArmorSetBonuses |
| static Color | MouseBorderColor = new Color(64, 64, 64, 64) |
| static bool | MouseShowBuildingGrid |
| static bool | AllowUnfocusedInputOnGamepad |
| static bool | InvisibleCursorForGamepad = true |
| static bool | GamepadDisableCursorItemIconInner = true |
| static bool | GamepadDisableInstructionsDisplay |
| static bool | CrouchingEnabled = false |
| static float | MouseBuildingGridAlpha |
| static bool | CaptureModeDisabled = false |
| static Main | instance |
| static ChromaEngine | Chroma |
| static ChromaHotkeyPainter | ChromaPainter |
| static Camera | Camera = new Camera() |
| static IPlayerRenderer | PlayerRenderer = new LegacyPlayerRenderer() |
| static IPlayerRenderer | PotionOfReturnRenderer = new ReturnGatePlayerRenderer() |
| static MapHeadRenderer | MapPlayerRenderer = new MapHeadRenderer() |
| static NPCHeadRenderer | TownNPCHeadRenderer = null |
| static NPCHeadRenderer | BossNPCHeadRenderer = null |
| static List< TitleLinkButton > | TitleLinks = new List<TitleLinkButton>() |
| static string | versionNumber = "v1.4.4.9" |
| static string | versionNumber2 = "v1.4.4.9" |
| static bool | AnnouncementBoxDisabled |
| static int | AnnouncementBoxRange = -1 |
| static string | AutogenSeedName |
| static Dictionary< int, GameModeData > | RegisteredGameModes |
| static bool | drunkWorld = false |
| static bool | getGoodWorld = false |
| static bool | tenthAnniversaryWorld = false |
| static bool | dontStarveWorld = false |
| static bool | notTheBeesWorld = false |
| static bool | remixWorld = false |
| static bool | noTrapsWorld = false |
| static bool | zenithWorld = false |
| static Vector2 | destroyerHB = new Vector2(0f, 0f) |
| static FavoritesFile | LocalFavoriteData = new FavoritesFile(SavePath + "/favorites.json", isCloud: false) |
| static FavoritesFile | CloudFavoritesData = new FavoritesFile("ModLoader/favorites.json", isCloud: true) |
| static FileMetadata | WorldFileMetadata |
| static FileMetadata | MapFileMetadata |
| static PingMapLayer | Pings = new PingMapLayer() |
| static MapIconOverlay | MapIcons = new MapIconOverlay().AddLayer(new SpawnMapLayer()).AddLayer(new TeleportPylonsMapLayer()).AddLayer(Pings) |
| static CreativeUI | CreativeMenu = new CreativeUI() |
| static BigProgressBarSystem | BigBossProgressBar = new BigProgressBarSystem() |
| static UserInterface | MenuUI = new UserInterface() |
| static UserInterface | InGameUI = new UserInterface() |
| static bool | drawBackGore |
| static ulong | LobbyId = 0uL |
| static WorldSections | sectionManager |
| static bool | ServerSideCharacter |
| static string | clientUUID |
| static bool | ContentLoaded = false |
| static float | GlobalTimeWrappedHourly |
| static bool | GlobalTimerPaused = false |
| static GameTime | gameTimeCache = new GameTime() |
| static ulong | TileFrameSeed = (ulong)Guid.NewGuid().GetHashCode() |
| static ContentManager | ShaderContentManager |
| static Ref< Effect > | ScreenShaderRef = new Ref<Effect>() |
| static Ref< Effect > | PixelShaderRef = new Ref<Effect>() |
| static Ref< Effect > | TileShaderRef = new Ref<Effect>() |
| static Ref< Effect > | VertexPixelShaderRef = new Ref<Effect>() |
| static int | WaveQuality = 3 |
| static bool | UseStormEffects = true |
| static bool | UseHeatDistortion = true |
| static List< IEnumerator > | DelayedProcesses = new List<IEnumerator>() |
| static int | npcStreamSpeed = 30 |
| static int | musicError |
| static bool | dedServFPS |
| static int | dedServCount1 |
| static int | dedServCount2 |
| static bool | superFast = false |
| static readonly int | offLimitBorderTiles = 40 |
| static readonly int | maxMusic = 92 |
| const int | MaxBannerTypes = 290 |
| static readonly int | maxBackgrounds = 298 |
| const int | MaxShopIDs = 100 |
| static Vector2[] | OffsetsNPCOffhand |
| static Vector2[] | OffsetsPlayerOffhand |
| static Vector2[] | OffsetsPlayerOnhand |
| static Vector2[] | OffsetsPlayerHeadgear |
| static Vector2 | CurrentPan = Vector2.Zero |
| static float | sunCircle |
| static int | BlackFadeIn |
| static bool | noWindowBorder = false |
| static RasterizerState | Rasterizer = RasterizerState.CullCounterClockwise |
| static int | undergroundBackground |
| static int | oldUndergroundBackground |
| static bool | skipMenu = false |
| static bool | verboseNetplay = false |
| static bool | stopTimeOuts = false |
| static bool | showSpam = false |
| static bool | showItemOwner = false |
| static bool[] | townNPCCanSpawn = new bool[NPCID.Count] |
| static int | musicBox2 = -1 |
| static int | musicBoxNotModifiedByVolume = -1 |
| static byte | HealthBarDrawSettings = 1 |
| static bool | runningCollectorsEdition |
| static float | wFrCounter |
| static float | wFrame |
| static float | upTimer |
| static float | upTimerMax |
| static float | upTimerMaxDelay |
| static bool | drawDiag |
| static bool | drawRelease |
| static bool | drawBetterDebug |
| static bool | betterDebugRelease |
| static bool | renderNow |
| static bool | drawToScreen |
| static bool | targetSet |
| static int | mouseX |
| static int | mouseY |
| static int | lastMouseX |
| static int | lastMouseY |
| static bool | mouseLeft |
| static bool | mouseRight |
| static bool | isMouseLeftConsumedByUI = false |
| static float | essScale = 1f |
| static int | essDir = -1 |
| static float[] | cloudBGX = new float[2] |
| static float | cloudBGAlpha |
| static float | cloudBGActive |
| static int[] | cloudBG = new int[2] { 112, 113 } |
| static int[] | treeMntBGSet1 = new int[2] |
| static int[] | treeMntBGSet2 = new int[2] |
| static int[] | treeMntBGSet3 = new int[2] |
| static int[] | treeMntBGSet4 = new int[2] |
| static int[] | treeBGSet1 = new int[3] |
| static int[] | treeBGSet2 = new int[3] |
| static int[] | treeBGSet3 = new int[3] |
| static int[] | treeBGSet4 = new int[3] |
| static int[] | corruptBG = new int[3] |
| static int[] | jungleBG = new int[3] |
| static int[] | snowMntBG = new int[2] |
| static int[] | snowBG = new int[3] |
| static int[] | hallowBG = new int[3] |
| static int[] | crimsonBG = new int[3] |
| static int[] | desertBG = new int[3] |
| static int[] | mushroomBG = new int[3] |
| static int | oceanBG |
| static int[] | underworldBG = new int[5] |
| static int[] | treeX = new int[4] |
| static int[] | treeStyle = new int[4] |
| static int[] | caveBackX = new int[4] |
| static int[] | caveBackStyle = new int[4] |
| static int | iceBackStyle |
| static int | hellBackStyle |
| static int | jungleBackStyle |
| static string | debugWords = "" |
| static bool | gamePad = false |
| static bool | xMas |
| static bool | halloween |
| static bool | forceXMasForToday |
| static bool | forceHalloweenForToday |
| static bool | DisableIntenseVisualEffects = false |
| static int | snowDust = 0 |
| static bool | changeTheTitle |
| static bool | hairWindow |
| static bool | clothesWindow |
| static bool | ingameOptionsWindow = false |
| static bool | inFancyUI = false |
| static int | keyCount |
| static string[] | keyString = new string[10] |
| static int[] | keyInt = new int[10] |
| static byte | gFade |
| static float | gFader |
| static byte | gFadeDir = 1 |
| static bool | shouldDrawNetDiagnosticsUI |
| static IMultiplayerClosePlayersOverlay | ActiveClosePlayersTeamOverlay = new NewMultiplayerClosePlayersOverlay() |
| static double | UpdateTimeAccumulator |
| static bool | drawSkip |
| static int | fpsCount |
| static Stopwatch | fpsTimer = new Stopwatch() |
| static bool | showSplash = true |
| static bool | ignoreErrors = true |
| static string | defaultIP = "" |
| static double | dayRate = 1.0 |
| The rate at which F:Terraria.Main.time updates per tick. Can be modified using M:Terraria.ModLoader.ModSystem.ModifyTimeRate(System.Double@,System.Double@,System.Double@). Capped at 86,400.0. | |
| static double | desiredWorldTilesUpdateRate = 1.0 |
| static int | maxScreenW = 1920 |
| static int | maxScreenH = 1200 |
| static int | minScreenW = 800 |
| static int | minScreenH = 720 |
| static float | iS = 1f |
| static bool | render |
| static int | qaStyle |
| static int | buffScanAreaWidth = (maxScreenW + 800) / 16 - 1 |
| static int | buffScanAreaHeight = (maxScreenH + 800) / 16 - 1 |
| static float | musicPitch = 0f |
| static bool[] | projHostile = new bool[ProjectileID.Count] |
| static bool[] | projHook = new bool[ProjectileID.Count] |
| static bool[] | pvpBuff = new bool[BuffID.Count] |
Indexed by T:Terraria.ID.BuffID. If true for a given T:Terraria.ID.BuffID, then that buff can be applied to players by other players in PvP. Defaults to false. | |
| static bool[] | persistentBuff = new bool[BuffID.Count] |
| Allows status effects for which this is set to true to persist after the afflicted player's death. Defaults to false; all vanilla flask effects have their entries here set to true. | |
| static bool[] | vanityPet = new bool[BuffID.Count] |
| Categorizes status effects for which this is set to true as being from vanity pets, preventing them from overlapping with other vanity pet status effects. Defaults to false; all vanilla vanity pets have their entries here set to true. | |
| static bool[] | lightPet = new bool[BuffID.Count] |
| Categorizes status effects for which this is set to true as being tied to a light pet, preventing them from overlapping with other light pet status effects. Defaults to false; all vanilla light pets have their entries here set to true. | |
| static bool[] | meleeBuff = new bool[BuffID.Count] |
| Categorizes status effects for which this is set to true as being from flasks, preventing them from overlapping with other flask status effects. Defaults to false; all vanilla flask effects have their entries here set to true. | |
| static bool[] | debuff = new bool[BuffID.Count] |
| Categorizes status effects for which this is set to true as being debuffs instead of buffs. This has multiple effects on gameplay: | |
| static bool[] | buffNoSave = new bool[BuffID.Count] |
Indexed by T:Terraria.ID.BuffID. If true for a given T:Terraria.ID.BuffID, then that buff will not be saved when exiting a world. Vanilla sets this for DoT effects (F:Terraria.ID.BuffID.Poisoned), short item buffs (F:Terraria.ID.BuffID.Panic), mount buffs, and conditionally-applied buffs (F:Terraria.ID.BuffID.Campfire, F:Terraria.ID.BuffID.Werewolf). Defaults to false. | |
| static bool[] | buffNoTimeDisplay = new bool[BuffID.Count] |
| Prevents status effects which have their entries set to true from displaying the amount of time they have left. Defaults to false; most, if not all, status effects which have their entries set to true here are related to mounts, pets, and summons. | |
| static bool[] | buffDoubleApply = new bool[BuffID.Count] |
| static int | maxMP = 10 |
| static string[] | recentWorld = new string[maxMP] |
| static string[] | recentIP = new string[maxMP] |
| static int[] | recentPort = new int[maxMP] |
| static bool | shortRender = true |
| static bool | BackgroundEnabled = true |
| static int | instantBGTransitionCounter = 2 |
| static int | bgDelay |
| static int | bgStyle |
| static float[] | bgAlphaFrontLayer = new float[14] |
| static float[] | bgAlphaFarBackLayer = new float[14] |
| static int[] | bgFrame = new int[14] |
| static int[] | bgFrameCounter = new int[14] |
| static int | EquipPage |
| static int | EquipPageSelected |
| static int | wofNPCIndex = -1 |
| static int | wofDrawAreaTop |
| static int | wofDrawAreaBottom |
| static int | wofDrawFrameIndex |
| static int | offScreenRange = 200 |
| static RenderTarget2D | waterTarget |
| static RenderTarget2D | screenTarget |
| static RenderTarget2D | screenTargetSwap |
| static int | maxMapUpdates = 250000 |
| static bool | refreshMap |
| static int | loadMapLastX |
| static bool | loadMapLock |
| static bool | loadMap |
| static bool | mapReady |
| static int | textureMaxWidth = 2000 |
| static int | textureMaxHeight = 1800 |
| static bool | updateMap |
| static int | mapMinX = 0 |
| static int | mapMaxX = 0 |
| static int | mapMinY |
| static int | mapMaxY |
| static int | mapTimeMax = 30 |
| static int | mapTime = mapTimeMax |
| static bool | clearMap |
| static int | mapTargetX = 5 |
| static int | mapTargetY = 2 |
| static bool[,] | initMap = new bool[mapTargetX, mapTargetY] |
| static bool[,] | mapWasContentLost = new bool[mapTargetX, mapTargetY] |
| const int | numInfoIcons = 13 |
| static Color | OurFavoriteColor = new Color(255, 231, 69) |
| static bool | mapInit |
| static bool | mapEnabled = true |
| static int | mapStyle = 1 |
| static float | grabMapX |
| static float | grabMapY |
| static int | miniMapX |
| static int | miniMapY |
| static int | miniMapWidth |
| static int | miniMapHeight |
| static float | mapMinimapDefaultScale = 1.05f |
| static float | mapMinimapScale = mapMinimapDefaultScale |
| static float | mapMinimapAlpha = 1f |
| static float | mapOverlayScale = 2.5f |
| static float | mapOverlayAlpha = 0.35f |
| static bool | mapFullscreen |
| static bool | resetMapFull |
| static float | mapFullscreenScale = 4f |
| static Vector2 | mapFullscreenPos = new Vector2(-1f, -1f) |
| static bool | SkipAssemblyLoad |
| static int | renderCount = 99 |
| static GraphicsDeviceManager | graphics |
| static SpriteBatch | spriteBatch |
| static TileBatch | tileBatch |
| static BasicDebugDrawer | DebugDrawer |
| static SamplerState | SamplerStateForCursor = SamplerState.LinearClamp |
| static GenerationProgress | AutogenProgress = new GenerationProgress() |
| static KeyboardState | keyState |
| static KeyboardState | oldKeyState |
| static Color | mcColor = new Color(1f, 0.6f, 0f) |
| static Color | hcColor = new Color(1f, 0.15f, 0.1f) |
| static Color | creativeModeColor = Color.Lerp(Color.HotPink, Color.White, 0.1f) |
| static Color | legendaryModeColor = Color.LimeGreen |
| static Color | highVersionColor = new Color(255, 255, 0) |
| static Color | errorColor = new Color(255, 0, 0) |
| static bool | craftingHide |
| static bool | armorHide |
| static float | shimmerAlpha = 0f |
| static float | shimmerDarken = 0f |
| static float | shimmerBrightenDelay = 0f |
| static float | craftingAlpha = 1f |
| static float | armorAlpha = 1f |
| static float[] | buffAlpha = new float[BuffID.Count] |
| static bool | afterPartyOfDoom = false |
| static bool | hardMode |
| static Vector2 | sceneWaterPos = Vector2.Zero |
| static Vector2 | sceneTilePos = Vector2.Zero |
| static Vector2 | sceneTile2Pos = Vector2.Zero |
| static Vector2 | sceneWallPos = Vector2.Zero |
| static Vector2 | sceneBackgroundPos = Vector2.Zero |
| static bool | maxQ = true |
| static float | gfxQuality = 1f |
| static float | gfxRate = 0.01f |
| static int | DiscoR = 255 |
| static int | DiscoB |
| static int | DiscoG |
| static int | teamCooldown |
| static int | teamCooldownLen = 300 |
| static bool | gamePaused |
| static bool | gameInactive |
| static int | updatesCountedForFPS |
| static int | drawsCountedForFPS |
| static int | uCount |
| static int | updateRate |
| static int | frameRate |
| static bool | RGBRelease |
| static bool | qRelease = false |
| static bool | netRelease |
| static bool | frameRelease |
| static bool | showFrameRate = false |
| static int | magmaBGFrame |
| static int | magmaBGFrameCounter |
| static int | saveTimer = 0 |
| static bool | autoJoin |
| static bool | serverStarting = false |
| static float | leftWorld = 0f |
| static float | rightWorld = 134400f |
| static float | topWorld = 0f |
| static float | bottomWorld = 38400f |
| static int | maxTilesX = (int)rightWorld / 16 + 1 |
| The width of the currently-loaded world in tiles. | |
| static int | maxTilesY = (int)bottomWorld / 16 + 1 |
| The height of the currently-loaded world in tiles. | |
| const int | sectionWidth = 200 |
| const int | sectionHeight = 150 |
| static int | maxSectionsX = maxTilesX / 200 |
| static int | maxSectionsY = maxTilesY / 150 |
| const int | maxDust = 6000 |
| static int | maxDustToDraw = 6000 |
| const int | maxCombatText = 100 |
| const int | maxItemText = 20 |
| const int | maxPlayers = 255 |
| static int | maxNetPlayers = 255 |
| static readonly int | maxChests = 8000 |
| static readonly int | maxItems = 400 |
| static readonly int | maxProjectiles = 1000 |
| static readonly int | maxNPCs = 200 |
| static UIManageControls | ManageControlsMenu = new UIManageControls() |
| static UIAchievementsMenu | AchievementsMenu = new UIAchievementsMenu() |
| static int | maxRain = 750 |
| static int | slimeWarningTime |
| static int | slimeWarningDelay = 420 |
| static float | slimeRainNPCSlots = 0.65f |
| static bool[] | slimeRainNPC = new bool[NPCID.Count] |
| static double | slimeRainTime |
| static bool | slimeRain |
| static int | slimeRainKillCount |
| const int | maxGore = 600 |
| const int | InventoryItemSlotsStart = 0 |
| const int | InventoryItemSlotsCount = 50 |
| const int | InventoryCoinSlotsStart = 50 |
| const int | InventoryCoinSlotsCount = 4 |
| const int | InventoryAmmoSlotsStart = 54 |
| const int | InventoryAmmoSlotsCount = 4 |
| const int | InventorySlotsTotal = 58 |
| const int | maxLiquidTypes = 15 |
| static float | cameraX |
| static bool | drewLava |
| static float[] | liquidAlpha = new float[15] |
| static int | waterStyle |
| static int | WorldRollingBackupsCountToKeep = 2 |
| static float | caveParallax = 0.88f |
| static int | dungeonX |
| static int | dungeonY |
| static Liquid[] | liquid = new Liquid[Liquid.maxLiquid] |
| static LiquidBuffer[] | liquidBuffer = new LiquidBuffer[50000] |
| static bool | dedServ |
| static int | spamCount = 0 |
| static int | curMusic |
| static int | dayMusic |
| static int | ugMusic |
| static int | newMusic |
| static bool | showItemText = true |
| static bool | autoSave = true |
| static bool | validateSaves = true |
| static bool | bannerMouseOver |
| static string | buffString = "" |
| static string | libPath = "" |
| static int | lo |
| static int | LogoA = 255 |
| static int | LogoB |
| static bool | LogoT |
| static string | worldName = "" |
| static int | worldID |
| static int | background |
| static int | caveBackground = 0 |
| static float | ugBackTransition |
| static Color | tileColor |
| static double | worldSurface |
| The y-coordinate of the top of the dirt layer, in tile coordinates. Corresponds to 0' on the Depth Meter. | |
| static double | rockLayer |
| The y-coordinate of the top of the caverns layer, in tile coordinates. | |
| static Color[] | teamColor = (Color[])(object)new Color[6] |
| const double | dayLength = 54000.0 |
| const double | nightLength = 32400.0 |
| static bool | dayTime = true |
| static double | time = 13500.0 |
| The time that has passed since it last became day/night. Increased by F:Terraria.Main.dayRate every tick. If it is F:Terraria.Main.dayTime, this caps at F:Terraria.Main.dayLength. Otherwise, this caps at F:Terraria.Main.nightLength. | |
| static double | timeForVisualEffects |
| static int | moonPhase |
| static short | sunModY |
| static short | moonModY |
| static bool | alreadyGrabbingSunOrMoon |
| static bool | bloodMoon |
| static bool | pumpkinMoon |
| static bool | snowMoon |
| static float | cloudAlpha |
| static float | maxRaining |
| static float | oldMaxRaining |
| static double | rainTime |
| static bool | raining |
| static bool | eclipse |
| static float | eclipseLight |
| static int | checkForSpawns |
| static int | helpText |
| static int | BartenderHelpTextIndex = 0 |
| static bool | autoGen |
| static bool | autoPause = false |
| static int[] | projFrames = new int[ProjectileID.Count] |
| Indicates how many frames of animation are in each projectile type spritesheet. Use F:Terraria.Projectile.frame to animate the projectile. The Basic Projectile Guideteaches how to animate projectiles. Indexed by F:Terraria.Projectile.type. Defaults to 1. | |
| static bool[] | projPet = new bool[ProjectileID.Count] |
| static float | demonTorch = 1f |
| static int | demonTorchDir = 1 |
| static float | martianLight = 1f |
| static int | martianLightDir = 1 |
| static float | masterColor = 1f |
| static int | masterColorDir = 1 |
| static bool | placementPreview = true |
| static SceneMetrics | SceneMetrics |
| const int | maxStars = 400 |
| static int | numStars |
| const int | maxStarTypes = 4 |
| const int | maxClouds = 200 |
| static int | weatherCounter |
| static int | numClouds = 200 |
| static int | numCloudsTemp = numClouds |
| static float | windSpeedCurrent |
| static float | windSpeedTarget |
| static int | windCounter |
| static int | extremeWindCounter |
| static bool | windPhysics = false |
| static float | windPhysicsStrength = 0.1f |
| static bool | SettingsEnabled_TilesSwayInWind = true |
| static Cloud[] | cloud = new Cloud[200] |
| static bool | resetClouds = true |
| static float | SmoothedMushroomLightInfluence |
| static int | fadeCounter |
| static float | invAlpha = 1f |
| static float | invDir = 1f |
| static UnifiedRandom | _rand |
| static bool | allChestStackHover |
| static bool | inventorySortMouseOver |
| static float | GraveyardVisualIntensity |
| const int | maxMoons = 9 |
| static int | moonType = 0 |
| const int | numTileColors = 32 |
| const int | numTreeStyles = 32 |
| const int | numberOfHairstyles = 165 |
| const int | maxHairStyles = 165 |
| const int | maxCharSelectHair = 51 |
| const int | maxHairOfStylistDefault = 123 |
| static bool | UseExperimentalFeatures |
| static string | DefaultSeed = "" |
| static IAudioSystem | audioSystem |
| static bool[] | musicNoCrossFade = new bool[maxMusic] |
| static float[] | musicFade = new float[maxMusic] |
| static float | musicVolume = 1f |
| static float | ambientVolume = 1f |
| static float | soundVolume = 1f |
| static ServerMode | MenuServerMode = ServerMode.Lobby | ServerMode.FriendsCanJoin |
| static bool[] | tileLighted = new bool[TileID.Count] |
Indexed by T:Terraria.ID.TileID. If true for a given T:Terraria.ID.TileID, then that tile produces light. You can set the light color for tile using M:Terraria.ModLoader.ModBlockType.ModifyLight(System.Int32,System.Int32,System.Single@,System.Single@,System.Single@) or M:Terraria.ModLoader.GlobalBlockType.ModifyLight(System.Int32,System.Int32,System.Int32,System.Single@,System.Single@,System.Single@). Defaults to false. | |
| static bool[] | tileMergeDirt = new bool[TileID.Count] |
Indexed by T:Terraria.ID.TileID. If true for a given T:Terraria.ID.TileID, then that tile has frames for merging with F:Terraria.ID.TileID.Dirt. Defaults to false. | |
| static bool[] | tileCut = new bool[TileID.Count] |
| If true, Tiles of the indexed Tile Type will be destroyed by weapons and projectiles. | |
| static bool[] | tileAlch = new bool[TileID.Count] |
| static int[] | tileShine = new int[TileID.Count] |
| How rarely tiny ambient dust appear from this tile. Larger values mean less frequently. | |
| static bool[] | tileShine2 = new bool[TileID.Count] |
| If true, the tile will be drawn to be slightly more bright. | |
| static bool[] | wallHouse = new bool[WallID.Count] |
| If true, the wall is considered "safe" for enemy spawning purposes. | |
| static bool[] | wallDungeon = new bool[WallID.Count] |
| static bool[] | wallLight = new bool[WallID.Count] |
| static int[] | wallBlend = new int[WallID.Count] |
| static bool[] | tileStone = new bool[TileID.Count] |
| static bool[] | tileAxe = new bool[TileID.Count] |
| If true for the given tile type, tiles of the type are mined using an axe instead of pickaxe. | |
| static bool[] | tileHammer = new bool[TileID.Count] |
| static bool[] | tileWaterDeath = new bool[TileID.Count] |
| If true for the given tile type, tiles of the type will be destroyed if in contact with water. P:Terraria.ObjectData.TileObjectData.WaterDeath supersedes this if a T:Terraria.ObjectData.TileObjectData is available. | |
| static bool[] | tileLavaDeath = new bool[TileID.Count] |
| If true for the given tile type, tiles of the type will be destroyed if in contact with lava. P:Terraria.ObjectData.TileObjectData.LavaDeath supersedes this if a T:Terraria.ObjectData.TileObjectData is available. Use F:Terraria.Main.tileObsidianKill instead if the tile should only be killed by obsidian forming over it. | |
| static bool[] | tileTable = new bool[TileID.Count] |
| static bool[] | tileBlockLight = new bool[TileID.Count] |
| static bool[] | tileNoSunLight = new bool[TileID.Count] |
| static bool[] | tileDungeon = new bool[TileID.Count] |
| static bool[] | tileSpelunker = new bool[TileID.Count] |
| If true for the given tile type, tiles will be drawn much brighter and give off additional dust if the player is under the effects of the Spelunker buff, magic lantern, or similar effect. | |
| static bool[] | tileSolidTop = new bool[TileID.Count] |
| static bool[] | tileSolid = new bool[TileID.Count] |
| static bool[] | tileBouncy = new bool[TileID.Count] |
| static short[] | tileOreFinderPriority = new short[TileID.Count] |
| The priority of this tile in relation to the Metal Detector. The tile with the highest priority in range will show the corresponding map entry. The Metal Detector wiki pagelists existing values to use as reference. | |
| static byte[] | tileLargeFrames = new byte[TileID.Count] |
| static byte[] | wallLargeFrames = new byte[WallID.Count] |
| static bool[] | tileRope = new bool[TileID.Count] |
| static bool[] | tileBrick = new bool[TileID.Count] |
| static bool[] | tileMoss = new bool[TileID.Count] |
| static bool[] | tileNoAttach = new bool[TileID.Count] |
| static bool[] | tileNoFail = new bool[TileID.Count] |
| static bool[] | tileCracked = new bool[TileID.Count] |
| static bool[] | tileObsidianKill = new bool[TileID.Count] |
| If true for the given tile type, tiles of the type will be destroyed if obsidian would generate at it's location because of lava and water mixing. Automatically set to true if F:Terraria.Main.tileLavaDeath is true. Many tiles are immune to lava but break if obsidian kills it, such as Statues and Anvils. | |
| static bool[] | tileFrameImportant = new bool[TileID.Count] |
| Set to true if this is not a typical Terrain tile. Terrain tiles are 1x1 tiles that automatically adjust their frame values to nearby tiles. They don't have a TileObjectData. All non-1x1 tiles should set this to true. All 1x1 tiles that have a TileObjectData or that should preserve frame data should set this to true. | |
| static bool[] | tilePile = new bool[TileID.Count] |
| static bool[] | tileBlendAll = new bool[TileID.Count] |
| static short[] | tileGlowMask = new short[TileID.Count] |
| static bool[] | tileContainer = new bool[TileID.Count] |
| static bool[] | tileSign = new bool[TileID.Count] |
| static bool[][] | tileMerge = new bool[TileID.Count][] |
| static int | cageFrames = 25 |
| static bool | critterCage |
| static int[] | bunnyCageFrame = new int[cageFrames] |
| static int[] | bunnyCageFrameCounter = new int[cageFrames] |
| static int[] | squirrelCageFrame = new int[cageFrames] |
| static int[] | squirrelCageFrameCounter = new int[cageFrames] |
| static int[] | squirrelCageFrameOrange = new int[cageFrames] |
| static int[] | squirrelCageFrameCounterOrange = new int[cageFrames] |
| static int[] | mallardCageFrame = new int[cageFrames] |
| static int[] | mallardCageFrameCounter = new int[cageFrames] |
| static int[] | duckCageFrame = new int[cageFrames] |
| static int[] | duckCageFrameCounter = new int[cageFrames] |
| static int[] | grebeCageFrame = new int[cageFrames] |
| static int[] | grebeCageFrameCounter = new int[cageFrames] |
| static int[] | seagullCageFrame = new int[cageFrames] |
| static int[] | seagullCageFrameCounter = new int[cageFrames] |
| static int[] | birdCageFrame = new int[cageFrames] |
| static int[] | birdCageFrameCounter = new int[cageFrames] |
| static int[] | redBirdCageFrame = new int[cageFrames] |
| static int[] | redBirdCageFrameCounter = new int[cageFrames] |
| static int[] | blueBirdCageFrame = new int[cageFrames] |
| static int[] | blueBirdCageFrameCounter = new int[cageFrames] |
| static int[] | macawCageFrame = new int[cageFrames] |
| static int[] | macawCageFrameCounter = new int[cageFrames] |
| static byte[,] | butterflyCageMode = new byte[9, cageFrames] |
| static int[,] | butterflyCageFrame = new int[9, cageFrames] |
| static int[,] | butterflyCageFrameCounter = new int[9, cageFrames] |
| static int[,] | dragonflyJarFrameCounter = new int[7, cageFrames] |
| static int[,] | dragonflyJarFrame = new int[7, cageFrames] |
| static int[,] | scorpionCageFrame = new int[2, cageFrames] |
| static int[,] | scorpionCageFrameCounter = new int[2, cageFrames] |
| static int[] | snailCageFrame = new int[cageFrames] |
| static int[] | snailCageFrameCounter = new int[cageFrames] |
| static int[] | snail2CageFrame = new int[cageFrames] |
| static int[] | snail2CageFrameCounter = new int[cageFrames] |
| static byte[] | fishBowlFrameMode = new byte[cageFrames] |
| static int[] | fishBowlFrame = new int[cageFrames] |
| static int[] | fishBowlFrameCounter = new int[cageFrames] |
| static int[] | lavaFishBowlFrame = new int[cageFrames] |
| static int[] | lavaFishBowlFrameCounter = new int[cageFrames] |
| static int[] | frogCageFrame = new int[cageFrames] |
| static int[] | frogCageFrameCounter = new int[cageFrames] |
| static int[] | mouseCageFrame = new int[cageFrames] |
| static int[] | mouseCageFrameCounter = new int[cageFrames] |
| static int[] | turtleCageFrame = new int[cageFrames] |
| static int[] | turtleCageFrameCounter = new int[cageFrames] |
| static int[] | fairyJarFrame = new int[cageFrames] |
| static int[] | fairyJarFrameCounter = new int[cageFrames] |
| static byte[,] | jellyfishCageMode = new byte[3, cageFrames] |
| static int[,] | jellyfishCageFrame = new int[3, cageFrames] |
| static int[,] | jellyfishCageFrameCounter = new int[3, cageFrames] |
| static int[] | wormCageFrame = new int[cageFrames] |
| static int[] | wormCageFrameCounter = new int[cageFrames] |
| static int[] | maggotCageFrame = new int[cageFrames] |
| static int[] | maggotCageFrameCounter = new int[cageFrames] |
| static int[] | ratCageFrame = new int[cageFrames] |
| static int[] | ratCageFrameCounter = new int[cageFrames] |
| static int[] | ladybugCageFrame = new int[cageFrames] |
| static int[] | ladybugCageFrameCounter = new int[cageFrames] |
| static int[] | penguinCageFrame = new int[cageFrames] |
| static int[] | penguinCageFrameCounter = new int[cageFrames] |
| static int[] | waterStriderCageFrame = new int[cageFrames] |
| static int[] | waterStriderCageFrameCounter = new int[cageFrames] |
| static int[] | seahorseCageFrame = new int[cageFrames] |
| static int[] | seahorseCageFrameCounter = new int[cageFrames] |
| static int[,] | slugCageFrame = new int[3, cageFrames] |
| static int[,] | slugCageFrameCounter = new int[3, cageFrames] |
| static int[] | owlCageFrame = new int[cageFrames] |
| static int[] | owlCageFrameCounter = new int[cageFrames] |
| static int[] | grasshopperCageFrame = new int[cageFrames] |
| static int[] | grasshopperCageFrameCounter = new int[cageFrames] |
| static bool[] | tileSand = new bool[TileID.Count] |
| static bool[] | tileFlame = new bool[TileID.Count] |
| If true, indicates that a tile has a flame texture that will draw over the tile. Modded tiles should not use this. M:Terraria.ModLoader.ModBlockType.PostDraw(System.Int32,System.Int32,Microsoft.Xna.Framework.Graphics.SpriteBatch) can be used to manually draw a flame texture. | |
| static bool[] | npcCatchable = new bool[NPCID.Count] |
| Used to denote an NPC as being catchable by bug nets and similar. Contrary to its name, this array isn't actually used for catching logic at all. It is instead used to determine if an NPC can be released back into the world after being caught. These NPC will be forced F:Terraria.NPC.friendly for 1.5 seconds if naturally spawned. | |
| static int[] | tileFrame = new int[TileID.Count] |
| static int[] | tileFrameCounter = new int[TileID.Count] |
| static byte[] | wallFrame = new byte[WallID.Count] |
| static byte[] | wallFrameCounter = new byte[WallID.Count] |
| static int[] | backgroundWidth = new int[maxBackgrounds] |
| static int[] | backgroundHeight = new int[maxBackgrounds] |
| static HairstyleUnlocksHelper | Hairstyles = new HairstyleUnlocksHelper() |
| static bool | tilesLoaded = false |
| static WorldMap | Map |
| static Tilemap | tile = new Tilemap((ushort)maxTilesX, (ushort)maxTilesY) |
| static Dust[] | dust = new Dust[6001] |
| static Star[] | star = new Star[400] |
| static Item[] | item = new Item[401] |
| static int[] | timeItemSlotCannotBeReusedFor = new int[401] |
| static NPC[] | npc = new NPC[201] |
| static Gore[] | gore = new Gore[601] |
| static Rain[] | rain = new Rain[maxRain + 1] |
| static Projectile[] | projectile = new Projectile[1001] |
| static int[,] | projectileIdentity = new int[256, 1001] |
| static CombatText[] | combatText = new CombatText[100] |
| static PopupText[] | popupText = new PopupText[20] |
| static Chest[] | chest = new Chest[8000] |
| static Sign[] | sign = new Sign[1000] |
| static int[] | itemFrame = new int[401] |
| static int[] | itemFrameCounter = new int[401] |
| static DrawAnimation[] | itemAnimations = new DrawAnimation[ItemID.Count] |
| static List< int > | itemAnimationsRegistered = new List<int>() |
| static Vector2 | screenPosition |
The position of the top left corner of the screen in world coordinates. Modify in M:Terraria.ModLoader.ModSystem.ModifyScreenPosition or M:Terraria.ModLoader.ModPlayer.ModifyScreenPosition. Also consider using Main.instance.CameraModifiers.Add(CameraModifier); as shown in ExampleMods MinionBossBody for screen shakes.When manually drawing, subtracting Main.screenPosition from the world position of the thing being drawn will result in the correct screen coordinates for use in T:Microsoft.Xna.Framework.Graphics.SpriteBatch.Draw methods. When drawing tiles or walls, an additional offset calculated as Vector2 zero = Main.drawToScreen? Vector2.Zero : new Vector2(Main.offScreenRange, Main.offScreenRange); needs to be added to the coordinates. | |
| static Vector2 | screenLastPosition |
| static int | screenWidth = 1152 |
| static int | screenHeight = 864 |
| static bool | screenMaximized = true |
| static bool | screenBorderless = true |
| static int | screenBorderlessPendingResizes |
| static int | teamNamePlateDistance = 2000 |
| static int | multiplayerNPCSmoothingRange = 300 |
| static bool | Setting_UseReducedMaxLiquids = false |
| static int | PlayerOverheadChatMessageDisplayTime = 400 |
| static object | CurrentInputTextTakerOverride |
| static bool | drawingPlayerChat |
| static bool | chatRelease |
| static string | chatText = "" |
| static bool | inputTextEnter |
| static bool | inputTextEscape |
| static float[] | hotbarScale = new float[10] { 1f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f } |
| static byte | mouseTextColor |
| A value that oscillates between 190 and 255. It is used to drive the slight pulsing color effect seen in much of the text shown in-game. The value is used to create T:Microsoft.Xna.Framework.Colors by passing in this value as either all 4 parameters or just the alpha parameter. P:Terraria.Main.MouseTextColorReal can be used to access the typical pulsing white T:Microsoft.Xna.Framework.Color value. | |
| static int | mouseTextColorChange = 1 |
| static bool | mouseLeftRelease |
| static bool | mouseRightRelease |
| static bool | playerInventory |
| static int | stackSplit |
| static bool | preventStackSplitReset |
| static int | stackCounter |
| static int | timesTriedToFastStack |
| static int | stackDelay = 7 |
| static int | superFastStack |
| static Item | mouseItem = new Item() |
| static Item | guideItem = new Item() |
| static Item | reforgeItem = new Item() |
| static float | inventoryScale = 0.75f |
| static bool | hasFocus |
| static Point | rulerLineDisplayValues = default(Point) |
| static bool | recFastScroll |
| static bool | recBigList |
| static int | recStart |
| static Recipe[] | recipe = new Recipe[Recipe.maxRecipes] |
| static int[] | availableRecipe = new int[Recipe.maxRecipes] |
| static float[] | availableRecipeY = new float[Recipe.maxRecipes] |
| static int | numAvailableRecipes |
| static int | focusRecipe |
| static int | myPlayer |
| The index in F:Terraria.Main.player of this client's Player. If this is 255, this client is the server. | |
| static Player[] | player = new Player[256] |
| static Player[] | playerVisualClone = new Player[256] |
| static bool[] | countsAsHostForGameplay = new bool[256] |
| static int | spawnTileX |
| static int | spawnTileY |
| static bool | npcChatRelease |
| static bool | editSign |
| static bool | editChest |
| static bool | blockInput = false |
| static string | blockKey |
| static string | defaultChestName |
| static string | npcChatText |
| static bool | npcChatFocus1 |
| static bool | npcChatFocus2 |
| static bool | npcChatFocus3 |
| static bool | npcChatFocus4 |
| static int | oldNPCShop |
| static int | npcChatCornerItem |
| static ItemShopSellbackHelper | shopSellbackHelper |
| static int[] | travelShop |
| static List< string > | anglerWhoFinishedToday |
| static bool | anglerQuestFinished |
| static int | anglerQuest |
| static int[] | anglerQuestItemNetIDs |
| static AmbienceServer | AmbienceServer |
| static ItemDropDatabase | ItemDropsDB |
| static BestiaryDatabase | BestiaryDB |
| static ItemDropResolver | ItemDropSolver |
| static BestiaryUnlocksTracker | BestiaryTracker |
| static UIBestiaryTest | BestiaryUI |
| static TeleportPylonsSystem | PylonSystem |
| static ShopHelper | ShopHelper |
| static GolfState | LocalGolfState |
| static DroneCameraTracker | DroneCameraTracker |
| static WorkshopPublishingIndicator | WorkshopPublishingIndicator |
| static IssueReportsIndicator | IssueReporterIndicator |
| static bool | Support4K |
| static float | MinimumZoomComparerX |
| static float | MinimumZoomComparerY |
| static int | LogicCheckScreenWidth |
| static int | LogicCheckScreenHeight |
| static float | temporaryGUIScaleSlider |
| static bool | temporaryGUIScaleSliderUpdate |
| static bool | InGuideCraftMenu |
| static bool | InReforgeMenu |
| static Item | HoverItem |
| static string | motd |
| static bool | toggleFullscreen |
| static int | numDisplayModes |
| static int[] | displayWidth |
| static int[] | displayHeight |
| static bool | gameMenu |
| static bool | menuBGChangedDay |
| static bool | menuBGChangedNight |
| static bool | lockMenuBGChange |
| static List< PlayerFileData > | PlayerList |
| static PlayerFileData | ActivePlayerFileData |
| static Player | PendingPlayer |
| static List< WorldFileData > | WorldList |
| static WorldFileData | ActiveWorldFileData |
| static string | WorldPath |
| static string | CloudWorldPath |
| static string | PlayerPath |
| static string | CloudPlayerPath |
| static Preferences | Configuration |
| static Preferences | InputProfiles |
| static KeyboardState | inputText |
| static KeyboardState | oldInputText |
| static int | PendingResolutionWidth |
| static int | PendingResolutionHeight |
| static bool | PendingBorderlessState |
| static int | invasionType |
| static double | invasionX |
| static int | invasionSize |
| static int | invasionDelay |
| static int | invasionWarn |
| static int | invasionSizeStart |
| static bool | invasionProgressNearInvasion |
| static int | invasionProgressMode |
| static int | invasionProgressIcon |
| static int | invasionProgress |
| static int | invasionProgressMax |
| static int | invasionProgressWave |
| static int | invasionProgressDisplayLeft |
| static float | invasionProgressAlpha |
| static bool | HasInteractibleObjectThatIsNotATile |
| static int[] | npcFrameCount |
| static Dictionary< int, byte > | npcLifeBytes |
| static bool | mouseExit |
| static float | exitScale |
| static bool | mouseReforge |
| static float | reforgeScale |
| static Player | clientPlayer |
| Used internally for network syncing. Use P:Terraria.Main.LocalPlayer to access the player for the local user. | |
| static string | getIP |
| static string | getPort |
| static bool | menuMultiplayer |
| static bool | menuServer |
| static int | netMode |
| Denotes the current network mode: 0 for single player client, 1 for multiplayer client, and 2 for server. Using T:Terraria.ID.NetmodeID entries instead of 0, 1, and 2 will greatly enhance code readability. Modders must properly use netMode to selectively run code. Following examples in ExampleMod and Terraria code as well as reading the Basic Netcode guideare the best way to learn how to use netMode correctly. | |
| const int | MaxTimeout = 120 |
| static int | netPlayCounter |
| static int | lastNPCUpdate |
| static int | lastItemUpdate |
| static int | maxNPCUpdates |
| static int | maxItemUpdates |
| static string | cUp |
| static string | cLeft |
| static string | cDown |
| static string | cRight |
| static string | cJump |
| static string | cThrowItem |
| static string | cHeal |
| static string | cMana |
| static string | cBuff |
| static string | cHook |
| static string | cTorch |
| static string | cInv |
| static string | cSmart |
| static string | cMount |
| static string | cFavoriteKey |
| static bool | cSmartCursorModeIsToggleAndNotHold |
| static bool | SmartCursorWanted_Mouse |
| static bool | SmartCursorWanted_GamePad |
| static bool | SmartCursorShowing |
| static int | SmartCursorX |
| static int | SmartCursorY |
| static bool | SmartInteractShowingGenuine |
| static bool | SmartInteractShowingFake |
| static int | SmartInteractX |
| static int | SmartInteractY |
| static int | SmartInteractNPC |
| static int | SmartInteractProj |
| static bool | SmartInteractPotionOfReturn |
| static List< Point > | SmartInteractTileCoords |
| static List< Point > | SmartInteractTileCoordsSelected |
| static int | TileInteractionLX |
| static int | TileInteractionLY |
| static int | TileInteractionHX |
| static int | TileInteractionHY |
| static int | cursorOverride |
| static int | signHover |
| static string | cMapZoomIn |
| static string | cMapZoomOut |
| static string | cMapAlphaUp |
| static string | cMapAlphaDown |
| static string | cMapFull |
| static string | cMapStyle |
| static Keys | FavoriteKey |
| static ColorSlidersSet | mouseColorSlider |
| static ColorSlidersSet | mouseBorderColorSlider |
| static Color | mouseColor |
| static Color | cursorColor |
| static int | cursorColorDirection |
| static float | cursorAlpha |
| static float | cursorScale |
| static bool | signBubble |
| static int | signX |
| static int | signY |
| static bool | hideUI |
| static bool | releaseUI |
| static FrameSkipMode | FrameSkipMode |
| static bool | terrariasFixedTiming |
| static ParticleRenderer | ParticleSystem_World_OverPlayers |
| static ParticleRenderer | ParticleSystem_World_BehindPlayers |
| static AnchoredEntitiesCollection | sittingManager |
| static AnchoredEntitiesCollection | sleepingManager |
| static MinimapFrameManager | MinimapFrameManagerInstance |
| static PlayerResourceSetsManager | ResourceSetsManager |
| static bool | IsInTheMiddleOfLoadingSettings |
| static Point | LastLoadedResolution |
| static bool | startFullscreen |
| static string | oldStatusText |
| static string | autoGenFileLocation |
| static bool | autoShutdown |
| static bool | fastForwardTimeToDawn |
| static int | sundialCooldown |
| static bool | fastForwardTimeToDusk |
| static int | moondialCooldown |
| static GeneralIssueReporter | IssueReporter |
| static bool | PreventUpdatingTargets |
| static bool | _shouldUseWindyDayMusic |
| static bool | _shouldUseStormMusic |
| static float | ambientWaterfallX |
| static float | ambientWaterfallY |
| static float | ambientWaterfallStrength |
| static float | ambientLavafallX |
| static float | ambientLavafallY |
| static float | ambientLavafallStrength |
| static float | ambientLavaX |
| static float | ambientLavaY |
| static float | ambientLavaStrength |
| static int | ambientCounter |
| static IChatMonitor | chatMonitor |
| static int | ProjectileUpdateLoopIndex |
| static GameTipsDisplay | gameTips |
| static int | weatherVaneBobframe |
| static int | selectedPlayer |
| static int | selectedWorld |
| static int | menuMode |
| static int | menuSkip |
| static Item | tooltipPrefixComparisonItem |
| static string | newWorldName |
| static int[] | specX |
| static int[] | specY |
| static bool | HoveringOverAnNPC |
| static string | hoverItemName |
| static Color | inventoryBack |
| static bool | mouseText |
| static int | rare |
| static int | hairStart |
| static int | selClothes |
| static int | interactedDresserTopLeftX |
| static int | interactedDresserTopLeftY |
| static Player | dresserInterfaceDummy |
| static GameTime | _drawInterfaceGameTime |
| static Color | selColor |
| static int | focusColor |
| static int | colorDelay |
| static int | setKey |
| static int | bgScroll |
| static bool | autoPass |
| static int | menuFocus |
| static float | hBar |
| static float | sBar |
| static float | lBar |
| static float | aBar |
| static bool | blockMouse |
| static float | GamepadCursorAlpha |
| static float | MenuXMovement |
| static float | InitialMapScale |
| static float | MapScale |
| static bool | cancelWormHole |
| static float | lightning |
| static int | thunderDistance |
| static float | atmo |
| static Color | ColorOfTheSkies |
| static List< INeedRenderTargetContent > | ContentThatNeedsRenderTargets |
| static bool | starGame |
| static int | starsHit |
| static double | ladyBugRainBoost |
| static int | DefaultDamageVariationPercent |
| static int | soundError |
| static int | ambientError |
| static bool | mouseMiddle |
| static bool | mouseXButton1 |
| static bool | mouseXButton2 |
| static bool | mouseMiddleRelease |
| static bool | mouseXButton1Release |
| static bool | mouseXButton2Release |
| static Point16 | trashSlotOffset |
| static bool | hidePlayerCraftingMenu |
| static bool | showServerConsole |
| static bool | Support8K |
| static double | desiredWorldEventsUpdateRate |
| static int | worldEventUpdates |
Representation that dictates the actual amount of "world event updates" that happen in a given GAME tick. This number increases/decreases in direct tandem with
. | |
| static List< TitleLinkButton > | tModLoaderTitleLinks |
Protected Attributes | |
| List< Tuple< int, int, ushort > > | DrawWiresSpecialTiles = new List<Tuple<int, int, ushort>>() |
Package Functions | |
| void | DrawLiquid (bool bg=false, int waterStyle=0, float Alpha=1f, bool drawSinglePassLiquids=true) |
| void | InitTMLContentManager () |
Static Package Functions | |
| static void | SetupAllBlockMerge () |
| static void | Initialize_BuffDataFromMountData () |
| static void | OnceFailedLoadingAnAsset (string assetPath, Exception e) |
| static void | UpdateCreativeGameModeOverride () |
| static bool | IsTileSpelunkable (int tileX, int tileY, Tile t) |
| static bool | IsTileSpelunkable (int tileX, int tileY, ushort typeCache, short tileFrameX, short tileFrameY) |
| static bool | IsTileBiomeSightable (int tileX, int tileY, Tile t, ref Color sightColor) |
| static bool | IsTileBiomeSightable (int tileX, int tileY, ushort type, short tileFrameX, short tileFrameY, ref Color sightColor) |
Package Attributes | |
| double | bgParallax |
| int | bgStartX |
| int | bgLoops |
| int | bgTopY |
| int[] | _npcIndexWhoHoldsHeadIndex = new int[NPCHeadID.Count] |
| float | screenOff |
| float | scAdj |
Static Package Attributes | |
| const int | BG_STYLES_COUNT = 14 |
| static UICharacterSelect | _characterSelectMenu = new UICharacterSelect() |
| static UIWorldSelect | _worldSelectMenu = new UIWorldSelect() |
| static float | bgScale |
| static int | bgWidthScaled |
| static Color | ColorOfSurfaceBackgroundsBase |
| static Color | ColorOfSurfaceBackgroundsModified |
Properties | |
| static string | statusText [get, set] |
| static UnifiedRandom | rand [get, set] |
| static bool | CanUpdateGameplay [get, private set] |
| static Vector2 | ViewPosition [get] |
| static Vector2 | ViewSize [get] |
| static Matrix | CurrentWantedZoomMatrix [get] |
| static Matrix | UIScaleMatrix [get] |
| static float | UIScaleWanted [get] |
| static float | UIScale [get, set] |
| float | UIScaleMax [get] |
| static bool | RenderTargetsRequired [get] |
| static bool | IsItRaining [get] |
| static bool | ThickMouse [get] |
| static bool | GamepadDisableCursorItemIcon [get] |
| static string | SavePath [get] |
| static GameModeData | GameModeInfo [get] |
| static int | GameMode [get, set] |
| static bool | specialSeedWorld [get] |
| static bool | masterMode [get] |
| static bool | expertMode [get] |
| static AchievementManager | Achievements [get] |
| static AchievementAdvisor | AchievementAdvisor [get] |
| static ulong | UnpausedUpdateSeed [get, private set] |
| static Effect | screenShader [get] |
| static Effect | pixelShader [get] |
| static Effect | vertexPixelShader [get] |
| static Effect | tileShader [get] |
| static Matrix | Transform [get] |
| static Vector2 | MouseScreen [get] |
| Fetches the position of the mouse cursor on the screen. Useful for making things visually happen near the cursor. | |
| static Vector2 | MouseWorld [get] |
| Fetches the position of the mouse cursor in the world. Useful for making things functionally happen near the cursor, such as projectile or NPC spawns. | |
| static INetDiagnosticsUI | ActiveNetDiagnosticsUI [get] |
| static uint | GameUpdateCount [get] |
| static SamplerState | DefaultSamplerState [get] |
| static int | UnderworldLayer [get] |
| The y-coordinate of the top of the underworld, in tile coordinates. | |
| static float | WindForVisuals [get] |
| static Player | LocalPlayer [get] |
Retrieves the T:Terraria.Player object for the local user. Shorthand for F:Terraria.Main.player[F:Terraria.Main.myPlayer].Many gameplay elements such as recipes, UI, TownNPC chat, and Biome logic are only executed locally, P:Terraria.Main.LocalPlayer is suitable for code relating to those situations. If the hook has a T:Terraria.Player parameter, it is likely not suitable to use P:Terraria.Main.LocalPlayer in it. | |
| static CreativeUnlocksTracker | LocalPlayerCreativeTracker [get] |
| static int | npcShop [get, set] |
| static string | playerPathName [get] |
| static string | worldPathName [get] |
| static bool | SmartCursorWanted [get] |
| static bool | SmartCursorIsUsed [get] |
| static bool | HasSmartInteractTarget [get] |
| static bool | IsItAHappyWindyDay [get] |
| static bool | IsItStorming [get] |
| static bool | WindyEnoughForKiteDrops [get] |
| static bool | ShouldPVPDraw [get] |
| int | RecommendedEquipmentAreaPushUp [get] |
| static bool | ShouldDrawInfoIconsHorizontally [get] |
| static bool | CanShowInfoAccs [get] |
| static Point | ScreenSize [get] |
| static bool | IsGraphicsDeviceAvailable [get] |
| static Color | DiscoColor [get] |
| A color that cycles through the colors like Rainbow Brick does. | |
| static Color | MouseTextColorReal [get] |
| The typical pulsing white color used for much of the text shown in-game. | |
| static bool | PlayerLoaded [get] |
| static Player | CurrentPlayer [get] |
A replacement for Main.LocalPlayer which respects whichever player is currently running hooks on the main thread. This works in the player select screen, and in multiplayer (when other players are updating) | |
Events | |
| static Action | OnEnginePreload |
| static Action< Vector2 > | OnResolutionChanged |
| static Action | OnEngineLoad |
| static Action | OnTickForThirdPartySoftwareOnly |
| static Action | OnTickForInternalCodeOnly |
| static Action< GameTime > | OnPreDraw |
| static Action< GameTime > | OnPostDraw |
| static Action< Vector2, float > | OnPostFullscreenMapDraw |
| static Action | OnRenderTargetsReleased |
| static ResolutionChangeEvent | OnRenderTargetsInitialized |