Runtime fix for:

runtime error: Cannot read null.name
proc name: New (/obj/effect/golemrune/New)

The reaction that creates the rune was creating the rune in nullspace, it tried to use the loc in it's constructor, then it set the loc afterwards. Now it runs the constructor and such, THEN runs 'announce_to_ghosts()' after it is assigned a loc.

I've also changed src.loc.name to get_area(src) so instead of "A golem rune was created in area Floor " it says "A golem rune was created in Chemistry."

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5597 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
johnsonmt88@gmail.com
2013-01-22 02:54:16 +00:00
parent 3ac21339c1
commit 005acb5529
2 changed files with 9 additions and 3 deletions
@@ -1257,6 +1257,7 @@ datum
on_reaction(var/datum/reagents/holder)
var/obj/effect/golemrune/Z = new /obj/effect/golemrune
Z.loc = get_turf_loc(holder.my_atom)
Z.announce_to_ghosts()
//////////////////////////////////////////FOOD MIXTURES////////////////////////////////////
tofu