Skip to content

Commit 18b587c

Browse files
fix: display guest code as well as code when code lock is placed with one
1 parent a76d9bc commit 18b587c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/AutoCode.cs

+6-2
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,12 @@ void OnEntitySpawned(CodeLock codeLock)
124124
Message(
125125
player,
126126
string.Format(
127-
lang.GetMessage("CodeAutoLocked", this, player.UserIDString),
128-
Utils.ShouldHideCode(player, settings) ? HiddenCode : settings.code
127+
lang.GetMessage(
128+
codeLock.hasGuestCode ? "CodeAutoLockedWithGuest" : "CodeAutoLocked",
129+
this,
130+
player.UserIDString),
131+
Utils.ShouldHideCode(player, settings) ? HiddenCode : codeLock.code,
132+
Utils.ShouldHideCode(player, settings) ? HiddenCode : codeLock.guestCode
129133
)
130134
);
131135
}

0 commit comments

Comments
 (0)