mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 12:04:48 +01:00
ai mind (#23651)
This commit is contained in:
@@ -208,7 +208,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
|
||||
|
||||
/mob/living/silicon/robot/rename_character(oldname, newname)
|
||||
if(!..(oldname, newname))
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(oldname != real_name)
|
||||
notify_ai(3, oldname, newname)
|
||||
@@ -225,7 +225,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
|
||||
if(mmi && mmi.brainmob)
|
||||
mmi.brainmob.name = newname
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/mob/living/silicon/robot/proc/check_custom_sprite()
|
||||
if(!custom_sprite && (ckey in GLOB.configuration.custom_sprites.cyborg_ckeys))
|
||||
|
||||
@@ -167,13 +167,15 @@
|
||||
alarm_types_clear[key] = 0
|
||||
|
||||
/mob/living/silicon/rename_character(oldname, newname)
|
||||
// we actually don't want it changing minds and stuff
|
||||
if(!newname)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
real_name = newname
|
||||
name = real_name
|
||||
return 1
|
||||
if(mind?.is_original_mob(src))
|
||||
mind.set_original_mob(src) // update our original mind name, since this is our original mob.
|
||||
mind.name = newname
|
||||
return TRUE
|
||||
|
||||
/mob/living/silicon/proc/show_laws()
|
||||
return
|
||||
|
||||
@@ -445,10 +445,10 @@
|
||||
|
||||
/mob/living/simple_animal/bot/rename_character(oldname, newname)
|
||||
if(!..(oldname, newname))
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
set_custom_texts()
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/mob/living/simple_animal/bot/proc/set_custom_texts() //Superclass for setting hack texts. Appears only if a set is not given to a bot locally.
|
||||
text_hack = "You hack [name]."
|
||||
|
||||
@@ -602,7 +602,7 @@
|
||||
|
||||
/mob/proc/rename_character(oldname, newname)
|
||||
if(!newname)
|
||||
return 0
|
||||
return FALSE
|
||||
real_name = newname
|
||||
name = newname
|
||||
if(mind)
|
||||
@@ -620,8 +620,8 @@
|
||||
|
||||
//update our pda and id if we have them on our person
|
||||
var/list/searching = GetAllContents(searchDepth = 3)
|
||||
var/search_id = 1
|
||||
var/search_pda = 1
|
||||
var/search_id = TRUE
|
||||
var/search_pda = TRUE
|
||||
|
||||
for(var/A in searching)
|
||||
if(search_id && istype(A,/obj/item/card/id))
|
||||
@@ -630,27 +630,26 @@
|
||||
ID.registered_name = newname
|
||||
ID.name = "[newname]'s ID Card ([ID.assignment])"
|
||||
ID.RebuildHTML()
|
||||
if(!search_pda) break
|
||||
search_id = 0
|
||||
if(!search_pda)
|
||||
break
|
||||
search_id = FALSE
|
||||
|
||||
else if(search_pda && istype(A,/obj/item/pda))
|
||||
var/obj/item/pda/PDA = A
|
||||
if(PDA.owner == oldname)
|
||||
PDA.owner = newname
|
||||
PDA.name = "PDA-[newname] ([PDA.ownjob])"
|
||||
if(!search_id) break
|
||||
search_pda = 0
|
||||
if(!search_id)
|
||||
break
|
||||
search_pda = FALSE
|
||||
|
||||
//Fixes renames not being reflected in objective text
|
||||
var/length
|
||||
var/pos
|
||||
for(var/datum/objective/objective in GLOB.all_objectives)
|
||||
if(!mind || objective.target != mind)
|
||||
continue
|
||||
length = length(oldname)
|
||||
pos = findtextEx(objective.explanation_text, oldname)
|
||||
objective.explanation_text = copytext(objective.explanation_text, 1, pos)+newname+copytext(objective.explanation_text, pos+length)
|
||||
return 1
|
||||
if(mind)
|
||||
for(var/datum/objective/objective in GLOB.all_objectives)
|
||||
if(objective.target != mind)
|
||||
continue
|
||||
objective.update_explanation_text()
|
||||
return TRUE
|
||||
|
||||
/mob/proc/rename_self(role, allow_numbers = FALSE, force = FALSE)
|
||||
spawn(0)
|
||||
|
||||
Reference in New Issue
Block a user