Merge pull request #9256 from Thalpy/INFINITE-FERMIES

[Consider speedmerging] Fixes the infinite clone problem.
This commit is contained in:
nik707
2019-09-08 19:46:08 -04:00
committed by GitHub
@@ -81,9 +81,19 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
SM.real_name = M.real_name
M.dna.transfer_identity(SM)
SM.updateappearance(mutcolor_update=1)
var/mob/dead/observer/C = pick(candies)
message_admins("Ghost candidate found! [C] key [C.key] is becoming a clone of [M] key: [M.key] (They agreed to respect the character they're becoming, and agreed to not ERP without express permission from the original.)")
SM.key = C.key
candies = shuffle(candies)//Shake those ghosts up!
for(var/mob/dead/observer/C2 in candies)
if(C2.key && C2)
SM.key = C2.key
message_admins("Ghost candidate found! [C2] key [C2.key] is becoming a clone of [M] key: [M.key] (They agreed to respect the character they're becoming, and agreed to not ERP without express permission from the original.)")
log_game("FERMICHEM: [M] ckey: [M.key] is creating a clone, controlled by [C2]")
break
else
candies =- C2
if(!SM.mind) //Something went wrong, use alt mechanics
return ..()
SM.mind.enslave_mind_to_creator(M)
//If they're a zombie, they can try to negate it with this.