Skip to content

Commit d4caeea

Browse files
committed
Support for RGON v1.1.2d and v1.1.2e
1 parent e93ee31 commit d4caeea

9 files changed

Lines changed: 93 additions & 28 deletions

File tree

src/docs/enums/repentogon.json

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -372,10 +372,6 @@
372372
"value": "1152",
373373
"comment": "(Entity, Vector Offset) - Called before the lighting of an entity is rendered. Return a Vector to modify render offset or `false` to cancel rendering."
374374
},
375-
"MC_PRE_PLAYER_APPLY_INNATE_COLLECTIBLE_NUM": {
376-
"value": "1092",
377-
"comment": "(integer ModCount, EntityPlayer Player, CollectibleType Type, boolean OnlyCountTrueItems): integer - Called when getting the amount of innate items on the player. Return an integer to modify how many of a specific innate item the player has."
378-
},
379375
"MC_PRE_MUSIC_PLAY_JINGLE": {
380376
"value": "1094",
381377
"comment": "(Music MusicID): Music | boolean, Optional Arg: Music - Called before a music jingle is played. Return `Music` to change the track or `false` to cancel the track."
@@ -910,7 +906,11 @@
910906
},
911907
"MC_PRE_PICKUP_GET_LOOT_LIST": {
912908
"value": "1334",
913-
"comment": "(EntityPickup Pickup, boolean ShouldAdvance): LootList - Called before the pickup determines its loot content. Return `LootList` to change loot content."
909+
"comment": "(EntityPickup Pickup, boolean ShouldAdvance, RNG, EntityPlayer Player): LootList - Called before the pickup determines its loot content. Accepts a `LootList` to completely replace loot content. If `ShouldAdvance` is `false`, the loot is being checked (such as for a Guppy's Eye preview) but the RNG should not be advanced. The provided RNG (the DropRNG of the entity) will be reset at the end of the callback to preserve the original seed, so you can use the provided RNG for easy consistent results between loot previews and when the loot actually spawns."
910+
},
911+
"MC_POST_PICKUP_GET_LOOT_LIST": {
912+
"value": "1336",
913+
"comment": "(EntityPickup Pickup, boolean ShouldAdvance, RNG, EntityPlayer Player): LootList - Called after the pickup determines its loot content. The provided `LootList` can be modified, so this is a good place to make small modifications such as adding to the loot. If `ShouldAdvance` is `false`, the loot is being checked (such as for a Guppy's Eye preview) but the RNG should not be advanced. The provided RNG (the DropRNG of the entity) will be reset at the end of the callback to preserve the original seed, so you can use the provided RNG for easy consistent results between loot previews and when the loot actually spawns."
914914
},
915915
"MC_PRE_PICKUP_UPDATE_GHOST_PICKUPS": {
916916
"value": "1335",
@@ -1170,23 +1170,23 @@
11701170
},
11711171
"MC_PRE_PLAYER_ADD_COSTUME": {
11721172
"value": "1281",
1173-
"comment": "(ItemConfigItem itemConfig, EntityPlayer Player, boolean ItemStateOnly): ItemConfigItem | boolean - Called before the costume is added to the player. Return `ItemConfigItem` to replace the costume or `true` to cancel adding it entirely."
1173+
"comment": "(ItemConfigItem itemConfig, EntityPlayer Player, boolean ItemStateOnly): ItemConfigItem | boolean, Optional Arg: ItemConfigItem - Called before the costume is added to the player. Return `ItemConfigItem` to replace the costume or `true` to cancel adding it entirely."
11741174
},
11751175
"MC_PRE_PLAYER_REMOVE_COSTUME": {
11761176
"value": "1282",
1177-
"comment": "(ItemConfigItem itemConfig, EntityPlayer Player): boolean - Called before the costume is removed from the player. Return `true` to cancel the removal."
1177+
"comment": "(ItemConfigItem itemConfig, EntityPlayer Player): boolean, Optional Arg: ItemConfigItem - Called before the costume is removed from the player. Return `true` to cancel the removal."
11781178
},
11791179
"MC_POST_PLAYER_ADD_COSTUME": {
11801180
"value": "1283",
1181-
"comment": "(ItemConfigItem itemConfig, EntityPlayer Player, boolean ItemStateOnly) - Called after the costume is added to the player successfully."
1181+
"comment": "(ItemConfigItem itemConfig, EntityPlayer Player, boolean ItemStateOnly), Optional Arg: ItemConfigItem - Called after the costume is added to the player successfully."
11821182
},
11831183
"MC_POST_PLAYER_REMOVE_COSTUME": {
11841184
"value": "1284",
1185-
"comment": "(ItemConfigItem itemConfig, EntityPlayer Player): boolean - Called after the costume is removed from the player successfully."
1185+
"comment": "(ItemConfigItem itemConfig, EntityPlayer Player): boolean, Optional Arg: ItemConfigItem - Called after the costume is removed from the player successfully."
11861186
},
1187-
"MC_POST_FORCE_PILL_EFFECT": {
1187+
"MC_POST_FORCE_ADD_PILL_EFFECT": {
11881188
"value": "1129",
1189-
"comment": "(PillEffect PillEffectID, PillColor PillColorID) - TODO: Document me!"
1189+
"comment": "(PillEffect PillEffectID, PillColor PillColorID) - Called after `ItemPool:ForceAddPillEffect` is used to forcibly add a pill effect to the current pill pool.`"
11901190
},
11911191
"MC_EVALUATE_CUSTOM_CACHE" : {
11921192
"value": "1224",
@@ -1399,6 +1399,14 @@
13991399
"MC_POST_GRID_HURT ": {
14001400
"value": "1018",
14011401
"comment": "(Entity Source, Vector Diration, number DamageScale), Optional Arg: GridEntityType - Called after a GridEntityPoop or GridEntityTNT successfully takes damage."
1402+
},
1403+
"MC_PRE_SHUFFLE_COSTUMES ": {
1404+
"value": "1494",
1405+
"comment": "(EntityPlayer Player, integer seed): boolean, Optional Arg: PlayerType - Called when shuffling costumes with `EntityPlayer:ShuffleCostumes`. Return `false` to cancel the shuffle."
1406+
},
1407+
"MC_POST_SHUFFLE_COSTUMES ": {
1408+
"value": "1495",
1409+
"comment": "(EntityPlayer Player, integer seed), Optional Arg: PlayerType - Called when shuffling costumes with `EntityPlayer:ShuffleCostumes`."
14021410
}
14031411
},
14041412
"Renderer": {
@@ -5521,5 +5529,9 @@
55215529
"FUNC_REVERSE_SUBTRACT": "2",
55225530
"MIN": "3",
55235531
"MAX": "4"
5532+
},
5533+
"RoomGroup": {
5534+
"GROUP_NONE": "-1",
5535+
"GROUP_ULTRA_SECRET": "99"
55245536
}
55255537
}

