Antagonist system refactor. Fixes #9495, #9290, #9521, #8800 and #9465.

This commit is contained in:
Zuhayr
2015-06-21 14:35:33 +09:30
parent af59dbab55
commit ec5e05b9f1
34 changed files with 598 additions and 520 deletions

View File

@@ -410,43 +410,11 @@
dat += "Launching now..."
dat += "<a href='?src=\ref[src];delay_round_end=1'>[ticker.delay_end ? "End Round Normally" : "Delay Round End"]</a><br>"
//todo
dat += "<hr>"
for(var/antag_type in all_antag_types)
var/datum/antagonist/A = all_antag_types[antag_type]
dat += A.get_check_antag_output(src)
dat += "</body></html>"
usr << browse(dat, "window=roundstatus;size=400x500")
else
alert("The game hasn't started yet!")
/proc/check_role_table(name, list/members, admins, show_objectives=1)
var/txt = "<br><table cellspacing=5><tr><td><b>[name]</b></td><td></td></tr>"
for(var/datum/mind/M in members)
txt += check_role_table_row(M.current, admins, show_objectives)
txt += "</table>"
return txt
/proc/check_role_table_row(mob/M, admins=src, show_objectives)
if (!istype(M))
return "<tr><td><i>Not found!</i></td></tr>"
var/txt = {"
<tr>
<td>
<a href='?src=\ref[admins];adminplayeropts=\ref[M]'>[M.real_name]</a>
[M.client ? "" : " <i>(logged out)</i>"]
[M.is_dead() ? " <b><font color='red'>(DEAD)</font></b>" : ""]
</td>
<td>
<a href='?src=\ref[usr];priv_msg=\ref[M]'>PM</a>
</td>
"}
if (show_objectives)
txt += {"
<td>
<a href='?src=\ref[admins];traitor=\ref[M]'>Show Objective</a>
</td>
"}
txt += "</tr>"
return txt

View File

@@ -1734,13 +1734,13 @@
feedback_add_details("admin_secrets_fun_used","Aliens")
log_admin("[key_name(usr)] spawned an alien infestation", 1)
message_admins("\blue [key_name_admin(usr)] attempted an alien infestation", 1)
xenomorphs.random_spawn()
xenomorphs.attempt_random_spawn()
if("borers")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","Borers")
log_admin("[key_name(usr)] spawned a cortical borer infestation.", 1)
message_admins("\blue [key_name_admin(usr)] spawned a cortical borer infestation.", 1)
borers.random_spawn()
borers.attempt_random_spawn()
if("power")
feedback_inc("admin_secrets_fun_used",1)
@@ -2046,7 +2046,7 @@
if("aliens")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","AL")
if(xenomorphs.random_spawn())
if(xenomorphs.attempt_random_spawn())
message_admins("[key_name_admin(usr)] has spawned aliens", 1)
if("spiders")
feedback_inc("admin_secrets_fun_used",1)
@@ -2644,4 +2644,4 @@ mob/living/carbon/human/can_centcom_reply()
return istype(l_ear, /obj/item/device/radio/headset) || istype(r_ear, /obj/item/device/radio/headset)
mob/living/silicon/ai/can_centcom_reply()
return common_radio != null && !check_unable(2)
return common_radio != null && !check_unable(2)

View File

@@ -10,4 +10,4 @@
valid_types |= antag
if(valid_types.len)
var/datum/antagonist/antag = pick(valid_types)
antag.random_spawn()
antag.attempt_random_spawn()

View File

@@ -257,12 +257,13 @@
lawupdate = 0
src << "<b>Systems rebooted</b>. Loading base pattern maintenance protocol... <b>loaded</b>."
full_law_reset()
src << "<br><b>You are a maintenance drone, a tiny-brained robotic repair machine</b>."
welcome_drone()
/mob/living/silicon/robot/drone/proc/welcome_drone()
src << "<b>You are a maintenance drone, a tiny-brained robotic repair machine</b>."
src << "You have no individual will, no personality, and no drives or urges other than your laws."
src << "Use <b>:d</b> to talk to other drones and <b>say</b> to speak silently to your nearby fellows."
src << "Remember, you are <b>lawed against interference with the crew</b>. Also remember, <b>you DO NOT take orders from the AI.</b>"
src << "<b>Don't invade their worksites, don't steal their resources, don't tell them about the changeling in the toilets.</b>"
src << "<b>If a crewmember has noticed you, <i>you are probably breaking your third law</i></b>."
src << "Use <b>:d</b> to talk to other drones and <b>say</b> to speak silently to your nearby fellows."
/mob/living/silicon/robot/drone/start_pulling(var/atom/movable/AM)
@@ -293,6 +294,12 @@
can_pull_size = 5
can_pull_mobs = 1
/mob/living/silicon/robot/drone/construction/welcome_drone()
src << "<b>You are a construction drone, an autonomous engineering and fabrication system.</b>."
src << "You are assigned to a Sol Central construction project. The name is irrelevant. Your task is to complete construction and subsystem integration as soon as possible."
src << "Use <b>:d</b> to talk to other drones and <b>say</b> to speak silently to your nearby fellows."
src << "<b>You do not follow orders from anyone; not the AI, not humans, and not other synthetics.</b>."
/mob/living/silicon/robot/drone/construction/init()
..()
flavor_text = "It's a bulky construction drone stamped with a Sol Central glyph."