Skip to content

Commit 1df01dc

Browse files
author
Felix Queißner
committed
Adds an example for doors, adds some icons.
1 parent 49d4b3d commit 1df01dc

File tree

14 files changed

+189
-124
lines changed

14 files changed

+189
-124
lines changed

Examples/Door-Experiments.lua

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
local r = Game():GetRoom()
2+
local slot = DoorSlot.UP0
3+
local pos = r:GetDoorSlotPosition(slot)
4+
5+
local idx = r:GetGridIndex(pos)
6+
local ent = r:GetGridEntity(idx)
7+
print("index", idx, ent)
8+
9+
r:RemoveGridEntity(
10+
idx,
11+
0,
12+
false)
13+
local success = r:SpawnGridEntity(
14+
idx,
15+
GridEntityType.GRID_DOOR,
16+
DoorVariant.DOOR_UNSPECIFIED,
17+
0,
18+
0)
19+
print("spawn", success)
20+
if success then
21+
ent = r:GetGridEntity(idx)
22+
ent = ent:ToDoor()
23+
ent:SetRoomTypes(RoomType.ROOM_DEFAULT, RoomType.ROOM_DEFAULT)
24+
ent.TargetRoomIndex = 58
25+
ent.Slot = slot;
26+
print(ent.TargetRoomIndex, ent.Direction, Direction.Down)
27+
Game():GetPlayer(0):AnimateHappy()
28+
else
29+
Game():GetPlayer(0):AnimateSad()
30+
end

TODO.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
- Enemy List
1313
- Jump List
1414
- Go to any level in the game
15-
- Random Room
1615
- Test the Room Tool
1716
- Open Devil Deal/Mega Satan/Boss Rush/Blue Womb/The Void
18-
- Restock Shop (Full, Partial)
19-
- Reshuffle Shop
2017
- Reroll Level Collectibles
2118
- Reroll Level Pickups

Tool/icons.qrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,12 @@
3535
<file>icons/document-save-as.png</file>
3636
<file>icons/document-save.png</file>
3737
<file>icons/window-close.png</file>
38+
<file>icons/devildeal.png</file>
39+
<file>icons/megasatan.png</file>
40+
<file>icons/restock.png</file>
41+
<file>icons/shuffle-shop.png</file>
42+
<file>icons/teleport.png</file>
43+
<file>icons/reroll-collectibles.png</file>
44+
<file>icons/reroll-pedestal.png</file>
3845
</qresource>
3946
</RCC>

Tool/icons/devildeal.png

3.86 KB
Loading

Tool/icons/megasatan.png

2.66 KB
Loading

Tool/icons/reroll-collectibles.png

1.66 KB
Loading

Tool/icons/reroll-pedestal.png

1.81 KB
Loading

Tool/icons/restock.png

2.94 KB
Loading

Tool/icons/shuffle-shop.png

1.1 KB
Loading

Tool/icons/teleport.png

2.94 KB
Loading

0 commit comments

Comments
 (0)