Ради вашего удобства наш сайт использует cookies! Узнать больше! Мы используем cookies

Door Unlock From Inside

Door Unlock From Inside Restores vanilla door behavior in B42 multiplayer: doors auto-unlock when you are inside the building. [hr] Problem In Build 42 multiplayer, doors sometimes stay locked even when the player is standing inside the house. The vanilla "open from inside" auto-unlock behavior fails due to client-server desync, effectively trapping players in their own houses. [hr] Fix Two-pronged approach: [list] [*] [b]Periodic scan + server unlock[/b] — Every 0.5s, scans 3-tile radius around player. If player is indoors (isOutside=false), requests server to unlock nearby doors. [*] [b]ISOpenCloseDoor hook[/b] — Intercepts the door-open action just before it runs. If player is indoors, force-unlocks the door on the fly. This bypasses any server-side re-locking. [/list] [hr] Features [list] [*] Works even when [b]getRoom()[/b] returns nil (map mod issues) [*] Uses [b]isOutside()[/b] for reliable indoor detection [*] Only works when player is indoors — outdoor locked doors stay locked (preserves "break in" gameplay) [*] Handles both [b]IsoDoor[/b] and [b]IsoThumpable[/b] doors (player-built) [*] Server-authoritative unlock with broadcast to all clients [*] Lightweight: 0.5s scan interval, 5s request cooldown per coordinate [/list] [hr] Update Log v5 [list] [*] Added [b]ISOpenCloseDoor:perform hook[/b] — force-unlocks door at the moment of interaction (bypasses server re-lock) [*] Server broadcasts unlock to all clients for local state sync [*] Both client-side polling and hook work together for reliability [/list] v4 [list] [*] Moved to server-authoritative unlock via [b]sendClientCommand[/b] [*] Removed hasLockedDoor check (client-server desync could hide locked state) [*] 5-second cooldown per door coordinate to prevent spam [/list] v3 [list] [*] Added [b]isOutside()[/b]-based indoor detection (fallback when getRoom/getBuilding return nil) [*] Boundary-door check (only unlock doors between indoor and outdoor squares) [/list] v2 [list] [*] Switched from getRoom() to getBuilding() [*] Expanded scan to include doorway edge tiles [/list] v1 [list] [*] Initial release [*] getRoom()-based indoor detection [*] Client-side setLocked(false) on nearby doors [/list] [hr] Compatibility [list] [*] Build 42.13+ (SP/MP) [*] Works with any map mod [*] Compatible with Authentic Z, True Music, EURY Multiplayer Bug Fixes [*] No mod dependencies [/list] [hr] Developed by [b]$J[/b] Workshop ID: 3712058921 Mod ID: DoorUnlockFromInside