Difference between revisions of "DSB/Subrenderers"
From DmWiki
Jump to navigationJump to search (add some notes on callbacks (needs method parameters once I figure them out)) |
m |
||
Line 3: | Line 3: | ||
See the stats and inventory screen renderers in <i>base/render.lua</i> for more information on subrenderers. (Another place to look is the implementation of chests and scrolls in <i>base/objects.lua</i>) | See the stats and inventory screen renderers in <i>base/render.lua</i> for more information on subrenderers. (Another place to look is the implementation of chests and scrolls in <i>base/objects.lua</i>) | ||
− | + | A subrenderer is called any time it is clicked or interacted with; it is also updated several times per second, but the actual rate can vary. | |
Any efforts to reconstruct the Amiga CSB magic map are quite welcome. | Any efforts to reconstruct the Amiga CSB magic map are quite welcome. |
Latest revision as of 18:37, 6 January 2024
A subrenderer is a special Lua function that renders the large area in the lower-right corner of the inventory screen. In the default code provided in base/, subrenderers are used to create the chest and scroll, and concievably about anything else could be built.
See the stats and inventory screen renderers in base/render.lua for more information on subrenderers. (Another place to look is the implementation of chests and scrolls in base/objects.lua)
A subrenderer is called any time it is clicked or interacted with; it is also updated several times per second, but the actual rate can vary.
Any efforts to reconstruct the Amiga CSB magic map are quite welcome.
Callbacks
Some callback hooks that may be useful while working with subrenderers:
- inst_outgoing
- something gets removed from a container
- inst_incoming
- something gets added to a container
- on_unlook
- called after an item is removed from the hover-on-eyeball examination
- after_from_r_hand
- called after an item is removed from the active hand, which will close those subrenderers