Skip to content

refactor: use new-style declarations and methodmaps - #29

Merged
Rushaway merged 2 commits into
masterfrom
refactor/new-decls-methodmaps
Sep 30, 2026
Merged

Rushaway merged 2 commits into
masterfrom
refactor/new-decls-methodmaps

Conversation

@Rushaway

Copy link
Copy Markdown
Member

Closes #28

Changes

  • Enable #pragma newdecls required (placed after includes) and convert every old-style declaration (new, decl, Float:, String:, Handle: tags)
  • Replace Handle-based APIs with methodmaps:
    • Menu (new Menu, AddItem, GetItem, Display, DisplayAt, Selection, ItemCount, RemoveAllItems)
    • Cookie (new Cookie, Get/Set)
    • KeyValues (ImportFromFile, GetNum/GetFloat/GetString, JumpToKey, …)
    • Event (GetInt/GetFloat)
  • delete instead of CloseHandle
  • Replace bool:/Float: retagging with explicit comparisons
  • Command_TracersVisibility now reuses TracersVisibility (now void) instead of duplicating it
  • Dynamic client array via int[] iClients = new int[MaxClients]
  • Version bump to 1.2.0

No functional changes intended: cookie names, config keys, menus and chat output are unchanged. The Cookie methodmap needs SM 1.11+, which is already the documented minimum.

🤖 Generated with Claude Code

- Enable `#pragma newdecls required` and convert all old-style declarations
- Replace Handle-based APIs with Menu, Cookie, KeyValues and Event methodmaps
- Use `delete` instead of CloseHandle
- Deduplicate the visibility toggle logic
- Bump version to 1.2.0

Closes #28

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings September 30, 2026 12:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Rushaway
Rushaway merged commit 0e74f95 into master Sep 30, 2026
8 checks passed
@Rushaway
Rushaway deleted the refactor/new-decls-methodmaps branch September 30, 2026 12:54
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.

Use newest sm decls/methodmaps

2 participants