mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-28 06:27:26 +01:00
Refactors the mind.original variable into non reference variables. Improving player mob GC (#17219)
This commit is contained in:
@@ -84,7 +84,7 @@ GLOBAL_VAR_INIT(sent_strike_team, 0)
|
||||
R.real_name = R.name
|
||||
R.mind = new
|
||||
R.mind.current = R
|
||||
R.mind.original = R
|
||||
R.mind.set_original_mob(R)
|
||||
R.mind.assigned_role = SPECIAL_ROLE_DEATHSQUAD
|
||||
R.mind.special_role = SPECIAL_ROLE_DEATHSQUAD
|
||||
R.mind.offstation_role = TRUE
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
photosync()
|
||||
to_chat(src, "<b>Laws synced with AI, be sure to note any changes.</b>")
|
||||
// TODO: Update to new antagonist system.
|
||||
if(mind && mind.special_role == SPECIAL_ROLE_TRAITOR && mind.original == src)
|
||||
if(mind && mind.special_role == SPECIAL_ROLE_TRAITOR && mind.is_original_mob(src))
|
||||
to_chat(src, "<b>Remember, your AI does NOT share or know about your law 0.")
|
||||
else
|
||||
to_chat(src, "<b>No AI selected to sync laws with, disabling lawsync protocol.</b>")
|
||||
@@ -30,7 +30,7 @@
|
||||
to_chat(who, "<b>Obey these laws:</b>")
|
||||
laws.show_laws(who)
|
||||
// TODO: Update to new antagonist system.
|
||||
if(mind && (mind.special_role == SPECIAL_ROLE_TRAITOR && mind.original == src) && connected_ai)
|
||||
if(mind && (mind.special_role == SPECIAL_ROLE_TRAITOR && mind.is_original_mob(src)) && connected_ai)
|
||||
to_chat(who, "<b>Remember, [connected_ai.name] is technically your master, but your objective comes first.</b>")
|
||||
else if(connected_ai)
|
||||
to_chat(who, "<b>Remember, [connected_ai.name] is your master, other AIs can be ignored.</b>")
|
||||
|
||||
@@ -165,7 +165,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
|
||||
..()
|
||||
|
||||
add_robot_verbs()
|
||||
|
||||
|
||||
// Remove inherited verbs that effectively do nothing for cyborgs, or lead to unintended behaviour.
|
||||
verbs -= /mob/living/verb/lay_down
|
||||
verbs -= /mob/living/verb/mob_sleep
|
||||
@@ -1362,7 +1362,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
|
||||
real_name = name
|
||||
mind = new
|
||||
mind.current = src
|
||||
mind.original = src
|
||||
mind.set_original_mob(src)
|
||||
mind.assigned_role = SPECIAL_ROLE_ERT
|
||||
mind.special_role = SPECIAL_ROLE_ERT
|
||||
if(!(mind in SSticker.minds))
|
||||
|
||||
@@ -457,8 +457,8 @@ GLOBAL_LIST_INIT(intents, list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM
|
||||
var/realname = C.mob.real_name
|
||||
if(C.mob.mind)
|
||||
mindname = C.mob.mind.name
|
||||
if(C.mob.mind.original && C.mob.mind.original.real_name)
|
||||
realname = C.mob.mind.original.real_name
|
||||
if(C.mob.mind.original_mob_name)
|
||||
realname = C.mob.mind.original_mob_name
|
||||
if(mindname && mindname != realname)
|
||||
name = "[realname] died as [mindname]"
|
||||
else
|
||||
|
||||
@@ -550,7 +550,7 @@
|
||||
else if(mind.assigned_role == "Mime")
|
||||
new_character.real_name = pick(GLOB.mime_names)
|
||||
new_character.rename_self("mime")
|
||||
mind.original = new_character
|
||||
mind.set_original_mob(new_character)
|
||||
mind.transfer_to(new_character) //won't transfer key since the mind is not active
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
if(mind)
|
||||
mind.transfer_to(O)
|
||||
O.mind.original = O
|
||||
O.mind.set_original_mob(O)
|
||||
else
|
||||
O.key = key
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
if(mind) //TODO
|
||||
mind.transfer_to(O)
|
||||
if(O.mind.assigned_role == "Cyborg")
|
||||
O.mind.original = O
|
||||
O.mind.set_original_mob(O)
|
||||
else if(mind && mind.special_role)
|
||||
O.mind.store_memory("In case you look at this after being borged, the objectives are only here until I find a way to make them not show up for you, as I can't simply delete them without screwing up round-end reporting. --NeoFite")
|
||||
else
|
||||
|
||||
@@ -174,7 +174,7 @@ GLOBAL_VAR_INIT(ert_request_answered, FALSE)
|
||||
//Creates mind stuff.
|
||||
M.mind = new
|
||||
M.mind.current = M
|
||||
M.mind.original = M
|
||||
M.mind.set_original_mob(M)
|
||||
M.mind.assigned_role = SPECIAL_ROLE_ERT
|
||||
M.mind.special_role = SPECIAL_ROLE_ERT
|
||||
M.mind.offstation_role = TRUE
|
||||
|
||||
Reference in New Issue
Block a user