tModLoader v0.11.8.9
A mod to make and play Terraria mods
Terraria.ModLoader.ProjectileLoader Class Reference

This serves as the central class from which projectile-related functions are carried out. It also stores a list of mod projectiles by ID. More...

+ Collaboration diagram for Terraria.ModLoader.ProjectileLoader:

Classes

class  HookList
 

Static Public Member Functions

static void AI (Projectile projectile)
 
static ? bool CanCutTiles (Projectile projectile)
 
static bool CanDamage (Projectile projectile)
 
static ? bool CanHitNPC (Projectile projectile, NPC target)
 
static bool CanHitPlayer (Projectile projectile, Player target)
 
static bool CanHitPvp (Projectile projectile, Player target)
 
static ? bool CanUseGrapple (int type, Player player)
 
static ? bool Colliding (Projectile projectile, Rectangle projHitbox, Rectangle targetHitbox)
 
static void CutTiles (Projectile projectile)
 
static void DrawHeldProjInFrontOfHeldItemAndArms (Projectile projectile, ref bool flag)
 
static void DrawOffset (Projectile projectile, ref int offsetX, ref int offsetY, ref float originX)
 
static ? Color GetAlpha (Projectile projectile, Color lightColor)
 
static ModProjectile GetProjectile (int type)
 Gets the ModProjectile instance corresponding to the specified type. More...
 
static bool GrappleOutOfRange (float distance, Projectile projectile)
 
static void GrapplePullSpeed (Projectile projectile, Player player, ref float speed)
 
static void GrappleRetreatSpeed (Projectile projectile, Player player, ref float speed)
 
static void GrappleTargetPoint (Projectile projectile, Player player, ref float grappleX, ref float grappleY)
 
static void Kill (Projectile projectile, int timeLeft)
 
static bool MinionContactDamage (Projectile projectile)
 
static void ModifyDamageHitbox (Projectile projectile, ref Rectangle hitbox)
 
