mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-27 14:08:44 +01:00
some small things (#17693)
* some small things * . * clean this up * potentially fix nulls in player list * . * Fixes * Update machine_stacking.dm --------- Co-authored-by: C.L. <killer65311@gmail.com>
This commit is contained in:
+2
-12
@@ -1,32 +1,22 @@
|
||||
/* Note from Carnie:
|
||||
The way datum/mind stuff works has been changed a lot.
|
||||
Minds now represent IC characters rather than following a client around constantly.
|
||||
|
||||
Guidelines for using minds properly:
|
||||
|
||||
- Never mind.transfer_to(ghost). The var/current and var/original of a mind must always be of type mob/living!
|
||||
ghost.mind is however used as a reference to the ghost's corpse
|
||||
|
||||
- When creating a new mob for an existing IC character (e.g. cloning a dead guy or borging a brain of a human)
|
||||
the existing mind of the old mob should be transfered to the new mob like so:
|
||||
|
||||
mind.transfer_to(new_mob)
|
||||
|
||||
- You must not assign key= or ckey= after transfer_to() since the transfer_to transfers the client for you.
|
||||
By setting key or ckey explicitly after transfering the mind with transfer_to you will cause bugs like DCing
|
||||
the player.
|
||||
|
||||
- IMPORTANT NOTE 2, if you want a player to become a ghost, use mob.ghostize() It does all the hard work for you.
|
||||
|
||||
- When creating a new mob which will be a new IC character (e.g. putting a shade in a construct or randomly selecting
|
||||
a ghost to become a xeno during an event). Simply assign the key or ckey like you've always done.
|
||||
|
||||
new_mob.key = key
|
||||
|
||||
The Login proc will handle making a new mob for that mobtype (including setting up stuff like mind.name). Simple!
|
||||
However if you want that mind to have any special properties like being a traitor etc you will have to do that
|
||||
yourself.
|
||||
|
||||
*/
|
||||
|
||||
/datum/mind
|
||||
@@ -82,7 +72,7 @@
|
||||
purchase_log = list()
|
||||
..()
|
||||
|
||||
/datum/mind/proc/transfer_to(mob/living/new_character)
|
||||
/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
|
||||
@@ -100,7 +90,7 @@
|
||||
if(changeling)
|
||||
new_character.make_changeling()
|
||||
|
||||
if(active)
|
||||
if(active || force)
|
||||
new_character.key = key //now transfer the key to link the client to our new body
|
||||
|
||||
if(new_character.client)
|
||||
|
||||
Reference in New Issue
Block a user