mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
[MIRROR] Changing changeling (Refactor) (#11142)
Co-authored-by: Cameron Lennox <killer65311@gmail.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
9feb91ec4c
commit
a0c273ce1f
@@ -31,6 +31,8 @@
|
||||
var/assigned_role
|
||||
var/special_role
|
||||
|
||||
var/datum/antag_holder/antag_holder
|
||||
|
||||
var/role_alt_title
|
||||
|
||||
var/datum/job/assigned_job
|
||||
@@ -41,7 +43,6 @@
|
||||
var/has_been_rev = 0//Tracks if this mind has been a rev or not
|
||||
|
||||
var/datum/faction/faction //associated faction
|
||||
var/datum/changeling/changeling //changeling holder
|
||||
|
||||
var/rev_cooldown = 0
|
||||
var/tcrystals = 0
|
||||
@@ -70,15 +71,18 @@
|
||||
/datum/mind/New(var/key)
|
||||
src.key = key
|
||||
purchase_log = list()
|
||||
antag_holder = new
|
||||
..()
|
||||
|
||||
/datum/mind/proc/transfer_to(mob/living/new_character, force = FALSE)
|
||||
if(!istype(new_character))
|
||||
to_world_log("## DEBUG: transfer_to(): Some idiot has tried to transfer_to() a non mob/living mob. Please inform Carn")
|
||||
if(current) //remove ourself from our old body's mind variable
|
||||
if(changeling)
|
||||
var/datum/component/antag/changeling/comp
|
||||
if(current)
|
||||
comp = is_changeling(current) //remove ourself from our old body's mind variable
|
||||
if(comp)
|
||||
current.remove_changeling_powers()
|
||||
remove_verb(current, /datum/changeling/proc/EvolutionMenu)
|
||||
remove_verb(current, /mob/proc/EvolutionMenu)
|
||||
current.mind = null
|
||||
|
||||
if(new_character.mind) //remove any mind currently in our new body's mind variable
|
||||
@@ -87,7 +91,7 @@
|
||||
current = new_character //link ourself to our new body
|
||||
new_character.mind = src //and link our new body to ourself
|
||||
|
||||
if(changeling)
|
||||
if(comp)
|
||||
new_character.make_changeling()
|
||||
|
||||
if(active || force)
|
||||
@@ -471,7 +475,7 @@
|
||||
role_alt_title = null
|
||||
assigned_job = null
|
||||
//faction = null //Uncommenting this causes a compile error due to 'undefined type', fucked if I know.
|
||||
changeling = null
|
||||
//changeling = null //TODO: Figure out where this is all used and move it from mind to mob.
|
||||
initial_account = null
|
||||
objectives = list()
|
||||
special_verbs = list()
|
||||
|
||||
Reference in New Issue
Block a user