Skip to content

Land #62 and #63 on main - #79

Merged
ResurrectedTrader merged 3 commits into
mainfrom
contract-common-helpers
Oct 7, 2026
Merged

ResurrectedTrader merged 3 commits into
mainfrom
contract-common-helpers

Conversation

@ResurrectedTrader

Copy link
Copy Markdown
Owner

#62 and #63 were merged into their stacked base branches rather than main, so their changes never reached main. This lands them:

The branch also carries the original #61 commit, which main already has (squashed as 5a7db17); it merges cleanly and adds nothing new.

🤖 Generated with Claude Code

ResurrectedTrader and others added 3 commits October 6, 2026 23:23
A contract function, game::GetDesecratedZones(), and the JS global
getDesecratedZones() over it: an array of {area, waypointArea,
monsterLevel, source, uniqueMod}, one per active desecrated (terror)
zone. `source` is a game::DesecratedZoneSource (the timed rotation or a
Worldstone Shard), `uniqueMod` the zone's always-unique modifier (a
monumod.txt id, 0 = none). 1.14d has no such zones and returns an empty
list. Generated enum names rerun.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…en pixels

Two contract additions for a backend that draws the console and the
version banner inside the game's own frame:

- game::console::IsInGameOverlay(): such a console is a movable,
  resizable window over the game, which stays visible and clickable
  around it; it may hang past the screen edges as long as enough of it
  stays inside to grab it again (64 px of its width, and its title bar).
  A console with a window of its own (1.14d, which returns false) stays
  the whole of that window.
- game::GetScreenSize() / DrawScreenText(): the screen in its own
  pixels, for the framework's overlay (the version banner) rather than
  script drawables, which a backend may scale from the legacy viewport.
  1.14d forwards them to GetViewportSize() / DrawGameText().

Script-visible behaviour: none.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A new contract game/Common.h (defined out of line in Common.cpp, part of
contract.lib) holds helpers a backend would otherwise copy: compositions
of contract primitives that are not handle finders.

- PricingNpcClassId(): ItemCost's reference-parity guard - price as
  Charsi when monstats[npc].inventory is empty or not a number.
- IsWaypointLevel(): TakeWaypoint's levels.txt Waypoint != 255 check.
- SkillNameStringId(): GetSkillName's skills -> skilldesc string chain.
- Item affix names: Unit::MagicAffixName(code) is the backend primitive,
  and Prefix() / Suffix() / Prefixes() / Suffixes() are composed over it
  (Prefixes / Suffixes hold one read lock across the codes and lookups).
- CHEST_LOCKED_BIT and ENCHANT_SLOT_COUNT move to game/Constants.h;
  1.14d static_asserts the slot count against D2MOO's array.
- The unused Room::Find goes (no caller anywhere).

CLAUDE.md documents Common.h / Common.cpp. Script-visible behaviour:
unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ResurrectedTrader
ResurrectedTrader merged commit da7bb04 into main Oct 7, 2026
1 check passed
@ResurrectedTrader
ResurrectedTrader deleted the contract-common-helpers branch October 7, 2026 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant