52402 {
52403
52404
52405
52406
52407
52408
52409
52410
52411
52412
52413
52414
52415
52416
52417
52418
52419
52420
52421
52422
52423
52424
52427 for (int i = 0; i < 200; i++)
52428 {
52429 if (
npc[i].active &&
npc[i].townNPC && !
npc[i].homeless &&
npc[i].homeTileX > 0 &&
npc[i].homeTileY > 0 &&
npc[i].type != 37)
52430 {
52432 }
52433 }
52436 {
52439 if (!
nPC.active || !
nPC.townNPC ||
nPC.homeless ||
nPC.homeTileX <= 0 ||
nPC.homeTileY <= 0 ||
nPC.type == 37)
52440 {
52441 continue;
52442 }
52444 int housingCategory =
nPC.housingCategory;
52445 int homeTileX =
nPC.homeTileX;
52446 int num7 = nPC.homeTileY - 1;
52449 {
52451 }
52454 {
52457 {
52459 }
52460 }
52462 if (
tile[homeTileX,
num7] ==
null)
52463 {
52464 continue;
52465 }
52468 {
52471 {
52472 break;
52473 }
52474 if (
tile[homeTileX,
num7] ==
null)
52475 {
52477 break;
52478 }
52479 }
52481 {
52482 continue;
52483 }
52486 if (
tile[homeTileX,
num7].type == 19)
52487 {
52489 }
52494 SpriteEffects effects = (SpriteEffects)0;
52496 Rectangle
value2 = value.Frame(2, 2);
52498 {
52499 value2.X += value2.Width *
num6;
52500 }
52501 if (housingCategory > 0)
52502 {
52503 value2.Y += value2.Height * housingCategory;
52504 }
52506 {
52510 effects = (SpriteEffects)2;
52512 }
52513 spriteBatch.Draw(value,
new Vector2((
float)(homeTileX * 16 - (
int)
screenPosition.X +
num12),
num3 - (
float)(
int)
screenPosition.Y + (
float)
num13 + (
float)
num2), (Rectangle?)
value2, Lighting.GetColor(homeTileX,
num7), 0
f,
new Vector2((
float)(
value2.Width / 2), (
float)(
value2.Height / 2)), 1
f, effects, 0
f);
52519 {
52520 scale = 24
f /
num4;
52521 }
52522 spriteBatch.Draw(
TextureAssets.
NpcHead[
headIndexSafe].Value,
new Vector2((
float)(homeTileX * 16 - (
int)
screenPosition.X +
num12),
num3 - (
float)(
int)
screenPosition.Y + (
float)
num13 + 2
f), (Rectangle?)
new Rectangle(0, 0,
TextureAssets.
NpcHead[
headIndexSafe].Width(),
TextureAssets.
NpcHead[
headIndexSafe].Height()), Lighting.GetColor(homeTileX,
num7), 0
f,
new Vector2((
float)(
TextureAssets.
NpcHead[
headIndexSafe].Width() / 2), (
float)(
TextureAssets.
NpcHead[
headIndexSafe].Height() / 2)), scale, effects, 0
f);
52524 num7 = (int)
num3 - (
int)screenPosition.Y + 4;
52527 {
52531 {
52535 }
52536 }
52537 }
52538 }
static SlotId PlaySound(in SoundStyle? style, Vector2? position=null, SoundUpdateCallback? updateCallback=null)
Attempts to play a sound style with the provided sound style (if it's not null), and returns a valid ...
static Asset< Texture2D >[] NpcHead
static Asset< Texture2D > HouseBanner
static int GetHeadIndexSafe(NPC npc)
static SpriteBatch spriteBatch
static int myPlayer
The index in F:Terraria.Main.player of this client's Player. If this is 255, this client is the ser...
int NPCBannerSorter(int npcIndex1, int npcIndex2)
static Vector2 screenPosition
The position of the top left corner of the screen in world coordinates. Modify in M:Terraria....
List< int > _occupantsListToDrawNPCHouses
static bool mouseRightRelease
List< int > _npcsWithBannersToDraw
void MouseText(string cursorText, int rare=0, byte diff=0, int hackedMouseX=-1, int hackedMouseY=-1, int hackedScreenWidth=-1, int hackedScreenHeight=-1, int pushWidthX=0)