mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-09 08:51:57 +00:00
Merge remote-tracking branch 'remotes/git-svn' into bs12_with_tgport (r4649)
Conflicts: code/game/gamemodes/wizard/rightandwrong.dm code/game/machinery/computer/law.dm code/game/machinery/telecomms/broadcaster.dm code/game/objects/items/devices/uplinks.dm code/modules/food/recipes_microwave.dm html/changelog.html icons/effects/effects.dmi Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -317,13 +317,20 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
return
|
||||
|
||||
if(cmptext("ai",role))
|
||||
oldname = null//don't bother with the records update crap
|
||||
world << "<b>[newname] is the AI!</b>"
|
||||
world << sound('sound/AI/newAI.ogg')
|
||||
for(var/mob/aiEye/E in mob_list)
|
||||
if(E.ai && E.ai == src)
|
||||
E.name = "[newname] (AI Eye)"
|
||||
break
|
||||
if(isAI(src))
|
||||
var/mob/living/silicon/ai/A = src
|
||||
oldname = null//don't bother with the records update crap
|
||||
world << "<b>[newname] is the AI!</b>"
|
||||
world << sound('sound/AI/newAI.ogg')
|
||||
// Set eyeobj name
|
||||
if(A.eyeobj)
|
||||
A.eyeobj.name = "[newname] (AI Eye)"
|
||||
|
||||
// Set ai pda name
|
||||
if(A.aiPDA)
|
||||
A.aiPDA.owner = newname
|
||||
A.aiPDA.name = newname + " (" + A.aiPDA.ownjob + ")"
|
||||
|
||||
|
||||
fully_replace_character_name(oldname,newname)
|
||||
|
||||
@@ -357,25 +364,32 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
return borgs[select]
|
||||
|
||||
//When a borg is activated, it can choose which AI it wants to be slaved to
|
||||
/proc/activeais()
|
||||
var/select = null
|
||||
var/list/names = list()
|
||||
var/list/ais = list()
|
||||
var/list/namecounts = list()
|
||||
for (var/mob/living/silicon/ai/A in player_list)
|
||||
var/name = A.real_name
|
||||
if (A.stat == 2)
|
||||
/proc/active_ais()
|
||||
. = list()
|
||||
for(var/mob/living/silicon/ai/A in living_mob_list)
|
||||
if(A.stat == DEAD)
|
||||
continue
|
||||
if (A.control_disabled == 1)
|
||||
if(A.control_disabled == 1)
|
||||
continue
|
||||
else
|
||||
names.Add(name)
|
||||
namecounts[name] = 1
|
||||
ais[name] = A
|
||||
. += A
|
||||
return .
|
||||
|
||||
if (ais.len)
|
||||
select = input("AI signals detected:", "AI selection") in ais
|
||||
return ais[select]
|
||||
//Find an active ai with the least borgs. VERBOSE PROCNAME HUH!
|
||||
/proc/select_active_ai_with_fewest_borgs()
|
||||
var/mob/living/silicon/ai/selected
|
||||
var/list/active = active_ais()
|
||||
for(var/mob/living/silicon/ai/A in active)
|
||||
if(!selected || (selected.connected_robots > A.connected_robots))
|
||||
selected = A
|
||||
|
||||
return selected
|
||||
|
||||
/proc/select_active_ai(var/mob/user)
|
||||
var/list/ais = active_ais()
|
||||
if(ais.len)
|
||||
if(user) . = input(usr,"AI signals detected:", "AI selection") in ais
|
||||
else . = pick(ais)
|
||||
return .
|
||||
|
||||
/proc/get_sorted_mobs()
|
||||
var/list/old_list = getmobs()
|
||||
@@ -1346,4 +1360,4 @@ proc/is_hot(obj/item/W as obj)
|
||||
if(WEST)
|
||||
return EAST
|
||||
if(NORTHWEST)
|
||||
return SOUTHEAST
|
||||
return SOUTHEAST
|
||||
|
||||
Reference in New Issue
Block a user