From 0f3031bd7e99b3f03cdaa3aa7600f24fb62be7bc Mon Sep 17 00:00:00 2001 From: Joan Lung Date: Fri, 2 Sep 2016 16:51:26 -0400 Subject: [PATCH] Fixes some potential weird faction bugs --- code/datums/mind.dm | 2 +- code/game/gamemodes/clock_cult/clock_cult.dm | 4 +++- code/modules/mob/living/simple_animal/bot/bot.dm | 2 +- .../mob/living/simple_animal/hostile/megafauna/legion.dm | 2 ++ code/modules/mob/living/simple_animal/hostile/mining_mobs.dm | 3 +-- code/modules/research/xenobiology/xenobiology.dm | 2 +- 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index f5c465d390e..61c61673d11 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -238,7 +238,7 @@ enslaved_to = creator - current.faction = creator.faction + current.faction = creator.faction.Copy() if(special_role) message_admins("[key_name_admin(current)](?) has been created by [key_name_admin(creator)](?), an antagonist.") diff --git a/code/game/gamemodes/clock_cult/clock_cult.dm b/code/game/gamemodes/clock_cult/clock_cult.dm index 63397149602..3e012efca34 100644 --- a/code/game/gamemodes/clock_cult/clock_cult.dm +++ b/code/game/gamemodes/clock_cult/clock_cult.dm @@ -90,10 +90,11 @@ This file's folder contains: whim without hesitation.") ticker.mode.servants_of_ratvar += M.mind ticker.mode.update_servant_icons_added(M.mind) + all_clockwork_mobs += M + M.faction |= "ratvar" M.mind.special_role = "Servant of Ratvar" M.languages_spoken |= RATVAR M.languages_understood |= RATVAR - all_clockwork_mobs += M M.update_action_buttons_icon() //because a few clockcult things are action buttons and we may be wearing/holding them for whatever reason, we need to update buttons M.attack_log += "\[[time_stamp()]\] Has been converted to the cult of Ratvar!" if(issilicon(M)) @@ -152,6 +153,7 @@ This file's folder contains: ticker.mode.servants_of_ratvar -= M.mind ticker.mode.update_servant_icons_removed(M.mind) all_clockwork_mobs -= M + M.faction -= "ratvar" M.mind.memory = "" //Not sure if there's a better way to do this M.mind.special_role = null M.languages_spoken &= ~RATVAR diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index d14a6bf087d..042de50dcad 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -859,7 +859,7 @@ Pass a positive integer as an argument to override a bot's default speed. src << "You sense your form change as you are uploaded into [src]." bot_name = name name = paicard.pai.name - faction = user.faction + faction = user.faction.Copy() add_logs(user, paicard.pai, "uploaded to [bot_name],") return 1 else diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/legion.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/legion.dm index b81f0a77789..fa7e0330f24 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/legion.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/legion.dm @@ -110,6 +110,8 @@ Difficulty: Medium L.update_transform() update_transform() + L.faction = faction.Copy() + L.GiveTarget(target) visible_message("[src] splits in twain!") diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm index 45a0f519989..7c83b8c354a 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm @@ -223,9 +223,8 @@ A.admin_spawned = admin_spawned A.GiveTarget(target) A.friends = friends - A.faction = faction + A.faction = faction.Copy() ranged_cooldown = world.time + ranged_cooldown_time - return /mob/living/simple_animal/hostile/asteroid/hivelord/AttackingTarget() OpenFire() diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index 5534256453f..cc5f39f8672 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -239,7 +239,7 @@ user.mind.transfer_to(SM) SM.languages_spoken = user.languages_spoken SM.languages_understood = user.languages_understood - SM.faction = user.faction + SM.faction = user.faction.Copy() SM.sentience_act() //Same deal here as with sentience user.death() SM << "In a quick flash, you feel your consciousness flow into [SM]!"