TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ BasicOpenCloseInteraction()

static void Terraria.DataStructures.TileEntity.BasicOpenCloseInteraction ( Player player,
int x,
int y,
int id )
inlinestaticinherited

Definition at line 191 of file TileEntity.cs.

192 {
193 player.CloseSign();
195 if (Main.netMode != 1)
196 {
197 Main.stackSplit = 600;
198 player.GamepadEnableGrappleCooldown();
200 {
201 if (interactingPlayer == player.whoAmI)
202 {
203 Recipe.FindRecipes();
205 player.tileEntityAnchor.Clear();
206 }
207 }
208 else
209 {
210 SetInteractionAnchor(player, x, y, id);
211 }
212 return;
213 }
214 Main.stackSplit = 600;
215 player.GamepadEnableGrappleCooldown();
217 {
218 if (interactingPlayer == player.whoAmI)
219 {
220 Recipe.FindRecipes();
222 player.tileEntityAnchor.Clear();
223 NetMessage.SendData(122, -1, -1, null, -1, Main.myPlayer);
224 }
225 }
226 else
227 {
228 NetMessage.SendData(122, -1, -1, null, id, Main.myPlayer);
229 }
230 }
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 bool IsOccupied(int id, out int interactingPlayer)
static void SetInteractionAnchor(Player player, int x, int y, int id)

References Terraria.Player.CloseSign(), Terraria.Recipe.FindRecipes(), Terraria.Player.GamepadEnableGrappleCooldown(), Terraria.DataStructures.TileEntity.IsOccupied(), Terraria.Main.myPlayer, Terraria.Main.netMode, Terraria.Audio.SoundEngine.PlaySound(), Terraria.NetMessage.SendData(), Terraria.DataStructures.TileEntity.SetInteractionAnchor(), Terraria.Player.tileEntityAnchor, and Terraria.Entity.whoAmI.

Referenced by Terraria.GameContent.Tile_Entities.TEDisplayDoll.OnPlayerInteraction(), and Terraria.GameContent.Tile_Entities.TEHatRack.OnPlayerInteraction().

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