Mod Calls (World of Piss)

From Terraria Mods Wiki
Jump to navigation Jump to search

Mod Calls are specific methods that can be used with tModLoader's .Call() function in order to interact with the World of Piss mod. In this page are listed all the methods that are supported. To call one of these methods, first provide the name of the method as a string in the first parameter of .Call(), and then provide each of the parameters specified for the method as separate parameters to .Call().

Mod Calls Table

Function Returns Parameters
IsLactoseIntolerant (bool) Whether a specific player is lactose intolerant or not. (Player) The player to check.
GetLactoseIntoleranceChance (float) The calculated chance that the player is lactose intolerant or not, from 0 to 1. Used in IsLactoseIntolerant along with the player's username as a seed. (Player) The player to check.
AddPiss N/A (Recipe) The recipe that will require piss to craft.
(float) The amount of piss that will be required to craft the recipe, in mL.
AddNapalm N/A (Recipe) The recipe that will require piss napalm to craft.
(float) The amount of piss napalm that will be required to craft the recipe, in mL.
AddKetchup N/A (Recipe) The recipe that will require ketchup to craft.
(float) The amount of ketchup that will be required to craft the recipe, in packets.
(bool) Whether or not to exclude packet items.
RemoveAllLiquidRequirements N/A (Recipe) The recipe to remove all piss, piss napalm, and ketchup requirements from.
GetPissAmount (float) The amount of piss that the specified player has in their inventory, in mL. (Player) The player to check.
ConsumePissAmount (bool) Whether or not the player had the requested amount of piss; if false, there was not enough piss and all available piss was consumed. (Player) The player to take from.
(float) The amount to consume, in mL.
(bool) Whether or not to skip consumption modifiers.
HasPissThreshold (bool) Whether or not the specified player has the specified amount of piss in their inventory. (Player) The player to check.
(float) The amount to check for, in mL.
GetNapalmAmount (float) The amount of piss napalm that the specified player has in their inventory, in mL. (Player) The player to check.
ConsumeNapalmAmount (bool) Whether or not the player had the requested amount of piss napalm; if false, there was not enough piss napalm and all available piss napalm was consumed. (Player) The player to take from.
(float) The amount to consume, in mL.
(bool) Whether or not to skip consumption modifiers.
HasNapalmThreshold (bool) Whether or not the specified player has the specified amount of piss napalm in their inventory. (Player) The player to check.
(float) The amount to check for, in mL.
GetKetchupAmount (float) The amount of ketchup that the specified player has in their inventory, in packets. (Player) The player to check.
(bool) Whether or not to exclude packet items.
ConsumeKetchupAmount (bool) Whether or not the player had the requested amount of ketchup; if false, there was not enough ketchup and all available ketchup was consumed. (Player) The player to take from.
(float) The amount to consume, in packets.
(bool) Whether or not to exclude packet items.
HasKetchupThreshold (bool) Whether or not the specified player has the specified amount of ketchup in their inventory. (Player) The player to check.
(float) The amount to check for, in packets.
(bool) Whether or not to exclude packet items.
AddDairyProduct N/A (int) The item ID that should be added to the list of dairy products (i.e. items that will give lactose intolerant players the Shitsing debuff when consumed).
IsTileToilet (bool) Whether or not the specified tile is a toilet. (Tile) The tile to check.
IsTileToilet (bool) Whether or not the specified tile is a toilet. (int) i
(int) j
GetAllNearbyToilets (List<Tile>) A list of all nearby tiles that are toilets. (Player) The player to check at.
(int) The radius in which to check for toilets.
ColorSimilarity (float) The estimated similarity between the two colors, from 0.05 to 0.95. (Color) The first color to check.
(Color) The second color to check.
RandomVector2 (Vector2) A two-dimensional unit vector in a random direction. N/A
GetDownDir (Vector2) The vector pointing "down" when facing in the direction of the forward vector. (Vector2) The forward vector.