Moved cyborg law-syncing back into New().

New Borgs now sync with the AI with the fewest associated borgs. So, say there were 3 AIs and 6 borgs, each would get two each.
Cyborg cells now default to 7500 (like the transform procs do), this is so admin-spawn borgs don't end up with 1500-charge cells with a max of 1000-charge.
Default lawset is asimov rather than an empty lawset
pulsing a borg's sync wire will cause it to randomly pick an AI.
As a borg, your laws are shown to you at login.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4641 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
elly1989@rocketmail.com
2012-09-07 09:24:54 +00:00
parent 65a4545784
commit ca7cb95b7d
5 changed files with 66 additions and 76 deletions
+22 -15
View File
@@ -364,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 living_mob_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 .
//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)
select = input("AI signals detected:", "AI selection") in ais
return ais[select]
if(user) . = input(usr,"AI signals detected:", "AI selection") in ais
else . = pick(ais)
return .
//Returns a list of all mobs with their name
/proc/getmobs()