REPO_JP-ExtractionAutoRevive icon

ExtractionAutoRevive

Host-only mod that automatically revives dead players on extraction completion.抽出完了時に死亡したプレイヤーを自動で蘇生するホスト専用MOD

By REPO_JP

CHANGELOG

Changelog

[0.1.0] - Initial Release

Added

  • Host-only automatic revive triggered by extraction completion

    • Hooks ExtractionPoint.StateSet and reacts when state becomes Complete
    • Executes revive after a 1-frame delay to avoid timing issues during state transitions
  • Event-driven design (no polling / interval checks)

  • Host-only guard

    • Runs only when PhotonNetwork.InRoom is true and PhotonNetwork.IsMasterClient is true
    • Skips in singleplayer and for non-host clients
  • Stage filter to avoid lobby / non-level contexts

    • Requires SemiFunc.RunIsLevel() to be true
    • Tracks Unity log "Changed level to:" to maintain a display-level name
    • Excludes Lobby and Level - *
  • Safe cancellation for rapid state changes / level transitions

    • Uses an internal token to cancel a pending revive if the token changes before execution
  • Revive execution pipeline

    • Enumerates PlayerAvatar via Resources.FindObjectsOfTypeAll<PlayerAvatar>()
    • Filters targets to loaded scenes only
    • Resolves PlayerActions.Revive(PlayerAvatar) via reflection and invokes it for each target
    • Skips revive when PlayerActions.Revive(PlayerAvatar) cannot be resolved
  • Detailed logging

    • Logs state transitions, host checks, stage filter results, target counts, and per-player revive results

[0.1.1] - Updated

Changed

  • Refactoring based on received cleanup advice (no behavior change)

    • Replaced player enumeration from Resources.FindObjectsOfTypeAll<PlayerAvatar>() to GameDirector.instance.PlayerList
    • Replaced health checks from reflection (GetField / GetValue) to direct access player.playerHealth.health
    • Replaced revive invocation from reflection (MethodInfo.Invoke) to direct call player.Revive(true)
    • Replaced extraction flag updates from reflection (SetValue) to direct assignment player.playerDeathHead.inExtractionPoint = true and player.playerDeathHead.inTruck = true