From 825f4c1c0666bdcc66fe9c8d594b1b920c2afa9f Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Tue, 12 May 2015 18:07:30 -0400 Subject: [PATCH 1/2] Mob login runtime fix --- code/modules/mob/living/carbon/human/login.dm | 6 ++++++ code/modules/mob/living/login.dm | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/carbon/human/login.dm b/code/modules/mob/living/carbon/human/login.dm index 80d6f00288b..b443b334152 100644 --- a/code/modules/mob/living/carbon/human/login.dm +++ b/code/modules/mob/living/carbon/human/login.dm @@ -1,5 +1,11 @@ /mob/living/carbon/human/Login() ..() + + if(ishuman(src)) + var/mob/living/carbon/human/H = src + if(H.species && H.species.ventcrawler) + src << "You can ventcrawl! Use alt+click on vents to quickly travel about the station." + update_pipe_vision() update_hud() ticker.mode.update_all_synd_icons() //This proc only sounds CPU-expensive on paper. It is O(n^2), but the outer for-loop only iterates through syndicates, which are only prsenet in nuke rounds and even when they exist, there's usually 6 of them. return diff --git a/code/modules/mob/living/login.dm b/code/modules/mob/living/login.dm index 66abaefee4b..3d107d3857a 100644 --- a/code/modules/mob/living/login.dm +++ b/code/modules/mob/living/login.dm @@ -8,10 +8,6 @@ player_logged = 0 //Vents - if(ishuman(src)) - var/mob/living/carbon/human/H - if(H.species.ventcrawler) - src << "You can ventcrawl! Use alt+click on vents to quickly travel about the station." if(ventcrawler) src << "You can ventcrawl! Use alt+click on vents to quickly travel about the station." //Should update regardless of if we can ventcrawl, since we can end up in pipes in other ways. From 1dea1acbb954dac976f5bdfff2a815969f2273ab Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Tue, 12 May 2015 18:33:40 -0400 Subject: [PATCH 2/2] Cleanup --- code/modules/mob/living/carbon/human/login.dm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/carbon/human/login.dm b/code/modules/mob/living/carbon/human/login.dm index b443b334152..14372e6c976 100644 --- a/code/modules/mob/living/carbon/human/login.dm +++ b/code/modules/mob/living/carbon/human/login.dm @@ -1,10 +1,8 @@ /mob/living/carbon/human/Login() ..() - if(ishuman(src)) - var/mob/living/carbon/human/H = src - if(H.species && H.species.ventcrawler) - src << "You can ventcrawl! Use alt+click on vents to quickly travel about the station." + if(species && species.ventcrawler) + src << "You can ventcrawl! Use alt+click on vents to quickly travel about the station." update_pipe_vision() update_hud() ticker.mode.update_all_synd_icons() //This proc only sounds CPU-expensive on paper. It is O(n^2), but the outer for-loop only iterates through syndicates, which are only prsenet in nuke rounds and even when they exist, there's usually 6 of them.