static void ModifyHitNPC (Projectile projectile, NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
 
static void ModifyHitPlayer (Projectile projectile, Player target, ref int damage, ref bool crit)
 
static void ModifyHitPvp (Projectile projectile, Player target, ref int damage, ref bool crit)
 
static void NumGrappleHooks (Projectile projectile, Player player, ref int numHooks)
 
static void OnHitNPC (Projectile projectile, NPC target, int damage, float knockback, bool crit)
 
static void OnHitPlayer (Projectile projectile, Player target, int damage, bool crit)
 
static void OnHitPvp (Projectile projectile, Player target, int damage, bool crit)
 
static bool OnTileCollide (Projectile projectile, Vector2 oldVelocity)
 
static void PostAI (Projectile projectile)
 
static void PostDraw (Projectile projectile, SpriteBatch spriteBatch, Color lightColor)
 
static bool PreAI (Projectile projectile)
 
static bool PreDraw (Projectile projectile, SpriteBatch spriteBatch, Color lightColor)
 
static bool PreDrawExtras (Projectile projectile, SpriteBatch spriteBatch)
 
static bool PreKill (Projectile projectile, int timeLeft)
 
static void ProjectileAI (Projectile projectile)
 
static byte[] ReadExtraAI (BinaryReader reader, BitsByte flags)
 
static void ReceiveExtraAI (Projectile projectile, byte[] extraAI)
 
static byte[] SendExtraAI (Projectile projectile, ref BitsByte flags)
 
static bool ShouldUpdatePosition (Projectile projectile)
 
static ? bool SingleGrappleHook (int type, Player player)
 
static bool TileCollideStyle (Projectile projectile, ref int width, ref int height, ref bool fallThrough)
 
static void UseGrapple (Player player, ref int type)
 

Properties

static int ProjectileCount [get]
 

Private Member Functions

delegate void DelegateGrapplePullSpeed (Projectile projectile, Player player, ref float speed)
 
delegate void DelegateGrappleRetreatSpeed (Projectile projectile, Player player, ref float speed)
 
delegate void DelegateGrappleTargetPoint (Projectile projectile, Player player, ref float grappleX, ref float grappleY)
 
delegate void DelegateModifyDamageHitbox (Projectile projectile, ref Rectangle hitbox)
 
delegate void DelegateModifyHitNPC (Projectile projectile, NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
 
delegate void DelegateModifyHitPlayer (Projectile projectile, Player target, ref int damage, ref bool crit)
 
delegate void DelegateModifyHitPvp (Projectile projectile, Player target, ref int damage, ref bool crit)
 
delegate void DelegateNumGrappleHooks (Projectile projectile, Player player, ref int numHooks)
 
delegate bool DelegateTileCollideStyle (Projectile projectile, ref int width, ref int height, ref bool fallThrough)
 
delegate void DelegateUseGrapple (Player player, ref int type)
 

Static Private Member Functions

static HookList AddHook< F > (Expression< Func< GlobalProjectile, F > > func)
 
static bool HasMethod (Type t, string method, params Type[] args)
 

Static Private Attributes

static HookList HookAI = AddHook<Action<Projectile>>(g => g.AI)
 
static HookList HookCanCutTiles = AddHook<Func<Projectile, bool?>>(g => g.CanCutTiles)
 
static HookList HookCanDamage = AddHook<Func<Projectile, bool>>(g => g.CanDamage)
 
static HookList HookCanHitNPC = AddHook<Func<Projectile, NPC, bool?>>(g => g.CanHitNPC)
 
static HookList HookCanHitPlayer = AddHook<Func<Projectile, Player, bool>>(g => g.CanHitPlayer)
 
static HookList HookCanHitPvp = AddHook<Func<Projectile, Player, bool>>(g => g.CanHitPvp)
 
static HookList HookCanUseGrapple = AddHook<Func<int, Player, bool?>>(g => g.CanUseGrapple)
 
static HookList HookColliding = AddHook<Func<Projectile, Rectangle, Rectangle, bool?>>(g => g.Colliding)
 
static HookList HookCutTiles = AddHook<Action<Projectile>>(g => g.CutTiles)
 
static HookList HookDrawBehind = AddHook<Action<Projectile, int, List<int>, List<int>, List<int>, List<int>>>(g => g.DrawBehind)
 
static HookList HookGetAlpha = AddHook<Func<Projectile, Color, Color?>>(g => g.GetAlpha)
 
static HookList HookGrapplePullSpeed = AddHook<DelegateGrapplePullSpeed>(g => g.GrapplePullSpeed)
 
static HookList HookGrappleRetreatSpeed = AddHook<DelegateGrappleRetreatSpeed>(g => g.GrappleRetreatSpeed)
 
static HookList HookGrappleTargetPoint = AddHook<DelegateGrappleTargetPoint>(g => g.GrappleTargetPoint)
 
static HookList HookKill = AddHook<Action<Projectile, int>>(g => g.Kill)
 
static HookList HookMinionContactDamage = AddHook<Func<Projectile, bool>>(g => g.MinionContactDamage)
 
static HookList HookModifyDamageHitbox = AddHook<DelegateModifyDamageHitbox>(g => g.ModifyDamageHitbox)
 
static HookList HookModifyHitNPC = AddHook<DelegateModifyHitNPC>(g => g.ModifyHitNPC)
 
static HookList HookModifyHitPlayer = AddHook<DelegateModifyHitPlayer>(g => g.ModifyHitPlayer)
 
static HookList HookModifyHitPvp = AddHook<DelegateModifyHitPvp>(g => g.ModifyHitPvp)
 
static HookList HookNumGrappleHooks = AddHook<DelegateNumGrappleHooks>(g => g.NumGrappleHooks)
 
static HookList HookOnHitNPC = AddHook<Action<Projectile, NPC, int, float, bool>>(g => g.OnHitNPC)
 
static HookList HookOnHitPlayer = AddHook<Action<Projectile, Player, int, bool>>(g => g.OnHitPlayer)
 
static HookList HookOnHitPvp = AddHook<Action<Projectile, Player, int, bool>>(g => g.OnHitPvp)
 
static HookList HookOnTileCollide = AddHook<Func<Projectile, Vector2, bool>>(g => g.OnTileCollide)
 
static HookList HookPostAI = AddHook<Action<Projectile>>(g => g.PostAI)
 
static HookList HookPostDraw = AddHook<Action<Projectile, SpriteBatch, Color>>(g => g.PostDraw)
 
static HookList HookPreAI = AddHook<Func<Projectile, bool>>(g => g.PreAI)
 
static HookList HookPreDraw = AddHook<Func<Projectile, SpriteBatch, Color, bool>>(g => g.PreDraw)
 
static HookList HookPreDrawExtras = AddHook<Func<Projectile, SpriteBatch, bool>>(g => g.PreDrawExtras)
 
static HookList HookPreKill = AddHook<Func<Projectile, int, bool>>(g => g.PreKill)
 
static List< HookListhooks = new List<HookList>()
 
static HookList HookSetDefaults = AddHook<Action<Projectile>>(g => g.SetDefaults)
 
static HookList HookShouldUpdatePosition = AddHook<Func<Projectile, bool>>(g => g.ShouldUpdatePosition)
 
static HookList HookSingleGrappleHook = AddHook<Func<int, Player, bool?>>(g => g.SingleGrappleHook)
 
static HookList HookTileCollideStyle = AddHook<DelegateTileCollideStyle>(g => g.TileCollideStyle)
 
static HookList HookUseGrapple = AddHook<DelegateUseGrapple>(g => g.UseGrapple)
 
static int nextProjectile = ProjectileID.Count
 

Detailed Description

This serves as the central class from which projectile-related functions are carried out. It also stores a list of mod projectiles by ID.

Definition at line 18 of file ProjectileLoader.cs.

Member Function Documentation

◆ AddHook< F >()

static HookList Terraria.ModLoader.ProjectileLoader.AddHook< F > ( Expression< Func< GlobalProjectile, F > >  func)
staticprivate

Definition at line 39 of file ProjectileLoader.cs.

39 {
40 var hook = new HookList(ModLoader.Method(func));
41 hooks.Add(hook);
42 return hook;
43 }

References Terraria.ModLoader.ProjectileLoader.hooks.

◆ AI()

static void Terraria.ModLoader.ProjectileLoader.AI ( Projectile  projectile)
static

Definition at line 182 of file ProjectileLoader.cs.

182 {
183 projectile.modProjectile?.AI();
184
185 foreach (GlobalProjectile g in HookAI.arr) {
186 g.Instance(projectile).AI(projectile);
187 }
188 }

References Terraria.ModLoader.GlobalProjectile.AI(), Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.ProjectileLoader.HookAI, and Terraria.ModLoader.GlobalProjectile.Instance().

Referenced by Terraria.ModLoader.ProjectileLoader.ProjectileAI().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CanCutTiles()

static ? bool Terraria.ModLoader.ProjectileLoader.CanCutTiles ( Projectile  projectile)
static

Definition at line 283 of file ProjectileLoader.cs.

283 {
284 foreach (GlobalProjectile g in HookCanCutTiles.arr) {
285 bool? canCutTiles = g.Instance(projectile).CanCutTiles(projectile);
286 if (canCutTiles.HasValue) {
287 return canCutTiles.Value;
288 }
289 }
290 return projectile.modProjectile?.CanCutTiles();
291 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.GlobalProjectile.CanCutTiles(), Terraria.ModLoader.ProjectileLoader.HookCanCutTiles, and Terraria.ModLoader.GlobalProjectile.Instance().

+ Here is the call graph for this function:

◆ CanDamage()

static bool Terraria.ModLoader.ProjectileLoader.CanDamage ( Projectile  projectile)
static

Definition at line 327 of file ProjectileLoader.cs.

327 {
328 if (projectile.modProjectile != null && !projectile.modProjectile.CanDamage()) {
329 return false;
330 }
331 foreach (GlobalProjectile g in HookCanDamage.arr) {
332 if (!g.Instance(projectile).CanDamage(projectile)) {
333 return false;
334 }
335 }
336 return true;
337 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.GlobalProjectile.CanDamage(), Terraria.ModLoader.ProjectileLoader.HookCanDamage, and Terraria.ModLoader.GlobalProjectile.Instance().

+ Here is the call graph for this function:

◆ CanHitNPC()

static ? bool Terraria.ModLoader.ProjectileLoader.CanHitNPC ( Projectile  projectile,
NPC  target 
)
static

Definition at line 365 of file ProjectileLoader.cs.

365 {
366 bool? flag = null;
367 foreach (GlobalProjectile g in HookCanHitNPC.arr) {
368 bool? canHit = g.Instance(projectile).CanHitNPC(projectile, target);
369 if (canHit.HasValue && !canHit.Value) {
370 return false;
371 }
372 if (canHit.HasValue) {
373 flag = canHit.Value;
374 }
375 }
376 if (projectile.modProjectile != null) {
377 bool? canHit = projectile.modProjectile.CanHitNPC(target);
378 if (canHit.HasValue && !canHit.Value) {
379 return false;
380 }
381 if (canHit.HasValue) {
382 flag = canHit.Value;
383 }
384 }
385 return flag;
386 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.GlobalProjectile.CanHitNPC(), Terraria.ModLoader.ProjectileLoader.HookCanHitNPC, and Terraria.ModLoader.GlobalProjectile.Instance().

+ Here is the call graph for this function:

◆ CanHitPlayer()

static bool Terraria.ModLoader.ProjectileLoader.CanHitPlayer ( Projectile  projectile,
Player  target 
)
static

Definition at line 446 of file ProjectileLoader.cs.

446 {
447 foreach (GlobalProjectile g in HookCanHitPlayer.arr) {
448 if (!g.Instance(projectile).CanHitPlayer(projectile, target)) {
449 return false;
450 }
451 }
452 if (projectile.modProjectile != null) {
453 return projectile.modProjectile.CanHitPlayer(target);
454 }
455 return true;
456 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.GlobalProjectile.CanHitPlayer(), Terraria.ModLoader.ProjectileLoader.HookCanHitPlayer, and Terraria.ModLoader.GlobalProjectile.Instance().

+ Here is the call graph for this function:

◆ CanHitPvp()

static bool Terraria.ModLoader.ProjectileLoader.CanHitPvp ( Projectile  projectile,
Player  target 
)
static

Definition at line 411 of file ProjectileLoader.cs.

411 {
412 foreach (GlobalProjectile g in HookCanHitPvp.arr) {
413 if (!g.Instance(projectile).CanHitPvp(projectile, target)) {
414 return false;
415 }
416 }
417 if (projectile.modProjectile != null) {
418 return projectile.modProjectile.CanHitPvp(target);
419 }
420 return true;
421 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.GlobalProjectile.CanHitPvp(), Terraria.ModLoader.ProjectileLoader.HookCanHitPvp, and Terraria.ModLoader.GlobalProjectile.Instance().

+ Here is the call graph for this function:

◆ CanUseGrapple()

static ? bool Terraria.ModLoader.ProjectileLoader.CanUseGrapple ( int  type,
Player  player 
)
static

Definition at line 555 of file ProjectileLoader.cs.

555 {
556 var flag = GetProjectile(type)?.CanUseGrapple(player);
557
558 foreach (GlobalProjectile g in HookCanUseGrapple.arr) {
559 bool? canGrapple = g.CanUseGrapple(type, player);
560 if (canGrapple.HasValue) {
561 flag = canGrapple;
562 }
563 }
564 return flag;
565 }
virtual ? bool CanUseGrapple(Player player)
This code is called whenever the player uses a grappling hook that shoots this type of projectile....
static ModProjectile GetProjectile(int type)
Gets the ModProjectile instance corresponding to the specified type.

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.GlobalProjectile.CanUseGrapple(), Terraria.ModLoader.ModProjectile.CanUseGrapple(), Terraria.ModLoader.ProjectileLoader.GetProjectile(), and Terraria.ModLoader.ProjectileLoader.HookCanUseGrapple.

+ Here is the call graph for this function:

◆ Colliding()

static ? bool Terraria.ModLoader.ProjectileLoader.Colliding ( Projectile  projectile,
Rectangle  projHitbox,
Rectangle  targetHitbox 
)
static

Definition at line 481 of file ProjectileLoader.cs.

481 {
482 foreach (GlobalProjectile g in HookColliding.arr) {
483 bool? colliding = g.Instance(projectile).Colliding(projectile, projHitbox, targetHitbox);
484 if (colliding.HasValue) {
485 return colliding.Value;
486 }
487 }
488 return projectile.modProjectile?.Colliding(projHitbox, targetHitbox);
489 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.GlobalProjectile.Colliding(), Terraria.ModLoader.ProjectileLoader.HookColliding, and Terraria.ModLoader.GlobalProjectile.Instance().

+ Here is the call graph for this function:

◆ CutTiles()

static void Terraria.ModLoader.ProjectileLoader.CutTiles ( Projectile  projectile)
static

Definition at line 295 of file ProjectileLoader.cs.

295 {
296 foreach (GlobalProjectile g in HookCutTiles.arr) {
297 g.Instance(projectile).CutTiles(projectile);
298 }
299 projectile.modProjectile?.CutTiles();
300 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.GlobalProjectile.CutTiles(), Terraria.ModLoader.ProjectileLoader.HookCutTiles, and Terraria.ModLoader.GlobalProjectile.Instance().

+ Here is the call graph for this function:

◆ DelegateGrapplePullSpeed()

delegate void Terraria.ModLoader.ProjectileLoader.DelegateGrapplePullSpeed ( Projectile  projectile,
Player  player,
ref float  speed 
)
private

◆ DelegateGrappleRetreatSpeed()

delegate void Terraria.ModLoader.ProjectileLoader.DelegateGrappleRetreatSpeed ( Projectile  projectile,
Player  player,
ref float  speed 
)
private

◆ DelegateGrappleTargetPoint()

delegate void Terraria.ModLoader.ProjectileLoader.DelegateGrappleTargetPoint ( Projectile  projectile,
Player  player,
ref float  grappleX,
ref float  grappleY 
)
private

◆ DelegateModifyDamageHitbox()

delegate void Terraria.ModLoader.ProjectileLoader.DelegateModifyDamageHitbox ( Projectile  projectile,
ref Rectangle  hitbox 
)
private

◆ DelegateModifyHitNPC()

delegate void Terraria.ModLoader.ProjectileLoader.DelegateModifyHitNPC ( Projectile  projectile,
NPC  target,
ref int  damage,
ref float  knockback,
ref bool  crit,
ref int  hitDirection 
)
private

◆ DelegateModifyHitPlayer()

delegate void Terraria.ModLoader.ProjectileLoader.DelegateModifyHitPlayer ( Projectile  projectile,
Player  target,
ref int  damage,
ref bool  crit 
)
private

◆ DelegateModifyHitPvp()

delegate void Terraria.ModLoader.ProjectileLoader.DelegateModifyHitPvp ( Projectile  projectile,
Player  target,
ref int  damage,
ref bool  crit 
)
private

◆ DelegateNumGrappleHooks()

delegate void Terraria.ModLoader.ProjectileLoader.DelegateNumGrappleHooks ( Projectile  projectile,
Player  player,
ref int  numHooks 
)
private

◆ DelegateTileCollideStyle()

delegate bool Terraria.ModLoader.ProjectileLoader.DelegateTileCollideStyle ( Projectile  projectile,
ref int  width,
ref int  height,
ref bool  fallThrough 
)
private

◆ DelegateUseGrapple()

delegate void Terraria.ModLoader.ProjectileLoader.DelegateUseGrapple ( Player  player,
ref int  type 
)
private

◆ DrawHeldProjInFrontOfHeldItemAndArms()

static void Terraria.ModLoader.ProjectileLoader.DrawHeldProjInFrontOfHeldItemAndArms ( Projectile  projectile,
ref bool  flag 
)
static

Definition at line 491 of file ProjectileLoader.cs.

491 {
492 if (projectile.modProjectile != null) {
493 flag = projectile.modProjectile.drawHeldProjInFrontOfHeldItemAndArms;
494 }
495 }

◆ DrawOffset()

static void Terraria.ModLoader.ProjectileLoader.DrawOffset ( Projectile  projectile,
ref int  offsetX,
ref int  offsetY,
ref float  originX 
)
static

Definition at line 509 of file ProjectileLoader.cs.

509 {
510 if (projectile.modProjectile != null) {
511 offsetX = projectile.modProjectile.drawOffsetX;
512 offsetY = -projectile.modProjectile.drawOriginOffsetY;
513 originX += projectile.modProjectile.drawOriginOffsetX;
514 }
515 }

◆ GetAlpha()

static ? Color Terraria.ModLoader.ProjectileLoader.GetAlpha ( Projectile  projectile,
Color  lightColor 
)
static

Definition at line 499 of file ProjectileLoader.cs.

499 {
500 foreach (GlobalProjectile g in HookGetAlpha.arr) {
501 Color? color = g.Instance(projectile).GetAlpha(projectile, lightColor);
502 if (color.HasValue) {
503 return color;
504 }
505 }
506 return projectile.modProjectile?.GetAlpha(lightColor);
507 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.GlobalProjectile.GetAlpha(), Terraria.ModLoader.ProjectileLoader.HookGetAlpha, and Terraria.ModLoader.GlobalProjectile.Instance().

+ Here is the call graph for this function:

◆ GetProjectile()

static ModProjectile Terraria.ModLoader.ProjectileLoader.GetProjectile ( int  type)
static

Gets the ModProjectile instance corresponding to the specified type.

Parameters
typeThe type of the projectile
Returns
The ModProjectile instance in the projectiles array, null if not found.

Definition at line 60 of file ProjectileLoader.cs.

60 {
61 return type >= ProjectileID.Count && type < ProjectileCount ? projectiles[type - ProjectileID.Count] : null;
62 }

References Terraria.ModLoader.ProjectileLoader.ProjectileCount.

Referenced by Terraria.ModLoader.ProjectileLoader.CanUseGrapple(), Terraria.ModLoader.ProjectileLoader.SingleGrappleHook(), and Terraria.ModLoader.ProjectileLoader.UseGrapple().

+ Here is the caller graph for this function:

◆ GrappleOutOfRange()

static bool Terraria.ModLoader.ProjectileLoader.GrappleOutOfRange ( float  distance,
Projectile  projectile 
)
static

Definition at line 592 of file ProjectileLoader.cs.

592 {
593 return distance > projectile.modProjectile?.GrappleRange();
594 }

◆ GrapplePullSpeed()

static void Terraria.ModLoader.ProjectileLoader.GrapplePullSpeed ( Projectile  projectile,
Player  player,
ref float  speed 
)
static

Definition at line 621 of file ProjectileLoader.cs.

621 {
622 projectile.modProjectile?.GrapplePullSpeed(player, ref speed);
623
624 foreach (GlobalProjectile g in HookGrapplePullSpeed.arr) {
625 g.Instance(projectile).GrapplePullSpeed(projectile, player, ref speed);
626 }
627 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.GlobalProjectile.GrapplePullSpeed(), Terraria.ModLoader.ProjectileLoader.HookGrapplePullSpeed, and Terraria.ModLoader.GlobalProjectile.Instance().

+ Here is the call graph for this function:

◆ GrappleRetreatSpeed()

static void Terraria.ModLoader.ProjectileLoader.GrappleRetreatSpeed ( Projectile  projectile,
Player  player,
ref float  speed 
)
static

Definition at line 610 of file ProjectileLoader.cs.

610 {
611 projectile.modProjectile?.GrappleRetreatSpeed(player, ref speed);
612
613 foreach (GlobalProjectile g in HookGrappleRetreatSpeed.arr) {
614 g.Instance(projectile).GrappleRetreatSpeed(projectile, player, ref speed);
615 }
616 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.GlobalProjectile.GrappleRetreatSpeed(), Terraria.ModLoader.ProjectileLoader.HookGrappleRetreatSpeed, and Terraria.ModLoader.GlobalProjectile.Instance().

+ Here is the call graph for this function:

◆ GrappleTargetPoint()

static void Terraria.ModLoader.ProjectileLoader.GrappleTargetPoint ( Projectile  projectile,
Player  player,
ref float  grappleX,
ref float  grappleY 
)
static

Definition at line 632 of file ProjectileLoader.cs.

632 {
633 projectile.modProjectile?.GrappleTargetPoint(player, ref grappleX, ref grappleY);
634
635 foreach(GlobalProjectile g in HookGrappleTargetPoint.arr) {
636 g.Instance(projectile).GrappleTargetPoint(projectile, player, ref grappleX, ref grappleY);
637 }
638 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.GlobalProjectile.GrappleTargetPoint(), Terraria.ModLoader.ProjectileLoader.HookGrappleTargetPoint, and Terraria.ModLoader.GlobalProjectile.Instance().

+ Here is the call graph for this function:

◆ HasMethod()

static bool Terraria.ModLoader.ProjectileLoader.HasMethod ( Type  t,
string  method,
params Type[]  args 
)
staticprivate

Definition at line 650 of file ProjectileLoader.cs.

650 {
651 return t.GetMethod(method, args).DeclaringType != typeof(GlobalProjectile);
652 }

◆ Kill()

static void Terraria.ModLoader.ProjectileLoader.Kill ( Projectile  projectile,
int  timeLeft 
)
static

Definition at line 317 of file ProjectileLoader.cs.

317 {
318 projectile.modProjectile?.Kill(timeLeft);
319
320 foreach (GlobalProjectile g in HookKill.arr) {
321 g.Instance(projectile).Kill(projectile, timeLeft);
322 }
323 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.ProjectileLoader.HookKill, Terraria.ModLoader.GlobalProjectile.Instance(), and Terraria.ModLoader.GlobalProjectile.Kill().

+ Here is the call graph for this function:

◆ MinionContactDamage()

static bool Terraria.ModLoader.ProjectileLoader.MinionContactDamage ( Projectile  projectile)
static

Definition at line 341 of file ProjectileLoader.cs.

341 {
342 if (projectile.modProjectile != null && projectile.modProjectile.MinionContactDamage()) {
343 return true;
344 }
345 foreach (GlobalProjectile g in HookMinionContactDamage.arr) {
346 if (g.Instance(projectile).MinionContactDamage(projectile)) {
347 return true;
348 }
349 }
350 return false;
351 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.ProjectileLoader.HookMinionContactDamage, Terraria.ModLoader.GlobalProjectile.Instance(), and Terraria.ModLoader.GlobalProjectile.MinionContactDamage().

+ Here is the call graph for this function:

◆ ModifyDamageHitbox()

static void Terraria.ModLoader.ProjectileLoader.ModifyDamageHitbox ( Projectile  projectile,
ref Rectangle  hitbox 
)
static

Definition at line 356 of file ProjectileLoader.cs.

356 {
357 projectile.modProjectile?.ModifyDamageHitbox(ref hitbox);
358 foreach (GlobalProjectile g in HookModifyDamageHitbox.arr) {
359 g.Instance(projectile).ModifyDamageHitbox(projectile, ref hitbox);
360 }
361 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.ProjectileLoader.HookModifyDamageHitbox, Terraria.ModLoader.GlobalProjectile.Instance(), and Terraria.ModLoader.GlobalProjectile.ModifyDamageHitbox().

+ Here is the call graph for this function:

◆ ModifyHitNPC()

static void Terraria.ModLoader.ProjectileLoader.ModifyHitNPC ( Projectile  projectile,
NPC  target,
ref int  damage,
ref float  knockback,
ref bool  crit,
ref int  hitDirection 
)
static

Definition at line 391 of file ProjectileLoader.cs.

391 {
392 projectile.modProjectile?.ModifyHitNPC(target, ref damage, ref knockback, ref crit, ref hitDirection);
393
394 foreach (GlobalProjectile g in HookModifyHitNPC.arr) {
395 g.Instance(projectile).ModifyHitNPC(projectile, target, ref damage, ref knockback, ref crit, ref hitDirection);
396 }
397 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.ProjectileLoader.HookModifyHitNPC, Terraria.ModLoader.GlobalProjectile.Instance(), and Terraria.ModLoader.GlobalProjectile.ModifyHitNPC().

+ Here is the call graph for this function:

◆ ModifyHitPlayer()

static void Terraria.ModLoader.ProjectileLoader.ModifyHitPlayer ( Projectile  projectile,
Player  target,
ref int  damage,
ref bool  crit 
)
static

Definition at line 461 of file ProjectileLoader.cs.

461 {
462 projectile.modProjectile?.ModifyHitPlayer(target, ref damage, ref crit);
463
464 foreach (GlobalProjectile g in HookModifyHitPlayer.arr) {
465 g.Instance(projectile).ModifyHitPlayer(projectile, target, ref damage, ref crit);
466 }
467 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.ProjectileLoader.HookModifyHitPlayer, Terraria.ModLoader.GlobalProjectile.Instance(), and Terraria.ModLoader.GlobalProjectile.ModifyHitPlayer().

+ Here is the call graph for this function:

◆ ModifyHitPvp()

static void Terraria.ModLoader.ProjectileLoader.ModifyHitPvp ( Projectile  projectile,
Player  target,
ref int  damage,
ref bool  crit 
)
static

Definition at line 426 of file ProjectileLoader.cs.

426 {
427 projectile.modProjectile?.ModifyHitPvp(target, ref damage, ref crit);
428
429 foreach (GlobalProjectile g in HookModifyHitPvp.arr) {
430 g.Instance(projectile).ModifyHitPvp(projectile, target, ref damage, ref crit);
431 }
432 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.ProjectileLoader.HookModifyHitPvp, Terraria.ModLoader.GlobalProjectile.Instance(), and Terraria.ModLoader.GlobalProjectile.ModifyHitPvp().

+ Here is the call graph for this function:

◆ NumGrappleHooks()

static void Terraria.ModLoader.ProjectileLoader.NumGrappleHooks ( Projectile  projectile,
Player  player,
ref int  numHooks 
)
static

Definition at line 599 of file ProjectileLoader.cs.

599 {
600 projectile.modProjectile?.NumGrappleHooks(player, ref numHooks);
601
602 foreach (GlobalProjectile g in HookNumGrappleHooks.arr) {
603 g.Instance(projectile).NumGrappleHooks(projectile, player, ref numHooks);
604 }
605 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.ProjectileLoader.HookNumGrappleHooks, Terraria.ModLoader.GlobalProjectile.Instance(), and Terraria.ModLoader.GlobalProjectile.NumGrappleHooks().

+ Here is the call graph for this function:

◆ OnHitNPC()

static void Terraria.ModLoader.ProjectileLoader.OnHitNPC ( Projectile  projectile,
NPC  target,
int  damage,
float  knockback,
bool  crit 
)
static

Definition at line 401 of file ProjectileLoader.cs.

401 {
402 projectile.modProjectile?.OnHitNPC(target, damage, knockback, crit);
403
404 foreach (GlobalProjectile g in HookOnHitNPC.arr) {
405 g.Instance(projectile).OnHitNPC(projectile, target, damage, knockback, crit);
406 }
407 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.ProjectileLoader.HookOnHitNPC, Terraria.ModLoader.GlobalProjectile.Instance(), and Terraria.ModLoader.GlobalProjectile.OnHitNPC().

+ Here is the call graph for this function:

◆ OnHitPlayer()

static void Terraria.ModLoader.ProjectileLoader.OnHitPlayer ( Projectile  projectile,
Player  target,
int  damage,
bool  crit 
)
static

Definition at line 471 of file ProjectileLoader.cs.

471 {
472 projectile.modProjectile?.OnHitPlayer(target, damage, crit);
473
474 foreach (GlobalProjectile g in HookOnHitPlayer.arr) {
475 g.Instance(projectile).OnHitPlayer(projectile, target, damage, crit);
476 }
477 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.ProjectileLoader.HookOnHitPlayer, Terraria.ModLoader.GlobalProjectile.Instance(), and Terraria.ModLoader.GlobalProjectile.OnHitPlayer().

+ Here is the call graph for this function:

◆ OnHitPvp()

static void Terraria.ModLoader.ProjectileLoader.OnHitPvp ( Projectile  projectile,
Player  target,
int  damage,
bool  crit 
)
static

Definition at line 436 of file ProjectileLoader.cs.

436 {
437 projectile.modProjectile?.OnHitPvp(target, damage, crit);
438
439 foreach (GlobalProjectile g in HookOnHitPvp.arr) {
440 g.Instance(projectile).OnHitPvp(projectile, target, damage, crit);
441 }
442 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.ProjectileLoader.HookOnHitPvp, Terraria.ModLoader.GlobalProjectile.Instance(), and Terraria.ModLoader.GlobalProjectile.OnHitPvp().

+ Here is the call graph for this function:

◆ OnTileCollide()

static bool Terraria.ModLoader.ProjectileLoader.OnTileCollide ( Projectile  projectile,
Vector2  oldVelocity 
)
static

Definition at line 270 of file ProjectileLoader.cs.

270 {
271 bool result = true;
272 foreach (GlobalProjectile g in HookOnTileCollide.arr) {
273 result &= g.Instance(projectile).OnTileCollide(projectile, oldVelocity);
274 }
275 if (result && projectile.modProjectile != null) {
276 return projectile.modProjectile.OnTileCollide(oldVelocity);
277 }
278 return result;
279 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.ProjectileLoader.HookOnTileCollide, Terraria.ModLoader.GlobalProjectile.Instance(), and Terraria.ModLoader.GlobalProjectile.OnTileCollide().

+ Here is the call graph for this function:

◆ PostAI()

static void Terraria.ModLoader.ProjectileLoader.PostAI ( Projectile  projectile)
static

Definition at line 192 of file ProjectileLoader.cs.

192 {
193 projectile.modProjectile?.PostAI();
194
195 foreach (GlobalProjectile g in HookPostAI.arr) {
196 g.Instance(projectile).PostAI(projectile);
197 }
198 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.ProjectileLoader.HookPostAI, Terraria.ModLoader.GlobalProjectile.Instance(), and Terraria.ModLoader.GlobalProjectile.PostAI().

Referenced by Terraria.ModLoader.ProjectileLoader.ProjectileAI().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PostDraw()

static void Terraria.ModLoader.ProjectileLoader.PostDraw ( Projectile  projectile,
SpriteBatch  spriteBatch,
Color  lightColor 
)
static

Definition at line 545 of file ProjectileLoader.cs.

545 {
546 projectile.modProjectile?.PostDraw(spriteBatch, lightColor);
547
548 foreach (GlobalProjectile g in HookPostDraw.arr) {
549 g.Instance(projectile).PostDraw(projectile, spriteBatch, lightColor);
550 }
551 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.ProjectileLoader.HookPostDraw, Terraria.ModLoader.GlobalProjectile.Instance(), and Terraria.ModLoader.GlobalProjectile.PostDraw().

+ Here is the call graph for this function:

◆ PreAI()

static bool Terraria.ModLoader.ProjectileLoader.PreAI ( Projectile  projectile)
static

Definition at line 169 of file ProjectileLoader.cs.

169 {
170 bool result = true;
171 foreach (GlobalProjectile g in HookPreAI.arr) {
172 result &= g.Instance(projectile).PreAI(projectile);
173 }
174 if (result && projectile.modProjectile != null) {
175 return projectile.modProjectile.PreAI();
176 }
177 return result;
178 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.ProjectileLoader.HookPreAI, Terraria.ModLoader.GlobalProjectile.Instance(), and Terraria.ModLoader.GlobalProjectile.PreAI().

Referenced by Terraria.ModLoader.ProjectileLoader.ProjectileAI().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PreDraw()

static bool Terraria.ModLoader.ProjectileLoader.PreDraw ( Projectile  projectile,
SpriteBatch  spriteBatch,
Color  lightColor 
)
static

Definition at line 532 of file ProjectileLoader.cs.

532 {
533 bool result = true;
534 foreach (GlobalProjectile g in HookPreDraw.arr) {
535 result &= g.Instance(projectile).PreDraw(projectile, spriteBatch, lightColor);
536 }
537 if (result && projectile.modProjectile != null) {
538 return projectile.modProjectile.PreDraw(spriteBatch, lightColor);
539 }
540 return result;
541 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.ProjectileLoader.HookPreDraw, Terraria.ModLoader.GlobalProjectile.Instance(), and Terraria.ModLoader.GlobalProjectile.PreDraw().

+ Here is the call graph for this function:

◆ PreDrawExtras()

static bool Terraria.ModLoader.ProjectileLoader.PreDrawExtras ( Projectile  projectile,
SpriteBatch  spriteBatch 
)
static

Definition at line 519 of file ProjectileLoader.cs.

519 {
520 bool result = true;
521 foreach (GlobalProjectile g in HookPreDrawExtras.arr) {
522 result &= g.Instance(projectile).PreDrawExtras(projectile, spriteBatch);
523 }
524 if (result && projectile.modProjectile != null) {
525 return projectile.modProjectile.PreDrawExtras(spriteBatch);
526 }
527 return result;
528 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.ProjectileLoader.HookPreDrawExtras, Terraria.ModLoader.GlobalProjectile.Instance(), and Terraria.ModLoader.GlobalProjectile.PreDrawExtras().

+ Here is the call graph for this function:

◆ PreKill()

static bool Terraria.ModLoader.ProjectileLoader.PreKill ( Projectile  projectile,
int  timeLeft 
)
static

Definition at line 304 of file ProjectileLoader.cs.

304 {
305 bool result = true;
306 foreach (GlobalProjectile g in HookPreKill.arr) {
307 result &= g.Instance(projectile).PreKill(projectile, timeLeft);
308 }
309 if (result && projectile.modProjectile != null) {
310 return projectile.modProjectile.PreKill(timeLeft);
311 }
312 return result;
313 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.ProjectileLoader.HookPreKill, Terraria.ModLoader.GlobalProjectile.Instance(), and Terraria.ModLoader.GlobalProjectile.PreKill().

+ Here is the call graph for this function:

◆ ProjectileAI()

static void Terraria.ModLoader.ProjectileLoader.ProjectileAI ( Projectile  projectile)
static

Definition at line 151 of file ProjectileLoader.cs.

151 {
152 if (PreAI(projectile)) {
153 int type = projectile.type;
154 bool useAiType = projectile.modProjectile != null && projectile.modProjectile.aiType > 0;
155 if (useAiType) {
156 projectile.type = projectile.modProjectile.aiType;
157 }
158 projectile.VanillaAI();
159 if (useAiType) {
160 projectile.type = type;
161 }
162 AI(projectile);
163 }
164 PostAI(projectile);
165 }
static void PostAI(Projectile projectile)
static bool PreAI(Projectile projectile)
static void AI(Projectile projectile)

References Terraria.ModLoader.ProjectileLoader.AI(), Terraria.ModLoader.ProjectileLoader.PostAI(), and Terraria.ModLoader.ProjectileLoader.PreAI().

+ Here is the call graph for this function:

◆ ReadExtraAI()

static byte[] Terraria.ModLoader.ProjectileLoader.ReadExtraAI ( BinaryReader  reader,
BitsByte  flags 
)
static

Definition at line 220 of file ProjectileLoader.cs.

220 {
221 if (flags[Projectile.maxAI + 1]) {
222 return reader.ReadBytes(reader.ReadByte());
223 }
224 return new byte[0];
225 }

◆ ReceiveExtraAI()

static void Terraria.ModLoader.ProjectileLoader.ReceiveExtraAI ( Projectile  projectile,
byte[]  extraAI 
)
static

Definition at line 228 of file ProjectileLoader.cs.

228 {
229 if (extraAI.Length > 0 && projectile.modProjectile != null) {
230 using (MemoryStream stream = new MemoryStream(extraAI)) {
231 using (BinaryReader reader = new BinaryReader(stream)) {
232 projectile.modProjectile.ReceiveExtraAI(reader);
233 }
234 }
235 }
236 }

◆ SendExtraAI()

static byte[] Terraria.ModLoader.ProjectileLoader.SendExtraAI ( Projectile  projectile,
ref BitsByte  flags 
)
static

Definition at line 201 of file ProjectileLoader.cs.

201 {
202 if (projectile.modProjectile != null) {
203 byte[] data;
204 using (MemoryStream stream = new MemoryStream()) {
205 using (BinaryWriter modWriter = new BinaryWriter(stream)) {
206 projectile.modProjectile.SendExtraAI(modWriter);
207 modWriter.Flush();
208 data = stream.ToArray();
209 }
210 }
211 if (data.Length > 0) {
212 flags[Projectile.maxAI + 1] = true;
213 }
214 return data;
215 }
216 return new byte[0];
217 }

◆ ShouldUpdatePosition()

static bool Terraria.ModLoader.ProjectileLoader.ShouldUpdatePosition ( Projectile  projectile)
static

Definition at line 240 of file ProjectileLoader.cs.

240 {
241 if (IsModProjectile(projectile) && !projectile.modProjectile.ShouldUpdatePosition()) {
242 return false;
243 }
244 foreach (GlobalProjectile g in HookShouldUpdatePosition.arr) {
245 if (!g.Instance(projectile).ShouldUpdatePosition(projectile)) {
246 return false;
247 }
248 }
249 return true;
250 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.ProjectileLoader.HookShouldUpdatePosition, Terraria.ModLoader.GlobalProjectile.Instance(), and Terraria.ModLoader.GlobalProjectile.ShouldUpdatePosition().

+ Here is the call graph for this function:

◆ SingleGrappleHook()

static ? bool Terraria.ModLoader.ProjectileLoader.SingleGrappleHook ( int  type,
Player  player 
)
static

Definition at line 569 of file ProjectileLoader.cs.

569 {
570 bool? flag = GetProjectile(type)?.SingleGrappleHook(player);
571
572 foreach (GlobalProjectile g in HookSingleGrappleHook.arr) {
573 bool? singleHook = g.SingleGrappleHook(type, player);
574 if (singleHook.HasValue) {
575 flag = singleHook;
576 }
577 }
578 return flag;
579 }
virtual ? bool SingleGrappleHook(Player player)
Whether or not a grappling hook can only have one hook per player in the world at a time....

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.ProjectileLoader.GetProjectile(), Terraria.ModLoader.ProjectileLoader.HookSingleGrappleHook, Terraria.ModLoader.GlobalProjectile.SingleGrappleHook(), and Terraria.ModLoader.ModProjectile.SingleGrappleHook().

+ Here is the call graph for this function:

◆ TileCollideStyle()

static bool Terraria.ModLoader.ProjectileLoader.TileCollideStyle ( Projectile  projectile,
ref int  width,
ref int  height,
ref bool  fallThrough 
)
static

Definition at line 255 of file ProjectileLoader.cs.

255 {
256 if (IsModProjectile(projectile) && !projectile.modProjectile.TileCollideStyle(ref width, ref height, ref fallThrough)) {
257 return false;
258 }
259
260 foreach (GlobalProjectile g in HookTileCollideStyle.arr) {
261 if (!g.Instance(projectile).TileCollideStyle(projectile, ref width, ref height, ref fallThrough)) {
262 return false;
263 }
264 }
265 return true;
266 }

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.ProjectileLoader.HookTileCollideStyle, Terraria.ModLoader.GlobalProjectile.Instance(), and Terraria.ModLoader.GlobalProjectile.TileCollideStyle().

+ Here is the call graph for this function:

◆ UseGrapple()

static void Terraria.ModLoader.ProjectileLoader.UseGrapple ( Player  player,
ref int  type 
)
static

Definition at line 584 of file ProjectileLoader.cs.

584 {
585 GetProjectile(type)?.UseGrapple(player, ref type);
586
587 foreach (GlobalProjectile g in HookUseGrapple.arr) {
588 g.UseGrapple(player, ref type);
589 }
590 }
virtual void UseGrapple(Player player, ref int type)
This code is called whenever the player uses a grappling hook that shoots this type of projectile....

References Terraria.ModLoader.ProjectileLoader.HookList.arr, Terraria.ModLoader.ProjectileLoader.GetProjectile(), Terraria.ModLoader.ProjectileLoader.HookUseGrapple, Terraria.ModLoader.GlobalProjectile.UseGrapple(), and Terraria.ModLoader.ModProjectile.UseGrapple().

+ Here is the call graph for this function:

Member Data Documentation

◆ HookAI

HookList Terraria.ModLoader.ProjectileLoader.HookAI = AddHook<Action<Projectile>>(g => g.AI)
staticprivate

Definition at line 180 of file ProjectileLoader.cs.

Referenced by Terraria.ModLoader.ProjectileLoader.AI().

◆ HookCanCutTiles

HookList Terraria.ModLoader.ProjectileLoader.HookCanCutTiles = AddHook<Func<Projectile, bool?>>(g => g.CanCutTiles)
staticprivate

◆ HookCanDamage

HookList Terraria.ModLoader.ProjectileLoader.HookCanDamage = AddHook<Func<Projectile, bool>>(g => g.CanDamage)
staticprivate

Definition at line 325 of file ProjectileLoader.cs.

Referenced by Terraria.ModLoader.ProjectileLoader.CanDamage().

◆ HookCanHitNPC

HookList Terraria.ModLoader.ProjectileLoader.HookCanHitNPC = AddHook<Func<Projectile, NPC, bool?>>(g => g.CanHitNPC)
staticprivate

Definition at line 363 of file ProjectileLoader.cs.

Referenced by Terraria.ModLoader.ProjectileLoader.CanHitNPC().

◆ HookCanHitPlayer

HookList Terraria.ModLoader.ProjectileLoader.HookCanHitPlayer = AddHook<Func<Projectile, Player, bool>>(g => g.CanHitPlayer)
staticprivate

◆ HookCanHitPvp

HookList Terraria.ModLoader.ProjectileLoader.HookCanHitPvp = AddHook<Func<Projectile, Player, bool>>(g => g.CanHitPvp)
staticprivate

Definition at line 409 of file ProjectileLoader.cs.

Referenced by Terraria.ModLoader.ProjectileLoader.CanHitPvp().

◆ HookCanUseGrapple

HookList Terraria.ModLoader.ProjectileLoader.HookCanUseGrapple = AddHook<Func<int, Player, bool?>>(g => g.CanUseGrapple)
staticprivate

◆ HookColliding

HookList Terraria.ModLoader.ProjectileLoader.HookColliding = AddHook<Func<Projectile, Rectangle, Rectangle, bool?>>(g => g.Colliding)
staticprivate

Definition at line 479 of file ProjectileLoader.cs.

Referenced by Terraria.ModLoader.ProjectileLoader.Colliding().

◆ HookCutTiles

HookList Terraria.ModLoader.ProjectileLoader.HookCutTiles = AddHook<Action<Projectile>>(g => g.CutTiles)
staticprivate

Definition at line 293 of file ProjectileLoader.cs.

Referenced by Terraria.ModLoader.ProjectileLoader.CutTiles().

◆ HookDrawBehind

HookList Terraria.ModLoader.ProjectileLoader.HookDrawBehind = AddHook<Action<Projectile, int, List<int>, List<int>, List<int>, List<int>>>(g => g.DrawBehind)
staticprivate

Definition at line 640 of file ProjectileLoader.cs.

◆ HookGetAlpha

HookList Terraria.ModLoader.ProjectileLoader.HookGetAlpha = AddHook<Func<Projectile, Color, Color?>>(g => g.GetAlpha)
staticprivate

Definition at line 497 of file ProjectileLoader.cs.

Referenced by Terraria.ModLoader.ProjectileLoader.GetAlpha().

◆ HookGrapplePullSpeed

HookList Terraria.ModLoader.ProjectileLoader.HookGrapplePullSpeed = AddHook<DelegateGrapplePullSpeed>(g => g.GrapplePullSpeed)
staticprivate

◆ HookGrappleRetreatSpeed

HookList Terraria.ModLoader.ProjectileLoader.HookGrappleRetreatSpeed = AddHook<DelegateGrappleRetreatSpeed>(g => g.GrappleRetreatSpeed)
staticprivate

◆ HookGrappleTargetPoint

HookList Terraria.ModLoader.ProjectileLoader.HookGrappleTargetPoint = AddHook<DelegateGrappleTargetPoint>(g => g.GrappleTargetPoint)
staticprivate

◆ HookKill

HookList Terraria.ModLoader.ProjectileLoader.HookKill = AddHook<Action<Projectile, int>>(g => g.Kill)
staticprivate

Definition at line 315 of file ProjectileLoader.cs.

Referenced by Terraria.ModLoader.ProjectileLoader.Kill().

◆ HookMinionContactDamage

HookList Terraria.ModLoader.ProjectileLoader.HookMinionContactDamage = AddHook<Func<Projectile, bool>>(g => g.MinionContactDamage)
staticprivate

◆ HookModifyDamageHitbox

HookList Terraria.ModLoader.ProjectileLoader.HookModifyDamageHitbox = AddHook<DelegateModifyDamageHitbox>(g => g.ModifyDamageHitbox)
staticprivate

◆ HookModifyHitNPC

HookList Terraria.ModLoader.ProjectileLoader.HookModifyHitNPC = AddHook<DelegateModifyHitNPC>(g => g.ModifyHitNPC)
staticprivate

◆ HookModifyHitPlayer

HookList Terraria.ModLoader.ProjectileLoader.HookModifyHitPlayer = AddHook<DelegateModifyHitPlayer>(g => g.ModifyHitPlayer)
staticprivate

◆ HookModifyHitPvp

HookList Terraria.ModLoader.ProjectileLoader.HookModifyHitPvp = AddHook<DelegateModifyHitPvp>(g => g.ModifyHitPvp)
staticprivate

◆ HookNumGrappleHooks

HookList Terraria.ModLoader.ProjectileLoader.HookNumGrappleHooks = AddHook<DelegateNumGrappleHooks>(g => g.NumGrappleHooks)
staticprivate

◆ HookOnHitNPC

HookList Terraria.ModLoader.ProjectileLoader.HookOnHitNPC = AddHook<Action<Projectile, NPC, int, float, bool>>(g => g.OnHitNPC)
staticprivate

Definition at line 399 of file ProjectileLoader.cs.

Referenced by Terraria.ModLoader.ProjectileLoader.OnHitNPC().

◆ HookOnHitPlayer

HookList Terraria.ModLoader.ProjectileLoader.HookOnHitPlayer = AddHook<Action<Projectile, Player, int, bool>>(g => g.OnHitPlayer)
staticprivate

◆ HookOnHitPvp

HookList Terraria.ModLoader.ProjectileLoader.HookOnHitPvp = AddHook<Action<Projectile, Player, int, bool>>(g => g.OnHitPvp)
staticprivate

Definition at line 434 of file ProjectileLoader.cs.

Referenced by Terraria.ModLoader.ProjectileLoader.OnHitPvp().

◆ HookOnTileCollide

HookList Terraria.ModLoader.ProjectileLoader.HookOnTileCollide = AddHook<Func<Projectile, Vector2, bool>>(g => g.OnTileCollide)
staticprivate

◆ HookPostAI

HookList Terraria.ModLoader.ProjectileLoader.HookPostAI = AddHook<Action<Projectile>>(g => g.PostAI)
staticprivate

Definition at line 190 of file ProjectileLoader.cs.

Referenced by Terraria.ModLoader.ProjectileLoader.PostAI().

◆ HookPostDraw

HookList Terraria.ModLoader.ProjectileLoader.HookPostDraw = AddHook<Action<Projectile, SpriteBatch, Color>>(g => g.PostDraw)
staticprivate

Definition at line 543 of file ProjectileLoader.cs.

Referenced by Terraria.ModLoader.ProjectileLoader.PostDraw().

◆ HookPreAI

HookList Terraria.ModLoader.ProjectileLoader.HookPreAI = AddHook<Func<Projectile, bool>>(g => g.PreAI)
staticprivate

Definition at line 167 of file ProjectileLoader.cs.

Referenced by Terraria.ModLoader.ProjectileLoader.PreAI().

◆ HookPreDraw

HookList Terraria.ModLoader.ProjectileLoader.HookPreDraw = AddHook<Func<Projectile, SpriteBatch, Color, bool>>(g => g.PreDraw)
staticprivate

Definition at line 530 of file ProjectileLoader.cs.

Referenced by Terraria.ModLoader.ProjectileLoader.PreDraw().

◆ HookPreDrawExtras

HookList Terraria.ModLoader.ProjectileLoader.HookPreDrawExtras = AddHook<Func<Projectile, SpriteBatch, bool>>(g => g.PreDrawExtras)
staticprivate

◆ HookPreKill

HookList Terraria.ModLoader.ProjectileLoader.HookPreKill = AddHook<Func<Projectile, int, bool>>(g => g.PreKill)
staticprivate

Definition at line 302 of file ProjectileLoader.cs.

Referenced by Terraria.ModLoader.ProjectileLoader.PreKill().

◆ hooks

List<HookList> Terraria.ModLoader.ProjectileLoader.hooks = new List<HookList>()
staticprivate

◆ HookSetDefaults

HookList Terraria.ModLoader.ProjectileLoader.HookSetDefaults = AddHook<Action<Projectile>>(g => g.SetDefaults)
staticprivate

Definition at line 128 of file ProjectileLoader.cs.

◆ HookShouldUpdatePosition

HookList Terraria.ModLoader.ProjectileLoader.HookShouldUpdatePosition = AddHook<Func<Projectile, bool>>(g => g.ShouldUpdatePosition)
staticprivate

◆ HookSingleGrappleHook

HookList Terraria.ModLoader.ProjectileLoader.HookSingleGrappleHook = AddHook<Func<int, Player, bool?>>(g => g.SingleGrappleHook)
staticprivate

◆ HookTileCollideStyle

HookList Terraria.ModLoader.ProjectileLoader.HookTileCollideStyle = AddHook<DelegateTileCollideStyle>(g => g.TileCollideStyle)
staticprivate

◆ HookUseGrapple

HookList Terraria.ModLoader.ProjectileLoader.HookUseGrapple = AddHook<DelegateUseGrapple>(g => g.UseGrapple)
staticprivate

Definition at line 582 of file ProjectileLoader.cs.

Referenced by Terraria.ModLoader.ProjectileLoader.UseGrapple().

◆ nextProjectile

int Terraria.ModLoader.ProjectileLoader.nextProjectile = ProjectileID.Count
staticprivate

Definition at line 20 of file ProjectileLoader.cs.

Property Documentation

◆ ProjectileCount

int Terraria.ModLoader.ProjectileLoader.ProjectileCount
staticget