src/docs/no_repentogon_only/entity/EntityPlayer.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ function EntityPlayer:GetMultiShotPositionVelocity(LoopIndex, Weapon, ShotDirect
3636
end
3737

3838
---@param Type CollectibleType
39-
---@param IgnoreModifiers? boolean @default: `false`
39+
---@param IgnoreModifiers? boolean @default: `false`. If set to `true`, only counts collectibles the player actually owns and ignores effects granted by other items and if its blocked by effects such as the curse mist.
4040
---@return boolean
4141
function EntityPlayer:HasCollectible(Type, IgnoreModifiers)
4242
end
4343

4444
---@param Type CollectibleType
45-
---@param OnlyCountTrueItems? boolean @default: `false`
45+
---@param IgnoreModifiers? boolean @default: `false`. If set to `true`, only counts collectibles the player actually owns and ignores effects granted by other items and if its blocked by effects such as the curse mist.
4646
---@return integer
47-
function EntityPlayer:GetCollectibleNum(Type, OnlyCountTrueItems)
47+
function EntityPlayer:GetCollectibleNum(Type, IgnoreModifiers)
4848
end
4949

5050
---@param Item CollectibleType

src/docs/repentogon_changes/Isaac.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,4 +435,10 @@ end
435435
---More information can be obtained on [repentogon.com](https://repentogon.com/Isaac.html#rendertoworld)
436436
---@param pos Vector
437437
function Isaac.RenderToWorld(pos)
438+
end
439+
440+
---Similar to `Isaac.LoadModData`, but lets you read the saveX.dat file from any existing mod data folder, even if that mod is not currently enabled.
441+
---@param name string
442+
---@return string
443+
function Isaac.LoadModDataFromFolder(name)
438444
end

src/docs/repentogon_changes/MusicManager.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,8 @@ end
1414
---Stops the currently playing jingle.
1515
function MusicManager:StopJingle()
1616
end
17+
18+
---Returns the id of the currently playing jingle, or `0` if no jingle is playing/current jingle is fading out.
19+
---@return Music
20+
function MusicManager:GetCurrentJingleID()
21+
end

src/docs/repentogon_changes/RoomDescriptor.lua

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,34 @@ end
5151
---The trinket to be copied by the Error trinket.
5252
---@return TrinketType
5353
function RoomDescriptor_RGON:GetErrorTrinketEffect()
54+
end
55+
56+
---Group is only used by effects that need to randomly select a room to warp to (e.g. Teleport, Gold Pill Teleport, etc.). A room can only be selected if its group is either `RoomGroup.GROUP_NONE` or matches the current room's group.
57+
---
58+
---By default, all rooms use `RoomGroup.GROUP_NONE`. The only exception is Ultra Secret Rooms, which are assigned a different group by the game during level generation.
59+
---@return RoomGroup | integer
60+
function RoomDescriptor_RGON:GetGroup()
61+
end
62+
63+
---**It is suggested to use CreateGroup instead of setting an arbitrary group.**
64+
---
65+
---Group is only used by effects that need to randomly select a room to warp to (e.g. Teleport, Gold Pill Teleport, etc.). A room can only be selected if its group is either `RoomGroup.GROUP_NONE` or matches the current room's group.
66+
---
67+
---By default, all rooms use `RoomGroup.GROUP_NONE`. The only exception is Ultra Secret Rooms, which are assigned a different group by the game during level generation.
68+
---@param group RoomGroup | integer
69+
function RoomDescriptor_RGON:SetGroup(group)
70+
end
71+
72+
---Creates a new unique group id for `SetGroup`.
73+
---
74+
---**The function will error if a group with the specified name already exists.**
75+
---@param groupName string
76+
---@return integer
77+
function _G.RoomDescriptor.CreateGroup(groupName)
78+
end
79+
80+
---Returns the group id tied to the specified name.
81+
---@param groupName string
82+
---@return integer? @Returns `nil` if the name has not been registered.
83+
function _G.RoomDescriptor.GetGroupByName(groupName)
5484
end

src/docs/repentogon_changes/entity/EntityPlayer.lua

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,17 +1192,17 @@ function EntityPlayer:SetInnateTrinketGroup(groupKey, newCounts, addCostume)
11921192
end
11931193

11941194
---@param Type CollectibleType
1195-
---@param IgnoreModifiers? boolean @default: `false`
1196-
---@param IgnoreSpoof? boolean @default: `false`. Ignores innate items when set to true.
1195+
---@param IgnoreModifiers? boolean @default: `false`. If set to `true`, only counts collectibles the player actually owns and ignores effects granted by other items and if its blocked by effects such as the curse mist.
1196+
---@param IgnoreSpoof? boolean @default: `false`. Ignores innate items when set to `true`.
11971197
---@return boolean
11981198
function EntityPlayer:HasCollectible(Type, IgnoreModifiers, IgnoreSpoof)
11991199
end
12001200

12011201
---@param Type CollectibleType
1202-
---@param OnlyCountTrueItems? boolean @default: `false`
1203-
---@param IgnoreSpoof? boolean @default: `false`. Ignores innate items when set to true.
1202+
---@param IgnoreModifiers? boolean @default: `false`. If set to `true`, only counts collectibles the player actually owns and ignores effects granted by other items and if its blocked by effects such as the curse mist.
1203+
---@param IgnoreSpoof? boolean @default: `false`. Ignores innate items when set to `true`.
12041204
---@return integer
1205-
function EntityPlayer:GetCollectibleNum(Type, OnlyCountTrueItems, IgnoreSpoof)
1205+
function EntityPlayer:GetCollectibleNum(Type, IgnoreModifiers, IgnoreSpoof)
12061206
end
12071207

12081208
---Returns `true` if you have a golden variant of the provided `TrinketType`.
@@ -1253,6 +1253,15 @@ end
12531253
function EntityPlayer:GetTearDisplacement()
12541254
end
12551255

1256+
---Sets the player's TearDisplacement value, which represents which eye the player is shooting from.
1257+
---
1258+
---Note that the game will typically alternate this value BEFORE shooting a tear.
1259+
---@param value integer
1260+
---|-1 # Left eye
1261+
---|1 # Right eye
1262+
function EntityPlayer:SetTearDisplacement(value)
1263+
end
1264+
12561265
---Add CustomCacheTag(s) to be evaluated next time EvaluateItems runs (which is right now, if the optional boolean is passed).
12571266
---@param tag string | string[]
12581267
---@param EvaluateItems? boolean @default: `false`.

src/docs/repentogon_new/PlayerManager.lua

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@ _G.PlayerManager = {}
33

44
---Returns true if any player has the provided collectible.
55
---@param collectible CollectibleType
6+
---@param ignoreModifiers? boolean @default: `false`. If set to `true`, only counts collectibles the player actually owns and ignores effects granted by other items and if its blocked by effects such as the curse mist.
67
---@return boolean
7-
function PlayerManager.AnyoneHasCollectible(collectible)
8+
function PlayerManager.AnyoneHasCollectible(collectible, ignoreModifiers)
89
end
910

1011
---Returns true if any player has the provided trinket.
1112
---@param trinket TrinketType
13+
---@param ignoreModifiers? boolean @default: `false`. If set to `true`, only counts trinkets the player actually owns and ignores effects granted by other items and if its blocked by effects such as the curse mist.
1214
---@return boolean
13-
function PlayerManager.AnyoneHasTrinket(trinket)
15+
function PlayerManager.AnyoneHasTrinket(trinket, ignoreModifiers)
1416
end
1517

1618
---Returns true if any player matches the provided PlayerType.
@@ -60,8 +62,9 @@ end
6062

6163
---Returns the total number of the specified collectible held by all players.
6264
---@param collectible CollectibleType
65+
---@param ignoreModifiers? boolean @default: `false`. If set to `true`, only counts collectibles the player actually owns and ignores effects granted by other items and if its blocked by effects such as the curse mist.
6366
---@return integer
64-
function PlayerManager.GetNumCollectibles(collectible)
67+
function PlayerManager.GetNumCollectibles(collectible, ignoreModifiers)
6568
end
6669

6770
---Returns a table containing all players.
@@ -92,13 +95,13 @@ end
9295

9396
---@param playerType PlayerType
9497
---@param trinketType TrinketType
95-
---@param ignoreModifiers? boolean @default: `false`
98+
---@param ignoreModifiers? boolean @default: `false`. If set to `true`, only counts trinkets the player actually owns and ignores effects granted by other items and if its blocked by effects such as the curse mist.
9699
function PlayerManager.AnyPlayerTypeHasTrinket(playerType, trinketType, ignoreModifiers)
97100
end
98101

99102
---@param playerType PlayerType
100103
---@param itemID TrinketType
101-
---@param ignoreModifiers? boolean @default: `false`
104+
---@param ignoreModifiers? boolean @default: `false`. If set to `true`, only counts collectibles the player actually owns and ignores effects granted by other items and if its blocked by effects such as the curse mist.
102105
function PlayerManager.AnyPlayerTypeHasCollectible(playerType, itemID, ignoreModifiers)
103106
end
104107

src/docs/vanilla/entity/EntityPickup.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ end
2929
---@param Variant integer
3030
---@param SubType integer
3131
---@param KeepPrice? boolean @default: `false`
32-
---@param KeepSeed? boolean @default: `false`
33-
---@param IgnoreModifiers? boolean @default: `false`
32+
---@param KeepSeed? boolean @default: `false. If set to `true`, keeps the initial RNG seed of the pickup instead of rerolling it
33+
---@param IgnoreModifiers? boolean @default: `false`. If set to `, ignores item effects that might turn this pickup into something other than the specificed variant and sub-type. Specifically, this can be used to prevent a collectible from being affected by Tainted Isaac's rotation mechanic. (For example, if you manually spawn a quest collectible such as a Polaroid, it will be affected by Tainted Isaac's rotation mechanic, which is normally undesired. To fix this, you can immediately morph it into the same entity type / variant /sub-type after spawning with this argument set to true.)
3434
function EntityPickup_Local:Morph(Type, Variant, SubType, KeepPrice, KeepSeed, IgnoreModifiers)
3535
end
3636

src/docs/vanilla/entity/EntityPlayer.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ function EntityPlayer:HasTimedItem()
815815
end
816816

817817
---@param Type TrinketType
818-
---@param IgnoreModifiers? boolean @default: `false`
818+
---@param IgnoreModifiers? boolean @default: `false`. If set to `true`, only counts trinkets the player actually owns and ignores effects granted by other items and if its blocked by effects such as the curse mist.
819819
---@return boolean
820820
function EntityPlayer:HasTrinket(Type, IgnoreModifiers)
821821
end
@@ -907,7 +907,7 @@ function EntityPlayer:RemoveBlueSpider()
907907
end
908908

909909
---@param Type CollectibleType
910-
---@param IgnoreModifiers? boolean @default: `false`
910+
---@param IgnoreModifiers? boolean @default: `false`. Ignores collectible effects granted by other items (i.e. Void).
911911
---@param ActiveSlot? ActiveSlot @default: `ActiveSlot.SLOT_PRIMARY`
912912
---@param RemoveFromPlayerForm? boolean @default: `true`
913913
function EntityPlayer:RemoveCollectible(Type, IgnoreModifiers, ActiveSlot, RemoveFromPlayerForm)

0 commit comments

Comments
 (0)