How jettcodey/mapupgrade works
Map Upgrade is a multiplayer game mod that gates the map behind purchasable upgrades and expands its range with each upgrade; it also adds scroll-wheel minimap zoom. The runtime flow is plugin initialization and upgrade registration, player upgrade activation and synchronization, then per-player map enablement and sizing. The README documents these capabilities, while the source excerpts show configuration, registration, map behavior, and networking. The asset bundle and game APIs are external to the listed source tree.
Main entry points: Upgrader.cs Map upgrade item · Plugin.cs Upgrade registration · MapToolChanges.cs Map controls and zoom · Utils.cs Shared utilities
Components 14
Plugin setup
- Plugin runtime
MapUpgrade/Plugin.cs - Plugin identity
MapUpgrade/MyPluginInfo.cs - Mod configuration
MapUpgrade/Plugin.cs - Upgrade registration
MapUpgrade/Plugin.cs
Upgrade lifecycle
- Map upgrade item
MapUpgrade/Upgrader.cs - Upgrade statistics
MapUpgrade/Upgrader.cs
Map controls
- Player map updates
MapUpgrade/Plugin.cs - Map controls and zoom
MapUpgrade/MapToolChanges.cs
Shared utilities
- Shared utilities
MapUpgrade/Utils.cs
Other components
- Player
- Game runtime
- REPOLib
- Upgrade asset bundle
- Photon multiplayer
Connections 18
- Plugin runtime → Plugin identity: reads identity
MapUpgrade/Plugin.cs - Plugin runtime → Mod configuration: binds settings
MapUpgrade/Plugin.cs - Plugin runtime → Upgrade registration: loads and registers
MapUpgrade/Plugin.cs - Upgrade registration → Upgrade asset bundle: loads assets
MapUpgrade/Plugin.cs - Upgrade registration → REPOLib: registers upgrade
MapUpgrade/Plugin.cs - Upgrade registration → Map upgrade item: attaches upgrader
MapUpgrade/Plugin.cs - Upgrade registration → Player map updates: registers callback
MapUpgrade/Plugin.cs - Player → Map upgrade item: activates
MapUpgrade/Upgrader.cs - Map upgrade item → Upgrade statistics: updates stats
MapUpgrade/Upgrader.cs - Map upgrade item → Photon multiplayer: requests and syncs
MapUpgrade/Upgrader.cs - Map upgrade item → Player map updates: triggers refresh
MapUpgrade/Upgrader.cs - Plugin runtime → Map controls and zoom: initializes patches
MapUpgrade/Plugin.cs - Player map updates → Upgrade statistics: reads upgrade count
MapUpgrade/Plugin.cs - Player map updates → Map controls and zoom: sets enabled and zoom
MapUpgrade/Plugin.cs - Map controls and zoom → Game runtime: patches player; reads input
MapUpgrade/MapToolChanges.cs - Map controls and zoom → Shared utilities: traverses map objects
MapUpgrade/MapToolChanges.cs - Map upgrade item → Shared utilities: checks host role
MapUpgrade/Upgrader.cs - Player → Map controls and zoom: uses minimap
README.md