Bringing the trunk upto speed with V1.0 in terms of bug fixes

This commit is contained in:
zjm7891
2008-08-17 14:57:25 +00:00
parent 0155eaedfa
commit 030a16f0f6
14 changed files with 747 additions and 890 deletions
+50 -50
View File
@@ -31,16 +31,16 @@
for(var/mob/human/M in world)
if ((!( M.client ) || !( M.start ) || M.already_placed))
else
unassigned_mobs += M
//If someone picked AI before it was disabled, or has a saved profile with it on a game that now lacks it, this will make sure they don't become the AI, by changing that choice to Captain.
if (!config.allowai)
if (M.occupation1 == "AI")
M.occupation1 = "Captain"
if (M.occupation2 == "AI")
M.occupation2 = "Captain"
if (M.occupation3 == "AI")
M.occupation3 = "Captain"
unassigned_mobs += M
//If someone picked AI before it was disabled, or has a saved profile with it on a game that now lacks it, this will make sure they don't become the AI, by changing that choice to Captain.
if (!config.allowai)
if (M.occupation1 == "AI")
M.occupation1 = "Captain"
if (M.occupation2 == "AI")
M.occupation2 = "Captain"
if (M.occupation3 == "AI")
M.occupation3 = "Captain"
if (M.occupation1 != "No Preference")
occupations1[M.occupation1] += M
if (M.occupation2 != "No Preference")
@@ -58,28 +58,28 @@
if (captain_choice.len>0)
final_occupations["Captain"] += captain_choice[1]
occupation_choices -= "Captain"
unassigned_mobs -= captain_choice[1]
var/list/captain = final_occupations["Captain"]
unassigned_mobs -= captain_choice[1]
var/list/captain = final_occupations["Captain"]
if (captain.len==0)
captain_choice = occupations2["Captain"]
if (captain_choice.len)
final_occupations["Captain"] += captain_choice[1]
occupation_choices -= "Captain"
unassigned_mobs -= captain_choice[1]
unassigned_mobs -= captain_choice[1]
captain = final_occupations["Captain"]
if (captain.len==0)
captain_choice = occupations3["Captain"]
if (captain_choice.len)
final_occupations["Captain"] += captain_choice[1]
occupation_choices -= "Captain"
unassigned_mobs -= captain_choice[1]
unassigned_mobs -= captain_choice[1]
captain = final_occupations["Captain"]
if (captain.len==0)
var/list/contenders = list( )
for(var/mob/human/M in world)
if (M.client)
if (M.client)
if (M.start)
contenders += M
if (contenders.len>1)
@@ -87,14 +87,14 @@
final_occupations["Captain"] += M
occupation_choices -= "Captain"
unassigned_mobs -= M
if (M.occupation1 != "No Preference")
occupations1[text("[]", M.occupation1)] -= M
if (M.occupation2 != "No Preference")
occupations2[text("[]", M.occupation2)] -= M
if (M.occupation3 != "No Preference")
occupations3[text("[]", M.occupation3)] -= M
else
world << text("Captainship not forced on someone since this is a one-player game.")
if (M.occupation1 != "No Preference")
occupations1[text("[]", M.occupation1)] -= M
if (M.occupation2 != "No Preference")
occupations2[text("[]", M.occupation2)] -= M
if (M.occupation3 != "No Preference")
occupations3[text("[]", M.occupation3)] -= M
else
world << text("Captainship not forced on someone since this is a one-player game.")
for(var/mob/human/M in unassigned_mobs)
if (assistant_occupations.Find(M.occupation1))
M.Assign_Rank(M.occupation1)
@@ -199,18 +199,18 @@
E.Assign_Rank(occupation)
for(var/mob/human/M in unassigned_mobs)
M.Assign_Rank(pick("Research Assistant", "Technical Assistant", "Medical Assistant", "Staff Assistant"))
for (var/mob/ai/aiPlayer in world)
spawn(0)
var/newname = input(aiPlayer, "You are the AI. Would you like to change your name to something else?", "Name change", aiPlayer.rname)
if (newname)
if (length(newname) >= 26)
newname = copytext(newname, 1, 26)
newname = dd_replacetext(newname, ">", "'")
aiPlayer.rname = newname
aiPlayer.name = newname
world << text("<b>[] is the AI!</b>", aiPlayer.rname)
spawn(0)
for(var/mob/ai/aiPlayer in world)
var/newname = input(aiPlayer, "You are the AI. Would you like to change your name to something else?", "Name change", aiPlayer.rname)
if (newname)
if (length(newname) >= 26)
newname = copytext(newname, 1, 26)
newname = dd_replacetext(newname, ">", "'")
aiPlayer.rname = newname
aiPlayer.name = newname
world << text("<b>[] is the AI!</b>", aiPlayer.rname)
return
/proc/shuffle(var/list/shufflelist)
@@ -311,7 +311,7 @@
if(3.0)
HTML += "<b>Which occupation would you like if you couldn't have the others?</b><br><br>"
else
for(var/job in uniquelist(occupations + assistant_occupations) )
for(var/job in uniquelist(occupations + assistant_occupations) )
if (job!="AI" || config.allowai)
HTML += text("<a href=\"byond://?src=\ref[];occ=[];job=[]\">[]</a><br>", src, occ, job, job)
HTML += text("<a href=\"byond://?src=\ref[];occ=[];job=Captain\">Captain</a><br>", src, occ)
@@ -338,8 +338,8 @@
if (job == null)
job = "Captain"
if ((!( occupations.Find(job) ) && !( assistant_occupations.Find(job) ) && job != "Captain"))
return
if (job=="AI" && (!config.allowai))
return
if (job=="AI" && (!config.allowai))
return
switch(occ)
if(1.0)
@@ -596,13 +596,13 @@
src << "\blue <B>You have been teleported to your new starting location!</B>"
src.loc = S.loc
return
/proc/AutoUpdateAI(obj/subject, isSelf)
if (subject!=null)
for(var/mob/ai/M in world)
if ((M.client && M.machine == subject))
if (isSelf==0)
subject.attack_ai(M)
else
subject:attack_self(M)
/proc/AutoUpdateAI(obj/subject, isSelf)
if (subject!=null)
for(var/mob/ai/M in world)
if ((M.client && M.machine == subject))
if (isSelf==0)
subject.attack_ai(M)
else
subject:attack_self(M)