Merge pull request #3412 from Giacom/someone_was_lazy

Fixed the lazy "fix" which caused mobs that Login or Logout to lose their hotkey mode.
This commit is contained in:
Cheridan
2014-04-15 11:24:07 -05:00
6 changed files with 29 additions and 8 deletions
+5 -1
View File
@@ -16,4 +16,8 @@
/mob/camera/Destroy()
..()
del(src)
del(src)
/mob/camera/Login()
..()
update_interface()
+2 -1
View File
@@ -1,4 +1,5 @@
/mob/dead/observer/Login()
..()
if(client.prefs.unlock_content)
icon_state = client.prefs.ghost_form
icon_state = client.prefs.ghost_form
update_interface()
+1 -1
View File
@@ -21,7 +21,7 @@
if(ventcrawler)
src << "<span class='notice'>You can ventcrawl! Use alt+click on vents to quickly travel about the station.</span>"
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
@@ -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
/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")
+16 -1
View File
@@ -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")
+1 -1
View File
@@ -33,4 +33,4 @@
spawn(40)
if(client)
handle_privacy_poll()
client.playtitlemusic()
client.playtitlemusic()