Teleportationstrank: yellow potions open the portal window

- Every yellow potion (potion kind 5, all stages) is a Teleportationstrank:
  drinking it posts the teleporter's event to the busy dialog with the
  hero's known portals; the potion is used up only when the hero teleports
  from that window (closing it keeps the potion)
- Names replaced in every game text (ReplaceInTexts), so item names and the
  bottom bar's quick-select tooltip read Teleportationstrank; GameText reads
  the game's own text
- HeroIndex / HeroInventory moved to skillslots for shared use
- docs/teleport-potion.md; walking animation after loading noted in todo

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
khallaandClaude Opus 5.5 committed 2026-10-17 04:04:21 +02:00
1 parent 6ca96d54b4
commit 46a08e97e9
13 files changed
+368 -22

No files matched your search

+14
View File
@@ -21,6 +21,9 @@
#include <windows.h>
#include "game/engine/items.h"
#include "game/engine/objects.h"
#include "game/engine/orders.h"
#include "re/hook.h"
namespace mods::skillslots {
@@ -51,6 +54,17 @@ uint8_t* Inventory(unsigned index) {
return base && index < kInventories ? base + index * kInventorySize : nullptr;
}
int HeroIndex() {
void* hero = game::GetPlayerHero();
const int index = hero ? game::CreatureField(hero, game::kCreatureId) : -1;
return index >= 0 && index < game::kChestInventory ? index : -1;
}
uint8_t* HeroInventory() {
const int hero = HeroIndex();
return hero >= 0 ? Inventory(static_cast<unsigned>(hero)) : nullptr;
}
uint8_t* ShadowFor(const void* inventory, bool create) {
const int index = IndexOf(inventory);
if (index < 0) {