From 579c5be2396f3bc83aa1081352cb6fdc7d9f51c0 Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Sun, 23 Aug 2015 17:41:26 +0200 Subject: [PATCH 1/2] Makes observers use forceMove. This ensures things like OnEnter/Exit, light updates properly for all occasions when a ghost moves, not only for manual movement. --- code/_onclick/observer.dm | 2 +- code/modules/mob/dead/observer/observer.dm | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/code/_onclick/observer.dm b/code/_onclick/observer.dm index 324dcc234d9..55fe373301e 100644 --- a/code/_onclick/observer.dm +++ b/code/_onclick/observer.dm @@ -26,7 +26,7 @@ // Otherwise jump else following = null - loc = get_turf(A) + forceMove(get_turf(A)) /mob/dead/observer/ClickOn(var/atom/A, var/params) if(client.buildmode) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index c08df56a132..98a9576e6f7 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -74,7 +74,7 @@ var/global/list/image/ghost_sightless_images = list() //this is a list of images mind = body.mind //we don't transfer the mind but we keep a reference to it. if(!T) T = pick(latejoin) //Safety in case we cannot find the body's position - loc = T + forceMove(T) if(!name) //To prevent nameless ghosts name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names)) @@ -293,7 +293,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp else usr << "No area available." - usr.loc = pick(L) + usr.forceMove(pick(L)) following = null /mob/dead/observer/verb/follow(input in getmobs()) @@ -320,7 +320,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp following = target src << "Now following [target]" if(ismob(target)) - loc = get_turf(target) + forceMove(get_turf(target)) var/mob/M = target M.following_mobs += src else @@ -331,7 +331,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp break // To stop the ghost flickering. if(loc != T) - loc = T + forceMove(T) sleep(15) /mob/proc/update_following() @@ -341,7 +341,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp following_mobs -= M else if(M.loc != .) - M.loc = . + M.forceMove(.) /mob var/list/following_mobs = list() @@ -392,7 +392,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/turf/T = get_turf(M) //Turf of the destination mob if(T && isturf(T)) //Make sure the turf exists, then move the source to that destination. - src.loc = T + forceMove(T) following = null else src << "This mob is not located in the game world." From e8b779a34aed70a14a0519da094063dca58c509c Mon Sep 17 00:00:00 2001 From: Kearel Date: Sun, 23 Aug 2015 22:37:32 -0500 Subject: [PATCH 2/2] language bug fix --- code/modules/mob/language/station.dm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/language/station.dm b/code/modules/mob/language/station.dm index f2427b056c8..cc477f0ee7d 100644 --- a/code/modules/mob/language/station.dm +++ b/code/modules/mob/language/station.dm @@ -107,11 +107,12 @@ space_chance = 10 /datum/language/machine/get_random_name() + var/new_name if(prob(70)) - name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]" + new_name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]" else - name = pick(ai_names) - return name + new_name = pick(ai_names) + return new_name //Syllable Lists /*