diff --git a/code/modules/mob/camera/camera.dm b/code/modules/mob/camera/camera.dm index 8116544117e..69f6cb9b558 100644 --- a/code/modules/mob/camera/camera.dm +++ b/code/modules/mob/camera/camera.dm @@ -16,4 +16,8 @@ /mob/camera/Destroy() ..() - del(src) \ No newline at end of file + del(src) + +/mob/camera/Login() + ..() + update_interface() \ No newline at end of file diff --git a/code/modules/mob/dead/observer/login.dm b/code/modules/mob/dead/observer/login.dm index 85ca2f8eff4..b386c04eb96 100644 --- a/code/modules/mob/dead/observer/login.dm +++ b/code/modules/mob/dead/observer/login.dm @@ -1,4 +1,5 @@ /mob/dead/observer/Login() ..() if(client.prefs.unlock_content) - icon_state = client.prefs.ghost_form \ No newline at end of file + icon_state = client.prefs.ghost_form + update_interface() \ No newline at end of file diff --git a/code/modules/mob/living/login.dm b/code/modules/mob/living/login.dm index acc11c4bc05..d19335d1f3e 100644 --- a/code/modules/mob/living/login.dm +++ b/code/modules/mob/living/login.dm @@ -21,7 +21,7 @@ if(ventcrawler) src << "You can ventcrawl! Use alt+click on vents to quickly travel about the station." - + update_interface() return . //This stuff needs to be merged from cloning.dm but I'm not in the mood to be shouted at for breaking all the things :< ~Carn diff --git a/code/modules/mob/living/silicon/robot/login.dm b/code/modules/mob/living/silicon/robot/login.dm index 2ee3d634b05..99e69a84c53 100644 --- a/code/modules/mob/living/silicon/robot/login.dm +++ b/code/modules/mob/living/silicon/robot/login.dm @@ -1,11 +1,12 @@ - /mob/living/silicon/robot/Login() ..() regenerate_icons() show_laws(0) if(mind) ticker.mode.remove_revolutionary(mind) - winset(src, null, "mainwindow.macro=borgmacro hotkey_toggle.is-checked=false input.focus=true input.background-color=#D3B5B5") +/mob/living/silicon/robot/update_hotkey_mode() + winset(src, null, "mainwindow.macro=borghotkeymode hotkey_toggle.is-checked=true mapwindow.map.focus=true input.background-color=#F0F0F0") - return \ No newline at end of file +/mob/living/silicon/robot/update_normal_mode() + winset(src, null, "mainwindow.macro=borgmacro hotkey_toggle.is-checked=false input.focus=true input.background-color=#D3B5B5") diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index 4dfaf4be75d..aef675d24a8 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -35,6 +35,7 @@ next_move = 1 sight |= SEE_SELF + ..() if(loc && !isturf(loc)) @@ -47,6 +48,20 @@ if(isobj(loc)) var/obj/Loc=loc Loc.on_log() - //set macro to normal incase it was overriden (like cyborg currently does) + +// Calling update_interface() in /mob/Login() causes the Cyborg to immediately be ghosted; because of winget(). +// Calling it in the overriden Login, such as /mob/living/Login() doesn't cause this. +/mob/proc/update_interface() + if(client) + if(winget(src, "hotkey_toggle", "is-checked")) + update_hotkey_mode() + else + update_normal_mode() + +/mob/proc/update_hotkey_mode() + winset(src, null, "mainwindow.macro=hotkeymode hotkey_toggle.is-checked=true mapwindow.map.focus=true input.background-color=#F0F0F0") + +/mob/proc/update_normal_mode() winset(src, null, "mainwindow.macro=macro hotkey_toggle.is-checked=false input.focus=true input.background-color=#D3B5B5") + diff --git a/code/modules/mob/new_player/login.dm b/code/modules/mob/new_player/login.dm index b067cc0618c..870e7fb4da6 100644 --- a/code/modules/mob/new_player/login.dm +++ b/code/modules/mob/new_player/login.dm @@ -33,4 +33,4 @@ spawn(40) if(client) handle_privacy_poll() - client.playtitlemusic() + client.playtitlemusic() \ No newline at end of file