Merge pull request #206 from alex-gh/mutiny_fixes

Merged latest mutiny fixes.
This commit is contained in:
alex-gh
2014-05-19 19:56:10 +02:00
17 changed files with 1120 additions and 1081 deletions
+30 -30
View File
@@ -1,39 +1,39 @@
/obj/item/weapon/mutiny/auth_key
name = "authentication key"
desc = "Better keep this safe."
icon = 'icons/obj/items.dmi'
icon_state = "nucleardisk"
item_state = "card-id"
w_class = 1
name = "authentication key"
desc = "Better keep this safe."
icon = 'icons/obj/items.dmi'
icon_state = "nucleardisk"
item_state = "card-id"
w_class = 1
var/time_entered_space
var/obj/item/device/radio/radio
var/time_entered_space
var/obj/item/device/radio/radio
New()
radio = new(src)
spawn(20 SECONDS)
keep_alive()
..()
New()
radio = new(src)
spawn(20 SECONDS)
keep_alive()
..()
proc/keep_alive()
var/in_space = istype(loc, /turf/space)
if (!in_space && time_entered_space)
// Recovered before the key was lost
time_entered_space = null
else if (in_space && !time_entered_space)
// The key has left the station
time_entered_space = world.time
else if (in_space && time_entered_space + (10 SECONDS) < world.time)
// Time is up
radio.autosay("This device has left the station's perimeter. Triggering emergency activation failsafe.", name)
del(src)
return
proc/keep_alive()
var/in_space = istype(loc, /turf/space)
if (!in_space && time_entered_space)
// Recovered before the key was lost
time_entered_space = null
else if (in_space && !time_entered_space)
// The key has left the station
time_entered_space = world.time
else if (in_space && time_entered_space + (10 SECONDS) < world.time)
// Time is up
radio.autosay("This device has left the station's perimeter. Triggering emergency activation failsafe.", name)
del(src)
return
spawn(10 SECONDS)
keep_alive()
spawn(10 SECONDS)
keep_alive()
/obj/item/weapon/mutiny/auth_key/captain
name = "Captain's Authentication Key"
name = "Captain's Authentication Key"
/obj/item/weapon/mutiny/auth_key/secondary
name = "Emergency Secondary Authentication Key"
name = "Emergency Secondary Authentication Key"
+20 -20
View File
@@ -1,29 +1,29 @@
datum/directive
var/datum/game_mode/mutiny/mode
var/list/special_orders
var/datum/game_mode/mutiny/mode
var/list/special_orders
New(var/datum/game_mode/mutiny/M)
mode = M
New(var/datum/game_mode/mutiny/M)
mode = M
proc/get_description()
return {"
<p>
NanoTrasen's reasons for the following directives are classified.
</p>
"}
proc/get_description()
return {"
<p>
NanoTrasen's reasons for the following directives are classified.
</p>
"}
proc/meets_prerequisites()
return 0
proc/meets_prerequisites()
return 0
proc/directives_complete()
return 1
proc/directives_complete()
return 1
proc/initialize()
return 1
proc/initialize()
return 1
/proc/get_directive(type)
var/datum/game_mode/mutiny/mode = get_mutiny_mode()
if(!mode || !mode.current_directive || !istype(mode.current_directive, text2path("/datum/directive/[type]")))
return null
var/datum/game_mode/mutiny/mode = get_mutiny_mode()
if(!mode || !mode.current_directive || !istype(mode.current_directive, text2path("/datum/directive/[type]")))
return null
return mode.current_directive
return mode.current_directive
@@ -1,36 +1,36 @@
datum/directive/terminations/alien_fraud
special_orders = list(
"Suspend financial accounts of all Tajaran and Unathi personnel.",
"Transfer their payrolls to the station account.",
"Terminate their employment.")
special_orders = list(
"Suspend financial accounts of all Tajaran and Unathi personnel.",
"Transfer their payrolls to the station account.",
"Terminate their employment.")
datum/directive/terminations/alien_fraud/get_crew_to_terminate()
var/list/aliens[0]
for(var/mob/living/carbon/human/H in player_list)
if (H.species.name == "Tajaran" || H.species.name == "Unathi")
aliens.Add(H)
return aliens
var/list/aliens[0]
for(var/mob/living/carbon/human/H in player_list)
if (H.species.name == "Tajaran" || H.species.name == "Unathi")
aliens.Add(H)
return aliens
datum/directive/terminations/alien_fraud/get_description()
return {"
<p>
An extensive conspiracy network aimed at defrauding NanoTrasen of large amounts of funds has been uncovered
operating within Tau Ceti. Human personnel are not suspected to be involved. Further information is classified.
</p>
"}
return {"
<p>
An extensive conspiracy network aimed at defrauding NanoTrasen of large amounts of funds has been uncovered
operating within Tau Ceti. Human personnel are not suspected to be involved. Further information is classified.
</p>
"}
datum/directive/terminations/alien_fraud/meets_prerequisites()
// There must be at least one Tajaran and at least one Unathi, but the total
// of the Tajarans and Unathi combined can't be more than 1/3rd of the crew.
var/tajarans = 0
var/unathi = 0
for(var/mob/living/carbon/human/H in player_list)
if (H.species.name == "Tajaran")
tajarans++
if (H.species.name == "Unathi")
unathi++
// There must be at least one Tajaran and at least one Unathi, but the total
// of the Tajarans and Unathi combined can't be more than 1/3rd of the crew.
var/tajarans = 0
var/unathi = 0
for(var/mob/living/carbon/human/H in player_list)
if (H.species.name == "Tajaran")
tajarans++
if (H.species.name == "Unathi")
unathi++
if (!tajarans || !unathi)
return 0
if (!tajarans || !unathi)
return 0
return (tajarans + unathi) <= (player_list.len / 3)
return (tajarans + unathi) <= (player_list.len / 3)
@@ -1,45 +1,45 @@
#define INFECTION_COUNT 5
datum/directive/bluespace_contagion
var/infection_count = 5
var/list/infected = list()
var/infection_count = 5
var/list/infected = list()
datum/directive/bluespace_contagion/get_description()
return {"
<p>
A manufactured and near-undetectable virus is spreading on NanoTrasen stations.
The pathogen travels by bluespace after maturing for one day.
No treatment has yet been discovered. Personnel onboard [station_name()] have been infected. Further information is classified.
</p>
"}
return {"
<p>
A manufactured and near-undetectable virus is spreading on NanoTrasen stations.
The pathogen travels by bluespace after maturing for one day.
No treatment has yet been discovered. Personnel onboard [station_name()] have been infected. Further information is classified.
</p>
"}
datum/directive/bluespace_contagion/initialize()
var/list/candidates = player_list.Copy()
var/list/infected_names = list()
for(var/i=0, i < INFECTION_COUNT, i++)
if(!candidates.len)
break
var/list/candidates = player_list.Copy()
var/list/infected_names = list()
for(var/i=0, i < INFECTION_COUNT, i++)
if(!candidates.len)
break
var/mob/living/carbon/human/candidate = pick(candidates)
candidates.Remove(candidate)
infected.Add(candidate)
infected_names.Add("[candidate.mind.assigned_role] [candidate.mind.name]")
var/mob/living/carbon/human/candidate = pick(candidates)
candidates.Remove(candidate)
infected.Add(candidate)
infected_names.Add("[candidate.mind.assigned_role] [candidate.mind.name]")
special_orders = list(
"Quarantine these personnel: [list2text(infected_names, ", ")].",
"Allow one hour for a cure to be manufactured.",
"If no cure arrives after that time, execute the infected.")
special_orders = list(
"Quarantine these personnel: [list2text(infected_names, ", ")].",
"Allow one hour for a cure to be manufactured.",
"If no cure arrives after that time, execute the infected.")
datum/directive/bluespace_contagion/meets_prerequisites()
return player_list.len >= 7
return player_list.len >= 7
datum/directive/bluespace_contagion/directives_complete()
return infected.len == 0
return infected.len == 0
/hook/death/proc/infected_killed(mob/living/carbon/human/deceased, gibbed)
var/datum/directive/bluespace_contagion/D = get_directive("bluespace_contagion")
if(!D) return 1
var/datum/directive/bluespace_contagion/D = get_directive("bluespace_contagion")
if(!D) return 1
if(deceased in D.infected)
D.infected.Remove(deceased)
return 1
if(deceased in D.infected)
D.infected.Remove(deceased)
return 1
@@ -1,26 +1,26 @@
datum/directive/terminations/financial_crisis
special_orders = list(
"Suspend financial accounts of all civilian personnel, excluding the Head of Personnel.",
"Transfer their payrolls to the station account.",
"Terminate their employment.")
special_orders = list(
"Suspend financial accounts of all civilian personnel, excluding the Head of Personnel.",
"Transfer their payrolls to the station account.",
"Terminate their employment.")
datum/directive/terminations/financial_crisis/get_crew_to_terminate()
var/list/civilians[0]
var/list/candidates = civilian_positions - "Head of Personnel"
for(var/mob/living/carbon/human/H in player_list)
if (candidates.Find(H.mind.assigned_role))
civilians.Add(H)
return civilians
var/list/civilians[0]
var/list/candidates = civilian_positions - "Head of Personnel"
for(var/mob/living/carbon/human/H in player_list)
if (candidates.Find(H.mind.assigned_role))
civilians.Add(H)
return civilians
datum/directive/terminations/financial_crisis/get_description()
return {"
<p>
Tau Ceti system banks in financial crisis. Local emergency situation ongoing.
NT Funds redistributed, impact upon civilian department expected.
Further information is classified.
</p>
"}
return {"
<p>
Tau Ceti system banks in financial crisis. Local emergency situation ongoing.
NT Funds redistributed, impact upon civilian department expected.
Further information is classified.
</p>
"}
datum/directive/terminations/financial_crisis/meets_prerequisites()
var/list/civilians = get_crew_to_terminate()
return civilians.len >= 5
var/list/civilians = get_crew_to_terminate()
return civilians.len >= 5
@@ -1,83 +1,83 @@
datum/directive/ipc_virus
special_orders = list(
"Terminate employment of all IPC personnel.",
"Extract the Positronic Brains from IPC units.",
"Mount the Positronic Brains into Cyborgs.")
special_orders = list(
"Terminate employment of all IPC personnel.",
"Extract the Positronic Brains from IPC units.",
"Mount the Positronic Brains into Cyborgs.")
var/list/roboticist_roles = list(
"Research Director",
"Roboticist"
)
var/list/roboticist_roles = list(
"Research Director",
"Roboticist"
)
var/list/brains_to_enslave = list()
var/list/cyborgs_to_make = list()
var/list/ids_to_terminate = list()
var/list/brains_to_enslave = list()
var/list/cyborgs_to_make = list()
var/list/ids_to_terminate = list()
proc/get_ipcs()
var/list/machines[0]
for(var/mob/living/carbon/human/H in player_list)
if (H.species.name == "Machine")
machines.Add(H)
return machines
proc/get_ipcs()
var/list/machines[0]
for(var/mob/living/carbon/human/H in player_list)
if (H.species.name == "Machine")
machines.Add(H)
return machines
proc/get_roboticists()
var/list/roboticists[0]
for(var/mob/living/carbon/human/H in player_list)
if (roboticist_roles.Find(H.mind.assigned_role))
roboticists.Add(H)
return roboticists
proc/get_roboticists()
var/list/roboticists[0]
for(var/mob/living/carbon/human/H in player_list)
if (roboticist_roles.Find(H.mind.assigned_role))
roboticists.Add(H)
return roboticists
datum/directive/ipc_virus/initialize()
for(var/mob/living/carbon/human/H in get_ipcs())
brains_to_enslave.Add(H.mind)
cyborgs_to_make.Add(H.mind)
ids_to_terminate.Add(H.wear_id)
for(var/mob/living/carbon/human/H in get_ipcs())
brains_to_enslave.Add(H.mind)
cyborgs_to_make.Add(H.mind)
ids_to_terminate.Add(H.wear_id)
datum/directive/ipc_virus/get_description()
return {"
<p>
IPC units have been found to be infected with a violent and undesired virus in Virgus Ferrorus system.
Risk to NSS Exodus IPC units has not been assessed. Further information is classified.
</p>
"}
return {"
<p>
IPC units have been found to be infected with a violent and undesired virus in Virgus Ferrorus system.
Risk to NSS Exodus IPC units has not been assessed. Further information is classified.
</p>
"}
datum/directive/ipc_virus/meets_prerequisites()
var/list/ipcs = get_ipcs()
var/list/roboticists = get_roboticists()
return ipcs.len > 2 && roboticists.len > 1
var/list/ipcs = get_ipcs()
var/list/roboticists = get_roboticists()
return ipcs.len > 2 && roboticists.len > 1
datum/directive/ipc_virus/directives_complete()
return brains_to_enslave.len == 0 && cyborgs_to_make.len == 0 && ids_to_terminate.len == 0
return brains_to_enslave.len == 0 && cyborgs_to_make.len == 0 && ids_to_terminate.len == 0
/hook/debrain/proc/debrain_directive(obj/item/brain/B)
var/datum/directive/ipc_virus/D = get_directive("ipc_virus")
if (!D) return 1
var/datum/directive/ipc_virus/D = get_directive("ipc_virus")
if (!D) return 1
if(D.brains_to_enslave.Find(B.brainmob.mind))
D.brains_to_enslave.Remove(B.brainmob.mind)
if(D.brains_to_enslave.Find(B.brainmob.mind))
D.brains_to_enslave.Remove(B.brainmob.mind)
return 1
return 1
/hook/borgify/proc/borgify_directive(mob/living/silicon/robot/cyborg)
var/datum/directive/ipc_virus/D = get_directive("ipc_virus")
if (!D) return 1
var/datum/directive/ipc_virus/D = get_directive("ipc_virus")
if (!D) return 1
if(D.cyborgs_to_make.Find(cyborg.mind))
D.cyborgs_to_make.Remove(cyborg.mind)
if(D.cyborgs_to_make.Find(cyborg.mind))
D.cyborgs_to_make.Remove(cyborg.mind)
// In case something glitchy happened and the victim got
// borged without us tracking the brain removal, go ahead
// and update that list too.
if(D.brains_to_enslave.Find(cyborg.mind))
D.brains_to_enslave.Remove(cyborg.mind)
// In case something glitchy happened and the victim got
// borged without us tracking the brain removal, go ahead
// and update that list too.
if(D.brains_to_enslave.Find(cyborg.mind))
D.brains_to_enslave.Remove(cyborg.mind)
return 1
return 1
/hook/terminate_employee/proc/ipc_termination(obj/item/weapon/card/id)
var/datum/directive/ipc_virus/D = get_directive("ipc_virus")
if (!D) return 1
var/datum/directive/ipc_virus/D = get_directive("ipc_virus")
if (!D) return 1
if(D.ids_to_terminate && D.ids_to_terminate.Find(id))
D.ids_to_terminate.Remove(id)
if(D.ids_to_terminate && D.ids_to_terminate.Find(id))
D.ids_to_terminate.Remove(id)
return 1
return 1
@@ -1,65 +1,65 @@
#define MATERIALS_REQUIRED 200
datum/directive/research_to_ripleys
var/list/ids_to_reassign = list()
var/materials_shipped = 0
var/list/ids_to_reassign = list()
var/materials_shipped = 0
proc/get_researchers()
var/list/researchers[0]
for(var/mob/living/carbon/human/H in player_list)
if (H.mind.assigned_role in science_positions - "Research Director")
researchers.Add(H)
return researchers
proc/get_researchers()
var/list/researchers[0]
for(var/mob/living/carbon/human/H in player_list)
if (H.mind.assigned_role in science_positions - "Research Director")
researchers.Add(H)
return researchers
proc/count_researchers_reassigned()
var/researchers_reassigned = 0
for(var/obj/item/weapon/card/id in ids_to_reassign)
if (ids_to_reassign[id])
researchers_reassigned++
proc/count_researchers_reassigned()
var/researchers_reassigned = 0
for(var/obj/item/weapon/card/id in ids_to_reassign)
if (ids_to_reassign[id])
researchers_reassigned++
return researchers_reassigned
return researchers_reassigned
datum/directive/research_to_ripleys/get_description()
return {"
<p>
The NanoTrasen Tau Ceti Manufactory faces an ore deficit. Financial crisis imminent. [station_name()] has been reassigned as a mining platform.
The Research Director is to assist the Head of Personnel in coordinating assets.
Weapons department reports solid sales. Further information is classified.
</p>
"}
return {"
<p>
The NanoTrasen Tau Ceti Manufactory faces an ore deficit. Financial crisis imminent. [station_name()] has been reassigned as a mining platform.
The Research Director is to assist the Head of Personnel in coordinating assets.
Weapons department reports solid sales. Further information is classified.
</p>
"}
datum/directive/research_to_ripleys/meets_prerequisites()
var/list/researchers = get_researchers()
return researchers.len > 3
var/list/researchers = get_researchers()
return researchers.len > 3
datum/directive/research_to_ripleys/initialize()
for(var/mob/living/carbon/human/R in get_researchers())
ids_to_reassign[R.wear_id] = 0
for(var/mob/living/carbon/human/R in get_researchers())
ids_to_reassign[R.wear_id] = 0
special_orders = list(
"Reassign all research personnel, excluding the Research Director, to Shaft Miner.",
"Deliver [MATERIALS_REQUIRED] sheets of metal or minerals via the supply shuttle to CentCom.")
special_orders = list(
"Reassign all research personnel, excluding the Research Director, to Shaft Miner.",
"Deliver [MATERIALS_REQUIRED] sheets of metal or minerals via the supply shuttle to CentCom.")
datum/directive/research_to_ripleys/directives_complete()
if (materials_shipped < MATERIALS_REQUIRED) return 0
return count_researchers_reassigned() == ids_to_reassign.len
if (materials_shipped < MATERIALS_REQUIRED) return 0
return count_researchers_reassigned() == ids_to_reassign.len
/hook/reassign_employee/proc/research_reassignments(obj/item/weapon/card/id/id_card)
var/datum/directive/research_to_ripleys/D = get_directive("research_to_ripleys")
if(!D) return 1
var/datum/directive/research_to_ripleys/D = get_directive("research_to_ripleys")
if(!D) return 1
if(D.ids_to_reassign && D.ids_to_reassign.Find(id_card))
D.ids_to_reassign[id_card] = id_card.assignment == "Shaft Miner" ? 1 : 0
if(D.ids_to_reassign && D.ids_to_reassign.Find(id_card))
D.ids_to_reassign[id_card] = id_card.assignment == "Shaft Miner" ? 1 : 0
return 1
return 1
/hook/sell_crate/proc/deliver_materials(obj/structure/closet/crate/sold, area/shuttle)
var/datum/directive/research_to_ripleys/D = get_directive("research_to_ripleys")
if(!D) return 1
var/datum/directive/research_to_ripleys/D = get_directive("research_to_ripleys")
if(!D) return 1
for(var/atom/A in sold)
if(istype(A, /obj/item/stack/sheet/mineral) || istype(A, /obj/item/stack/sheet/metal))
var/obj/item/stack/S = A
D.materials_shipped += S.amount
for(var/atom/A in sold)
if(istype(A, /obj/item/stack/sheet/mineral) || istype(A, /obj/item/stack/sheet/metal))
var/obj/item/stack/S = A
D.materials_shipped += S.amount
return 1
return 1
@@ -1,83 +1,83 @@
datum/directive/tau_ceti_needs_women
var/list/command_targets = list()
var/list/alien_targets = list()
var/list/command_targets = list()
var/list/alien_targets = list()
proc/get_target_gender()
if(!mode.head_loyalist) return FEMALE
return mode.head_loyalist.current.gender == FEMALE ? MALE : FEMALE
proc/get_target_gender()
if(!mode.head_loyalist) return FEMALE
return mode.head_loyalist.current.gender == FEMALE ? MALE : FEMALE
proc/get_crew_of_target_gender()
var/list/targets[0]
for(var/mob/living/carbon/human/H in player_list)
if(H.species.name != "Machine" && H.gender == get_target_gender())
targets.Add(H)
return targets
proc/get_crew_of_target_gender()
var/list/targets[0]
for(var/mob/living/carbon/human/H in player_list)
if(H.species.name != "Machine" && H.gender == get_target_gender())
targets.Add(H)
return targets
proc/get_target_heads()
var/list/heads[0]
for(var/mob/living/carbon/human/H in get_crew_of_target_gender())
if(command_positions.Find(H.mind.assigned_role))
heads.Add(H)
return heads
proc/get_target_heads()
var/list/heads[0]
for(var/mob/living/carbon/human/H in get_crew_of_target_gender())
if(command_positions.Find(H.mind.assigned_role))
heads.Add(H)
return heads
proc/get_target_aliens()
var/list/aliens[0]
for(var/mob/living/carbon/human/H in get_crew_of_target_gender())
if (H.species.name == "Tajaran" || H.species.name == "Unathi" || H.species.name == "Skrell")
aliens.Add(H)
return aliens
proc/get_target_aliens()
var/list/aliens[0]
for(var/mob/living/carbon/human/H in get_crew_of_target_gender())
if (H.species.name == "Tajaran" || H.species.name == "Unathi" || H.species.name == "Skrell")
aliens.Add(H)
return aliens
proc/count_heads_reassigned()
var/heads_reassigned = 0
for(var/obj/item/weapon/card/id in command_targets)
if (command_targets[id])
heads_reassigned++
proc/count_heads_reassigned()
var/heads_reassigned = 0
for(var/obj/item/weapon/card/id in command_targets)
if (command_targets[id])
heads_reassigned++
return heads_reassigned
return heads_reassigned
datum/directive/tau_ceti_needs_women/get_description()
return {"
<p>
Recent evidence suggests [get_target_gender()] aptitudes may be effected by radiation from Tau Ceti.
Effects were measured under laboratory and station conditions. Humans remain more trusted than Xeno. Further information is classified.
</p>
"}
return {"
<p>
Recent evidence suggests [get_target_gender()] aptitudes may be effected by radiation from Tau Ceti.
Effects were measured under laboratory and station conditions. Humans remain more trusted than Xeno. Further information is classified.
</p>
"}
datum/directive/tau_ceti_needs_women/initialize()
for(var/mob/living/carbon/human/H in get_target_heads())
command_targets[H.wear_id] = 0
for(var/mob/living/carbon/human/H in get_target_heads())
command_targets[H.wear_id] = 0
for(var/mob/living/carbon/human/H in get_target_aliens())
alien_targets.Add(H.wear_id)
for(var/mob/living/carbon/human/H in get_target_aliens())
alien_targets.Add(H.wear_id)
special_orders = list(
"Remove [get_target_gender()] personnel from Command positions.",
"Terminate employment of all [get_target_gender()] Skrell, Tajara, and Unathi.")
special_orders = list(
"Remove [get_target_gender()] personnel from Command positions.",
"Terminate employment of all [get_target_gender()] Skrell, Tajara, and Unathi.")
datum/directive/tau_ceti_needs_women/meets_prerequisites()
var/list/targets = get_crew_of_target_gender()
return targets.len >= 3
var/list/targets = get_crew_of_target_gender()
return targets.len >= 3
datum/directive/tau_ceti_needs_women/directives_complete()
return command_targets.len == count_heads_reassigned() && alien_targets.len == 0
return command_targets.len == count_heads_reassigned() && alien_targets.len == 0
/hook/reassign_employee/proc/command_reassignments(obj/item/weapon/card/id/id_card)
var/datum/directive/tau_ceti_needs_women/D = get_directive("tau_ceti_needs_women")
if(!D) return 1
var/datum/directive/tau_ceti_needs_women/D = get_directive("tau_ceti_needs_women")
if(!D) return 1
if(D.command_targets && D.command_targets.Find(id_card))
D.command_targets[id_card] = command_positions.Find(id_card.assignment) ? 0 : 1
if(D.command_targets && D.command_targets.Find(id_card))
D.command_targets[id_card] = command_positions.Find(id_card.assignment) ? 0 : 1
return 1
return 1
/hook/terminate_employee/proc/gender_target_termination_directive(obj/item/weapon/card/id)
var/datum/directive/tau_ceti_needs_women/D = get_directive("tau_ceti_needs_women")
if (!D) return 1
var/datum/directive/tau_ceti_needs_women/D = get_directive("tau_ceti_needs_women")
if (!D) return 1
if(D.alien_targets && D.alien_targets.Find(id))
D.alien_targets.Remove(id)
if(D.alien_targets && D.alien_targets.Find(id))
D.alien_targets.Remove(id)
if(D.command_targets && D.command_targets.Find(id))
D.command_targets[id] = 1
if(D.command_targets && D.command_targets.Find(id))
D.command_targets[id] = 1
return 1
return 1
@@ -3,54 +3,54 @@
// flavor text and override get_crew_to_terminate in your child datum.
// See alien_fraud_directive.dm for an example.
datum/directive/terminations
var/list/accounts_to_revoke = list()
var/list/accounts_to_suspend = list()
var/list/ids_to_terminate = list()
var/list/accounts_to_revoke = list()
var/list/accounts_to_suspend = list()
var/list/ids_to_terminate = list()
proc/get_crew_to_terminate()
return list()
proc/get_crew_to_terminate()
return list()
datum/directive/terminations/directives_complete()
for(var/account_number in accounts_to_suspend)
if (!accounts_to_suspend[account_number])
return 0
for(var/account_number in accounts_to_suspend)
if (!accounts_to_suspend[account_number])
return 0
for(var/account_number in accounts_to_revoke)
if (!accounts_to_revoke[account_number])
return 0
for(var/account_number in accounts_to_revoke)
if (!accounts_to_revoke[account_number])
return 0
return ids_to_terminate.len == 0
return ids_to_terminate.len == 0
datum/directive/terminations/initialize()
for(var/mob/living/carbon/human/A in get_crew_to_terminate())
var/datum/money_account/account = A.mind.initial_account
accounts_to_revoke["[account.account_number]"] = 0
accounts_to_suspend["[account.account_number]"] = account.suspended
ids_to_terminate.Add(A.wear_id)
for(var/mob/living/carbon/human/A in get_crew_to_terminate())
var/datum/money_account/account = A.mind.initial_account
accounts_to_revoke["[account.account_number]"] = 0
accounts_to_suspend["[account.account_number]"] = account.suspended
ids_to_terminate.Add(A.wear_id)
/hook/revoke_payroll/proc/payroll_directive(datum/money_account/account)
var/datum/directive/terminations/D = get_directive("terminations")
if (!D) return 1
var/datum/directive/terminations/D = get_directive("terminations")
if (!D) return 1
if(D.accounts_to_revoke && D.accounts_to_revoke.Find("[account.account_number]"))
D.accounts_to_revoke["[account.account_number]"] = 1
if(D.accounts_to_revoke && D.accounts_to_revoke.Find("[account.account_number]"))
D.accounts_to_revoke["[account.account_number]"] = 1
return 1
return 1
/hook/change_account_status/proc/suspension_directive(datum/money_account/account)
var/datum/directive/terminations/D = get_directive("terminations")
if (!D) return 1
var/datum/directive/terminations/D = get_directive("terminations")
if (!D) return 1
if(D.accounts_to_suspend && D.accounts_to_suspend.Find("[account.account_number]"))
D.accounts_to_suspend["[account.account_number]"] = account.suspended
if(D.accounts_to_suspend && D.accounts_to_suspend.Find("[account.account_number]"))
D.accounts_to_suspend["[account.account_number]"] = account.suspended
return 1
return 1
/hook/terminate_employee/proc/termination_directive(obj/item/weapon/card/id)
var/datum/directive/terminations/D = get_directive("terminations")
if (!D) return 1
var/datum/directive/terminations/D = get_directive("terminations")
if (!D) return 1
if(D.ids_to_terminate && D.ids_to_terminate.Find(id))
D.ids_to_terminate.Remove(id)
if(D.ids_to_terminate && D.ids_to_terminate.Find(id))
D.ids_to_terminate.Remove(id)
return 1
return 1
@@ -1,23 +1,23 @@
// For testing
datum/directive/terminations/test
special_orders = list(
"Suspend financial accounts of all ugly personnel.",
"Transfer their payrolls to the station account.",
"Terminate their employment.")
special_orders = list(
"Suspend financial accounts of all ugly personnel.",
"Transfer their payrolls to the station account.",
"Terminate their employment.")
datum/directive/terminations/test/get_crew_to_terminate()
var/list/uglies[0]
for(var/mob/living/carbon/human/H in player_list)
uglies.Add(H)
return uglies
var/list/uglies[0]
for(var/mob/living/carbon/human/H in player_list)
uglies.Add(H)
return uglies
datum/directive/terminations/test/get_description()
return {"
<p>
Wow. Much ugly. So painful.
Many terminations. Very classified.
</p>
"}
return {"
<p>
Wow. Much ugly. So painful.
Many terminations. Very classified.
</p>
"}
datum/directive/terminations/test/meets_prerequisites()
return 1
return 1
@@ -1,105 +1,105 @@
/obj/machinery/emergency_authentication_device
var/datum/game_mode/mutiny/mode
var/datum/game_mode/mutiny/mode
name = "\improper Emergency Authentication Device"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "blackbox"
density = 1
anchored = 1
name = "\improper Emergency Authentication Device"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "blackbox"
density = 1
anchored = 1
var/captains_key
var/secondary_key
var/activated = 0
var/captains_key
var/secondary_key
var/activated = 0
flags = FPRINT
use_power = 0
flags = FPRINT
use_power = 0
New(loc, mode)
src.mode = mode
..(loc)
New(loc, mode)
src.mode = mode
..(loc)
proc/check_key_existence()
if(!mode.captains_key)
captains_key = 1
proc/check_key_existence()
if(!mode.captains_key)
captains_key = 1
if(!mode.secondary_key)
secondary_key = 1
if(!mode.secondary_key)
secondary_key = 1
proc/get_status()
if(activated)
return "Activated"
if(captains_key && secondary_key)
return "Both Keys Authenticated"
if(captains_key)
return "Captain's Key Authenticated"
if(secondary_key)
return "Secondary Key Authenticated"
else
return "Inactive"
proc/get_status()
if(activated)
return "Activated"
if(captains_key && secondary_key)
return "Both Keys Authenticated"
if(captains_key)
return "Captain's Key Authenticated"
if(secondary_key)
return "Secondary Key Authenticated"
else
return "Inactive"
/obj/machinery/emergency_authentication_device/attack_hand(mob/user)
if(activated)
user << "\blue \The [src] is already active!"
return
if(activated)
user << "\blue \The [src] is already active!"
return
if(!mode.current_directive.directives_complete())
state("Command aborted. Communication with CentComm is prohibited until Directive X has been completed.")
return
if(!mode.current_directive.directives_complete())
state("Command aborted. Communication with CentComm is prohibited until Directive X has been completed.")
return
check_key_existence()
if(captains_key && secondary_key)
activated = 1
user << "\blue You activate \the [src]!"
state("Command acknowledged. Initiating quantum entanglement relay to NanoTrasen High Command.")
return
check_key_existence()
if(captains_key && secondary_key)
activated = 1
user << "\blue You activate \the [src]!"
state("Command acknowledged. Initiating quantum entanglement relay to NanoTrasen High Command.")
return
if(!captains_key && !secondary_key)
state("Command aborted. Please present the authentication keys before proceeding.")
return
if(!captains_key && !secondary_key)
state("Command aborted. Please present the authentication keys before proceeding.")
return
if(!captains_key)
state("Command aborted. Please present the Captain's Authentication Key.")
return
if(!captains_key)
state("Command aborted. Please present the Captain's Authentication Key.")
return
if(!secondary_key)
state("Command aborted. Please present the Emergency Secondary Authentication Key.")
return
if(!secondary_key)
state("Command aborted. Please present the Emergency Secondary Authentication Key.")
return
// Impossible!
state("Command aborted. This unit is defective.")
// Impossible!
state("Command aborted. This unit is defective.")
/obj/machinery/emergency_authentication_device/attackby(obj/item/weapon/O, mob/user)
if(activated)
user << "\blue \The [src] is already active!"
return
if(activated)
user << "\blue \The [src] is already active!"
return
if(!mode.current_directive.directives_complete())
state({"Command aborted. Communication with CentCom is prohibited until Directive X has been completed."})
return
if(!mode.current_directive.directives_complete())
state({"Command aborted. Communication with CentCom is prohibited until Directive X has been completed."})
return
check_key_existence()
if(istype(O, /obj/item/weapon/mutiny/auth_key/captain) && !captains_key)
captains_key = O
user.drop_item()
O.loc = src
check_key_existence()
if(istype(O, /obj/item/weapon/mutiny/auth_key/captain) && !captains_key)
captains_key = O
user.drop_item()
O.loc = src
state("Key received. Thank you, Captain [mode.head_loyalist].")
spawn(5)
state(secondary_key ? "Your keys have been authenticated. Communication with CentCom is now authorized." : "Please insert the Emergency Secondary Authentication Key now.")
return
state("Key received. Thank you, Captain [mode.head_loyalist].")
spawn(5)
state(secondary_key ? "Your keys have been authenticated. Communication with CentCom is now authorized." : "Please insert the Emergency Secondary Authentication Key now.")
return
if(istype(O, /obj/item/weapon/mutiny/auth_key/secondary) && !secondary_key)
secondary_key = O
user.drop_item()
O.loc = src
if(istype(O, /obj/item/weapon/mutiny/auth_key/secondary) && !secondary_key)
secondary_key = O
user.drop_item()
O.loc = src
state("Key received. Thank you, Secondary Authenticator [mode.head_mutineer].")
spawn(5)
state(captains_key ? "Your keys have been authenticated. Communication with CentCom is now authorized." : "Please insert the Captain's Authentication Key now.")
return
..()
state("Key received. Thank you, Secondary Authenticator [mode.head_mutineer].")
spawn(5)
state(captains_key ? "Your keys have been authenticated. Communication with CentCom is now authorized." : "Please insert the Captain's Authentication Key now.")
return
..()
/obj/machinery/emergency_authentication_device/examine()
usr << {"
usr << {"
This is a specialized communications device that is able to instantly send a message to <b>NanoTrasen High Command</b> via quantum entanglement with a sister device at CentCom.
The EAD's status is [get_status()]."}
+40 -40
View File
@@ -1,49 +1,49 @@
/obj/item/weapon/pinpointer/advpinpointer/auth_key
name = "\improper Authentication Key Pinpointer"
desc = "Tracks the positions of the emergency authentication keys."
var/datum/game_mode/mutiny/mutiny
name = "\improper Authentication Key Pinpointer"
desc = "Tracks the positions of the emergency authentication keys."
var/datum/game_mode/mutiny/mutiny
New()
mutiny = ticker.mode
..()
New()
mutiny = ticker.mode
..()
/obj/item/weapon/pinpointer/advpinpointer/auth_key/attack_self()
switch(mode)
if (0)
mode = 1
active = 1
target = mutiny.captains_key
workobj()
usr << "\blue You calibrate \the [src] to locate the Captain's Authentication Key."
if (1)
mode = 2
target = mutiny.secondary_key
usr << "\blue You calibrate \the [src] to locate the Emergency Secondary Authentication Key."
else
mode = 0
active = 0
icon_state = "pinoff"
usr << "\blue You switch \the [src] off."
switch(mode)
if (0)
mode = 1
active = 1
target = mutiny.captains_key
workobj()
usr << "\blue You calibrate \the [src] to locate the Captain's Authentication Key."
if (1)
mode = 2
target = mutiny.secondary_key
usr << "\blue You calibrate \the [src] to locate the Emergency Secondary Authentication Key."
else
mode = 0
active = 0
icon_state = "pinoff"
usr << "\blue You switch \the [src] off."
/obj/item/weapon/pinpointer/advpinpointer/auth_key/examine()
switch(mode)
if (0)
usr << "Is is calibrated for the Captain's Authentication Key."
if (1)
usr << "It is calibrated for the Emergency Secondary Authentication Key."
else
usr << "It is switched off."
switch(mode)
if (1)
usr << "Is is calibrated for the Captain's Authentication Key."
if (2)
usr << "It is calibrated for the Emergency Secondary Authentication Key."
else
usr << "It is switched off."
/datum/supply_packs/key_pinpointer
name = "Authentication Key Pinpointer crate"
contains = list(/obj/item/weapon/pinpointer/advpinpointer/auth_key)
cost = 250
containertype = /obj/structure/closet/crate
containername = "Authentication Key Pinpointer crate"
access = access_heads
group = "Operations"
name = "Authentication Key Pinpointer crate"
contains = list(/obj/item/weapon/pinpointer/advpinpointer/auth_key)
cost = 250
containertype = /obj/structure/closet/crate
containername = "Authentication Key Pinpointer crate"
access = access_heads
group = "Operations"
New()
// This crate is only accessible during mutiny rounds
if (istype(ticker.mode,/datum/game_mode/mutiny))
..()
New()
// This crate is only accessible during mutiny rounds
if (istype(ticker.mode,/datum/game_mode/mutiny))
..()
+315 -274
View File
@@ -1,350 +1,391 @@
#define MUTINY_RECRUITMENT_COOLDOWN 5
datum/game_mode/mutiny
var/datum/mutiny_fluff/fluff
var/datum/directive/current_directive
var/obj/item/weapon/mutiny/auth_key/captain/captains_key
var/obj/item/weapon/mutiny/auth_key/secondary/secondary_key
var/obj/machinery/emergency_authentication_device/ead
var/datum/mind/head_loyalist
var/datum/mind/head_mutineer
var/list/loyalists = list()
var/list/mutineers = list()
var/list/body_count = list()
var/datum/mutiny_fluff/fluff
var/datum/directive/current_directive
var/obj/item/weapon/mutiny/auth_key/captain/captains_key
var/obj/item/weapon/mutiny/auth_key/secondary/secondary_key
var/obj/machinery/emergency_authentication_device/ead
var/datum/mind/head_loyalist
var/datum/mind/head_mutineer
var/recruit_loyalist_cooldown = 0
var/recruit_mutineer_cooldown = 0
var/list/loyalists = list()
var/list/mutineers = list()
var/list/body_count = list()
name = "mutiny"
config_tag = "mutiny"
required_players = 7
ert_disabled = 1
name = "mutiny"
config_tag = "mutiny"
required_players = 7
ert_disabled = 1
uplink_welcome = "Mutineers Uplink Console:"
uplink_uses = 0
uplink_welcome = "Mutineers Uplink Console:"
uplink_uses = 0
New()
fluff = new(src)
New()
fluff = new(src)
proc/reveal_directives()
spawn(rand(1 MINUTES, 3 MINUTES))
fluff.announce_incoming_fax()
spawn(rand(3 MINUTES, 5 MINUTES))
send_pda_message()
spawn(rand(3 MINUTES, 5 MINUTES))
fluff.announce_directives()
spawn(rand(2 MINUTES, 3 MINUTES))
fluff.announce_ert_unavailable()
proc/reveal_directives()
spawn(rand(1 MINUTES, 3 MINUTES))
fluff.announce_incoming_fax()
spawn(rand(3 MINUTES, 5 MINUTES))
send_pda_message()
spawn(rand(3 MINUTES, 5 MINUTES))
fluff.announce_directives()
spawn(rand(2 MINUTES, 3 MINUTES))
fluff.announce_ert_unavailable()
// Returns an array in case we want to expand on this later.
proc/get_head_loyalist_candidates()
var/list/candidates[0]
for(var/mob/loyalist in player_list)
if(loyalist.mind && loyalist.mind.assigned_role == "Captain")
candidates+=loyalist.mind
return candidates
// Returns an array in case we want to expand on this later.
proc/get_head_loyalist_candidates()
var/list/candidates[0]
for(var/mob/loyalist in player_list)
if(loyalist.mind && loyalist.mind.assigned_role == "Captain")
candidates.Add(loyalist.mind)
return candidates
proc/get_head_mutineer_candidates()
var/list/candidates[0]
for(var/mob/mutineer in player_list)
if(mutineer.client.prefs.be_special & BE_MUTINEER)
for(var/job in command_positions - "Captain")
if(mutineer.mind && mutineer.mind.assigned_role == job)
candidates+=mutineer.mind
return candidates
proc/get_head_mutineer_candidates()
var/list/candidates[0]
for(var/mob/mutineer in player_list)
if(mutineer.client.prefs.be_special & BE_MUTINEER)
for(var/job in command_positions - "Captain")
if(mutineer.mind && mutineer.mind.assigned_role == job)
candidates.Add(mutineer.mind)
return candidates
proc/get_directive_candidates()
var/list/candidates[0]
for(var/T in typesof(/datum/directive) - /datum/directive)
var/datum/directive/D = new T(src)
if (D.meets_prerequisites())
candidates+=D
return candidates
proc/get_directive_candidates()
var/list/candidates[0]
for(var/T in typesof(/datum/directive) - /datum/directive)
var/datum/directive/D = new T(src)
if (D.meets_prerequisites())
candidates.Add(D)
return candidates
proc/send_pda_message()
var/obj/item/device/pda/pda = null
for(var/obj/item/device/pda/P in head_mutineer.current)
pda = P
break
proc/send_pda_message()
var/obj/item/device/pda/pda = null
for(var/obj/item/device/pda/P in head_mutineer.current)
pda = P
break
if (!pda)
return 0
if (!pda)
return 0
if (!pda.silent)
playsound(pda.loc, 'sound/machines/twobeep.ogg', 50, 1)
for (var/mob/O in hearers(3, pda.loc))
O.show_message(text("\icon[pda] *[pda.ttone]*"))
if (!pda.silent)
playsound(pda.loc, 'sound/machines/twobeep.ogg', 50, 1)
for (var/mob/O in hearers(3, pda.loc))
O.show_message(text("\icon[pda] *[pda.ttone]*"))
head_mutineer.current << fluff.get_pda_body()
return 1
head_mutineer.current << fluff.get_pda_body()
return 1
proc/get_equipment_slots()
return list(
"left pocket" = slot_l_store,
"right pocket" = slot_r_store,
"backpack" = slot_in_backpack,
"left hand" = slot_l_hand,
"right hand" = slot_r_hand)
proc/get_equipment_slots()
return list(
"left pocket" = slot_l_store,
"right pocket" = slot_r_store,
"backpack" = slot_in_backpack,
"left hand" = slot_l_hand,
"right hand" = slot_r_hand)
proc/equip_head_loyalist()
var/mob/living/carbon/human/H = head_loyalist.current
captains_key = new(H)
H.equip_in_one_of_slots(captains_key, get_equipment_slots())
H.update_icons()
H.verbs += /mob/living/carbon/human/proc/recruit_loyalist
proc/equip_head_loyalist()
var/mob/living/carbon/human/H = head_loyalist.current
captains_key = new(H)
H.equip_in_one_of_slots(captains_key, get_equipment_slots())
H.update_icons()
H.verbs += /mob/living/carbon/human/proc/recruit_loyalist
proc/equip_head_mutineer()
var/mob/living/carbon/human/H = head_mutineer.current
secondary_key = new(H)
H.equip_in_one_of_slots(secondary_key, get_equipment_slots())
H.update_icons()
H.verbs += /mob/living/carbon/human/proc/recruit_mutineer
proc/equip_head_mutineer()
var/mob/living/carbon/human/H = head_mutineer.current
secondary_key = new(H)
H.equip_in_one_of_slots(secondary_key, get_equipment_slots())
H.update_icons()
H.verbs += /mob/living/carbon/human/proc/recruit_mutineer
proc/add_loyalist(datum/mind/M)
loyalists+=M
if (M in mutineers)
mutineers-=M
proc/add_loyalist(datum/mind/M)
add_faction(M, "loyalist", loyalists)
M.current << fluff.loyalist_tag("You have joined the loyalists!")
head_loyalist.current << fluff.loyalist_tag("[M] has joined the loyalists!")
update_icon(M)
proc/add_mutineer(datum/mind/M)
add_faction(M, "mutineer", mutineers)
proc/add_mutineer(datum/mind/M)
mutineers+=M
if (M in loyalists)
loyalists-=M
proc/add_faction(datum/mind/M, faction, list/faction_list)
if(!can_be_recruited(M, faction))
M.current << "\red Recruitment canceled; your role has already changed."
head_mutineer.current << "\red Could not recruit [M]. Their role has changed."
return
M.current << fluff.mutineer_tag("You have joined the mutineers!")
head_mutineer.current << fluff.mutineer_tag("[M] has joined the mutineers!")
update_icon(M)
if(M in loyalists)
loyalists.Remove(M)
proc/was_bloodbath()
var/list/remaining_loyalists = loyalists - body_count
if (!remaining_loyalists.len)
return 1
if(M in mutineers)
mutineers.Remove(M)
var/list/remaining_mutineers = mutineers - body_count
if (!remaining_mutineers.len)
return 1
M.special_role = faction
faction_list.Add(M)
return 0
if(faction == "mutineer")
M.current << fluff.mutineer_tag("You have joined the mutineers!")
head_mutineer.current << fluff.mutineer_tag("[M] has joined the mutineers!")
else
M.current << fluff.loyalist_tag("You have joined the loyalists!")
head_loyalist.current << fluff.loyalist_tag("[M] has joined the loyalists!")
proc/replace_nuke_with_ead()
for(var/obj/machinery/nuclearbomb/N in world)
ead = new(N.loc, src)
del(N)
update_icon(M)
proc/unbolt_vault_door()
var/obj/machinery/door/airlock/vault = locate(/obj/machinery/door/airlock/vault)
vault.locked = 0
proc/was_bloodbath()
var/list/remaining_loyalists = loyalists - body_count
if (!remaining_loyalists.len)
return 1
proc/round_outcome()
world << "<center><h4>Breaking News</h4></center><br><hr>"
if (was_bloodbath())
world << fluff.no_victory()
return
var/list/remaining_mutineers = mutineers - body_count
if (!remaining_mutineers.len)
return 1
var/directives_completed = current_directive.directives_complete()
var/ead_activated = ead.activated
if (directives_completed && ead_activated)
world << fluff.loyalist_major_victory()
else if (directives_completed && !ead_activated)
world << fluff.loyalist_minor_victory()
else if (!directives_completed && ead_activated)
world << fluff.mutineer_minor_victory()
else if (!directives_completed && !ead_activated)
world << fluff.mutineer_major_victory()
return 0
world << sound('sound/machines/twobeep.ogg')
proc/replace_nuke_with_ead()
for(var/obj/machinery/nuclearbomb/N in world)
ead = new(N.loc, src)
del(N)
proc/update_all_icons()
spawn(0)
for(var/datum/mind/M in mutineers)
update_icon(M)
proc/unbolt_vault_door()
var/obj/machinery/door/airlock/vault = locate(/obj/machinery/door/airlock/vault)
vault.locked = 0
for(var/datum/mind/M in loyalists)
update_icon(M)
return 1
proc/can_be_recruited(datum/mind/M, role)
if(!M) return 0
if(!M.special_role) return 1
switch(role)
if("loyalist")
return M.special_role == "mutineer"
if("mutineer")
return M.special_role == "loyalist"
proc/update_icon(datum/mind/M)
if(!M.current || !M.current.client)
return 0
proc/round_outcome()
world << "<center><h4>Breaking News</h4></center><br><hr>"
if (was_bloodbath())
world << fluff.no_victory()
return
for(var/image/I in M.current.client.images)
if (I.icon_state == "loyalist" || I.icon_state == "mutineer")
del(I)
var/directives_completed = current_directive.directives_complete()
var/ead_activated = ead.activated
if (directives_completed && ead_activated)
world << fluff.loyalist_major_victory()
else if (directives_completed && !ead_activated)
world << fluff.loyalist_minor_victory()
else if (!directives_completed && ead_activated)
world << fluff.mutineer_minor_victory()
else if (!directives_completed && !ead_activated)
world << fluff.mutineer_major_victory()
if(M in loyalists)
var/I = image('icons/mob/mob.dmi', loc=M.current, icon_state = "loyalist")
head_loyalist.current.client.images += I
world << sound('sound/machines/twobeep.ogg')
if(M in mutineers)
var/I = image('icons/mob/mob.dmi', loc=M.current, icon_state = "mutineer")
head_mutineer.current.client.images += I
proc/update_all_icons()
spawn(0)
for(var/datum/mind/M in mutineers)
update_icon(M)
return 1
for(var/datum/mind/M in loyalists)
update_icon(M)
return 1
proc/check_antagonists_ui(admins)
var/turf/captains_key_loc = captains_key ? get_turf(captains_key) : "Lost or Destroyed"
var/turf/secondary_key_loc = secondary_key ? get_turf(secondary_key) : "Lost or Destroyed"
var/txt = {"
<h5>Context:</h5>
<p>
[current_directive.get_description()]
</p>
<h5>Orders:</h5>
<ol>
[fluff.get_orders()]
</ol>
<br>
<h5>Authentication:</h5>
<b>Captain's Key:</b> [captains_key_loc]
<a href='?src=\ref[admins];choice=activate_captains_key'>Activate</a><br>
<b>Secondary Key:</b> [secondary_key_loc]
<a href='?src=\ref[admins];choice=activate_secondary_key'>Activate</a><br>
<b>EAD: [ead ? ead.get_status() : "Lost or Destroyed"]</b>
<a href='?src=\ref[admins];choice=activate_ead'>Activate</a><br>
<hr>
"}
proc/update_icon(datum/mind/M)
if(!M.current || !M.current.client)
return 0
if(head_loyalist)
txt += check_role_table("Head Loyalist", list(head_loyalist), admins, 0)
for(var/image/I in head_loyalist.current.client.images)
if(I.loc == M.current && (I.icon_state == "loyalist" || I.icon_state == "mutineer"))
del(I)
var/list/loyal_crew = loyalists - head_loyalist
if(loyal_crew.len)
txt += check_role_table("Loyalists", loyal_crew, admins, 0)
for(var/image/I in head_mutineer.current.client.images)
if(I.loc == M.current && (I.icon_state == "loyalist" || I.icon_state == "mutineer"))
del(I)
if(head_mutineer)
txt += check_role_table("Head Mutineer", list(head_mutineer), admins, 0)
if(M in loyalists)
var/I = image('icons/mob/mob.dmi', loc=M.current, icon_state = "loyalist")
head_loyalist.current.client.images += I
var/list/mutiny_crew = mutineers - head_mutineer
if(mutiny_crew.len)
txt += check_role_table("Mutineers", mutiny_crew, admins, 0)
if(M in mutineers)
var/I = image('icons/mob/mob.dmi', loc=M.current, icon_state = "mutineer")
head_mutineer.current.client.images += I
if(body_count.len)
txt += check_role_table("Casualties", body_count, admins, 0)
return 1
return txt
proc/check_antagonists_ui(admins)
var/turf/captains_key_loc = captains_key ? captains_key.get_loc_turf() : "Lost or Destroyed"
var/turf/secondary_key_loc = secondary_key ? secondary_key.get_loc_turf() : "Lost or Destroyed"
var/txt = {"
<h5>Context:</h5>
<p>
[current_directive.get_description()]
</p>
<h5>Orders:</h5>
<ol>
[fluff.get_orders()]
</ol>
<br>
<h5>Authentication:</h5>
<b>Captain's Key:</b> [captains_key_loc]
<a href='?src=\ref[admins];choice=activate_captains_key'>Activate</a><br>
<b>Secondary Key:</b> [secondary_key_loc]
<a href='?src=\ref[admins];choice=activate_secondary_key'>Activate</a><br>
<b>EAD: [ead ? ead.get_status() : "Lost or Destroyed"]</b>
<a href='?src=\ref[admins];choice=activate_ead'>Activate</a><br>
<hr>
"}
if(head_loyalist)
txt += check_role_table("Head Loyalist", list(head_loyalist), admins, 0)
var/list/loyal_crew = loyalists - head_loyalist
if(loyal_crew.len)
txt += check_role_table("Loyalists", loyal_crew, admins, 0)
if(head_mutineer)
txt += check_role_table("Head Mutineer", list(head_mutineer), admins, 0)
var/list/mutiny_crew = mutineers - head_mutineer
if(mutiny_crew.len)
txt += check_role_table("Mutineers", mutiny_crew, admins, 0)
if(body_count.len)
txt += check_role_table("Casualties", body_count, admins, 0)
return txt
/datum/game_mode/mutiny/announce()
fluff.announce()
fluff.announce()
/datum/game_mode/mutiny/pre_setup()
var/list/loyalist_candidates = get_head_loyalist_candidates()
if(!loyalist_candidates || loyalist_candidates.len == 0)
world << "Mutiny mode aborted: no valid candidates for head loyalist."
return 0
var/list/loyalist_candidates = get_head_loyalist_candidates()
if(!loyalist_candidates || loyalist_candidates.len == 0)
world << "Mutiny mode aborted: no valid candidates for head loyalist."
return 0
var/list/mutineer_candidates = get_head_mutineer_candidates()
if(!mutineer_candidates || mutineer_candidates.len == 0)
world << "Mutiny mode aborted: no valid candidates for head mutineer."
return 0
var/list/mutineer_candidates = get_head_mutineer_candidates()
if(!mutineer_candidates || mutineer_candidates.len == 0)
world << "Mutiny mode aborted: no valid candidates for head mutineer."
return 0
var/list/directive_candidates = get_directive_candidates()
if(!directive_candidates || directive_candidates.len == 0)
world << "Mutiny mode aborted: no valid candidates for Directive X."
return 0
var/list/directive_candidates = get_directive_candidates()
if(!directive_candidates || directive_candidates.len == 0)
world << "Mutiny mode aborted: no valid candidates for Directive X."
return 0
head_loyalist = pick(loyalist_candidates)
head_mutineer = pick(mutineer_candidates)
current_directive = pick(directive_candidates)
head_loyalist = pick(loyalist_candidates)
head_mutineer = pick(mutineer_candidates)
current_directive = pick(directive_candidates)
return 1
return 1
/datum/game_mode/mutiny/post_setup()
head_loyalist.current << "You are the Head Loyalist!"
head_loyalist.special_role = "head_loyalist"
equip_head_loyalist()
head_loyalist.current << "You are the Head Loyalist!"
head_loyalist.special_role = "head_loyalist"
equip_head_loyalist()
head_mutineer.current << "You are the Head Mutineer!"
head_mutineer.special_role = "head_mutineer"
equip_head_mutineer()
head_mutineer.current << "You are the Head Mutineer!"
head_mutineer.special_role = "head_mutineer"
equip_head_mutineer()
loyalists+=head_loyalist
mutineers+=head_mutineer
loyalists.Add(head_loyalist)
mutineers.Add(head_mutineer)
replace_nuke_with_ead()
current_directive.initialize()
unbolt_vault_door()
replace_nuke_with_ead()
current_directive.initialize()
unbolt_vault_door()
update_all_icons()
spawn(0)
reveal_directives()
..()
update_all_icons()
spawn(0)
reveal_directives()
..()
/datum/game_mode/mutiny/check_antagonists_topic(href, href_list[])
switch(href_list["choice"])
if("activate_captains_key")
ead.captains_key = 1
return 1
if("activate_secondary_key")
ead.secondary_key = 1
return 1
if("activate_ead")
ead.activated = 1
return 1
else
return 0
switch(href_list["choice"])
if("activate_captains_key")
ead.captains_key = 1
return 1
if("activate_secondary_key")
ead.secondary_key = 1
return 1
if("activate_ead")
ead.activated = 1
return 1
else
return 0
/mob/living/carbon/human/proc/recruit_loyalist()
set name = "Recruit Loyalist"
set category = "Mutiny"
set name = "Recruit Loyalist"
set category = "Mutiny"
var/datum/game_mode/mutiny/mode = get_mutiny_mode()
if (!mode || src != mode.head_loyalist.current)
return
var/datum/game_mode/mutiny/mode = get_mutiny_mode()
if (!mode || src != mode.head_loyalist.current)
return
var/list/candidates = list()
for (var/mob/living/carbon/human/P in oview(src))
if(!stat && P.client && P.mind && !P.mind.special_role)
candidates += P
var/list/candidates = list()
for (var/mob/living/carbon/human/P in oview(src))
if(!stat && P.client && mode.can_be_recruited(P.mind, "loyalist"))
candidates += P
if(!candidates.len)
src << "\red You aren't close enough to anybody that can be recruited."
return
if(!candidates.len)
src << "\red You aren't close enough to anybody that can be recruited."
return
var/mob/living/carbon/human/M = input("Select a person to recruit", "Loyalist recruitment", null) as mob in candidates
if(world.time < mode.recruit_loyalist_cooldown)
src << "\red Wait [MUTINY_RECRUITMENT_COOLDOWN] seconds before recruiting again."
return
if (M)
src << "Attempting to recruit [M]..."
log_admin("[src]([src.ckey]) attempted to recruit [M] as a loyalist.")
message_admins("\red [src]([src.ckey]) attempted to recruit [M] as a loyalist.")
mode.recruit_loyalist_cooldown = world.time + (MUTINY_RECRUITMENT_COOLDOWN SECONDS)
var/choice = alert(M, "Asked by [src]: Will you help me complete Directive X?", "Loyalist recruitment", "Yes", "No")
if(choice == "Yes")
mode.add_loyalist(M.mind)
else if(choice == "No")
M << "\red You declined to join the loyalists."
mode.head_loyalist.current << "\red <b>[M] declined to support the loyalists.</b>"
var/mob/living/carbon/human/M = input("Select a person to recruit", "Loyalist recruitment", null) as mob in candidates
if (M)
src << "Attempting to recruit [M]..."
log_admin("[src]([src.ckey]) attempted to recruit [M] as a loyalist.")
message_admins("\red [src]([src.ckey]) attempted to recruit [M] as a loyalist.")
var/choice = alert(M, "Asked by [src]: Will you help me complete Directive X?", "Loyalist recruitment", "No", "Yes")
if(choice == "Yes")
mode.add_loyalist(M.mind)
else if(choice == "No")
M << "\red You declined to join the loyalists."
mode.head_loyalist.current << "\red <b>[M] declined to support the loyalists.</b>"
/mob/living/carbon/human/proc/recruit_mutineer()
set name = "Recruit Mutineer"
set category = "Mutiny"
set name = "Recruit Mutineer"
set category = "Mutiny"
var/datum/game_mode/mutiny/mode = get_mutiny_mode()
if (!mode || src != mode.head_mutineer.current)
return
var/datum/game_mode/mutiny/mode = get_mutiny_mode()
if (!mode || src != mode.head_mutineer.current)
return
var/list/candidates = list()
for (var/mob/living/carbon/human/P in oview(src))
if(!stat && P.client && P.mind && !P.mind.special_role)
candidates += P
var/list/candidates = list()
for (var/mob/living/carbon/human/P in oview(src))
if(!stat && P.client && mode.can_be_recruited(P.mind, "mutineer"))
candidates += P
if(!candidates.len)
src << "\red You aren't close enough to anybody that can be recruited."
return
if(!candidates.len)
src << "\red You aren't close enough to anybody that can be recruited."
return
var/mob/living/carbon/human/M = input("Select a person to recruit", "Mutineer recruitment", null) as mob in candidates
if(world.time < mode.recruit_mutineer_cooldown)
src << "\red Wait [MUTINY_RECRUITMENT_COOLDOWN] seconds before recruiting again."
return
if (M)
src << "Attempting to recruit [M]..."
log_admin("[src]([src.ckey]) attempted to recruit [M] as a mutineer.")
message_admins("\red [src]([src.ckey]) attempted to recruit [M] as a mutineer.")
mode.recruit_mutineer_cooldown = world.time + (MUTINY_RECRUITMENT_COOLDOWN SECONDS)
var/choice = alert(M, "Asked by [src]: Will you help me stop Directive X?", "Mutineer recruitment", "Yes", "No")
if(choice == "Yes")
mode.add_mutineer(M.mind)
else if(choice == "No")
M << "\red You declined to join the mutineers."
mode.head_mutineer.current << "\red <b>[M] declined to support the mutineers.</b>"
var/mob/living/carbon/human/M = input("Select a person to recruit", "Mutineer recruitment", null) as mob in candidates
if (M)
src << "Attempting to recruit [M]..."
log_admin("[src]([src.ckey]) attempted to recruit [M] as a mutineer.")
message_admins("\red [src]([src.ckey]) attempted to recruit [M] as a mutineer.")
var/choice = alert(M, "Asked by [src]: Will you help me stop Directive X?", "Mutineer recruitment", "No", "Yes")
if(choice == "Yes")
mode.add_mutineer(M.mind)
else if(choice == "No")
M << "\red You declined to join the mutineers."
mode.head_mutineer.current << "\red <b>[M] declined to support the mutineers.</b>"
/proc/get_mutiny_mode()
if(!ticker || !istype(ticker.mode, /datum/game_mode/mutiny))
return null
if(!ticker || !istype(ticker.mode, /datum/game_mode/mutiny))
return null
return ticker.mode
return ticker.mode
+126 -126
View File
@@ -1,132 +1,132 @@
/datum/mutiny_fluff
var/datum/game_mode/mutiny/mode
var/datum/game_mode/mutiny/mode
New(datum/game_mode/mutiny/M)
mode = M
New(datum/game_mode/mutiny/M)
mode = M
proc/centcom_announce(text)
world << {"
proc/centcom_announce(text)
world << {"
<font color='#FFA500'><hr><center><b>:-:=:-: CENTRAL COMMAND ANNOUNCEMENT :-:=:-:</b></center><hr></font>
[text]
"}
world << sound('sound/AI/commandreport.ogg')
"}
world << sound('sound/AI/commandreport.ogg')
proc/announce_incoming_fax()
centcom_announce({"
proc/announce_incoming_fax()
centcom_announce({"
<b>Incoming Emergency Directive:</b>
<i>Captain's Office Fax Machine, [station_name()]</i>
"})
"})
proc/announce_directives()
for (var/obj/machinery/faxmachine/fax in world)
if (fax.department == "Captain's Office")
var/obj/item/weapon/paper/directive_x = new(fax.loc)
directive_x.name = "emergency action message"
directive_x.info = get_fax_body()
proc/announce_directives()
for (var/obj/machinery/faxmachine/fax in world)
if (fax.department == "Captain's Office")
var/obj/item/weapon/paper/directive_x = new(fax.loc)
directive_x.name = "emergency action message"
directive_x.info = get_fax_body()
proc/get_fax_body()
return {"
<center><h5>NOT A DRILL . . . EMERGENCY DIRECTIVE . . . NOT A DRILL</h5></center>
<p>
<b>TO:</b> Captain [mode.head_loyalist], Commanding Officer, [station_name()]<br>
<b>FROM:</b> NanoTrasen Emergency Messaging Relay<br>
<b>DATE:</b> [time2text(world.realtime, "MM/DD")]/[game_year]<br>
<b>SUBJECT:</b> Directive X<br>
</p>
proc/get_fax_body()
return {"
<center><h5>NOT A DRILL . . . EMERGENCY DIRECTIVE . . . NOT A DRILL</h5></center>
<p>
<b>TO:</b> Captain [mode.head_loyalist], Commanding Officer, [station_name()]<br>
<b>FROM:</b> NanoTrasen Emergency Messaging Relay<br>
<b>DATE:</b> [time2text(world.realtime, "MM/DD")]/[game_year]<br>
<b>SUBJECT:</b> Directive X<br>
</p>
[mode.current_directive.get_description()]
[mode.current_directive.get_description()]
<hr>
<h5><b>Emergency Authentication Protocol</b></h5>
<p>
A member of your Command Staff is this shift's designated Emergency Secondary Authenticator.<br>
This Emergency Secondary Authenticator is uniquely aware of their role and possesses the Emergency Secondary Authentication Key.<br>
As Captain, you possess the Captain's Authentication Key.<br>
The Emergency Authentication Device is located in the vault of your station, and requires simultaneous activation of the Authentication Keys.<br>
An <b>Authentication Key Pinpointer</b> can be delivered via Cargo Bay to assist recovery of the Authentication Keys should they be lost aboard the station.<br>
A key's destruction or removal from the station's perimeter will automatically and irreversibly activate the Emergency Authentication Device.
</p>
<br>
<hr>
<h5><b>Emergency Authentication Protocol</b></h5>
<p>
A member of your Command Staff is this shift's designated Emergency Secondary Authenticator.<br>
This Emergency Secondary Authenticator is uniquely aware of their role and possesses the Emergency Secondary Authentication Key.<br>
As Captain, you possess the Captain's Authentication Key.<br>
The Emergency Authentication Device is located in the vault of your station, and requires simultaneous activation of the Authentication Keys.<br>
An <b>Authentication Key Pinpointer</b> can be delivered via Cargo Bay to assist recovery of the Authentication Keys should they be lost aboard the station.<br>
A key's destruction or removal from the station's perimeter will automatically and irreversibly activate the Emergency Authentication Device.
</p>
<br>
<h5><b>Orders</b></h5>
<p>
Captain [mode.head_loyalist], you are to immediately initiate the following procedure; codenamed Directive X:
</p>
<ol>
[get_orders()]
</ol>
<br>
<h5><b>Orders</b></h5>
<p>
Captain [mode.head_loyalist], you are to immediately initiate the following procedure; codenamed Directive X:
</p>
<ol>
[get_orders()]
</ol>
<br>
<h5><b>Authentication</b></h5>
<h5><b>Authentication</b></h5>
<b>Encoded Authentication String:</b> <small>T0JCJUwoIVFDQA==</small><br>
<b>Emergency Action Code:</b> O B B _ L _ _ Q C _<br>
<font color='red'><u>ERROR: DECODING INCOMPLETE (40% LOSS)</u></font>
<br>
<br>
<br>
<b>Encoded Authentication String:</b> <small>T0JCJUwoIVFDQA==</small><br>
<b>Emergency Action Code:</b> O B B _ L _ _ Q C _<br>
<font color='red'><u>ERROR: DECODING INCOMPLETE (40% LOSS)</u></font>
<br>
<br>
<br>
<center><h5>NOT A DRILL . . . EMERGENCY DIRECTIVE . . . NOT A DRILL</h5></center>
"}
<center><h5>NOT A DRILL . . . EMERGENCY DIRECTIVE . . . NOT A DRILL</h5></center>
"}
proc/get_orders()
var/text = "<li>Immediate external transmission and signals silence. Evacuation and Cargo services will remain available. All ERT teams are engaged elsewhere. Do not communicate with Central Command under any circumstances.</li>"
for(var/order in mode.current_directive.special_orders)
text += "<li>[order]</li>"
proc/get_orders()
var/text = "<li>Immediate external transmission and signals silence. Evacuation and Cargo services will remain available. All ERT teams are engaged elsewhere. Do not communicate with Central Command under any circumstances.</li>"
for(var/order in mode.current_directive.special_orders)
text += "<li>[order]</li>"
text += "<li>Upon completion of this Directive, Captain [mode.head_loyalist] and the Emergency Secondary Authenticator must utilise the Captain's Authentication Key and the Emergency Secondary Authentication Key to activate the Emergency Authentication Device.</li>"
return text
text += "<li>Upon completion of this Directive, Captain [mode.head_loyalist] and the Emergency Secondary Authenticator must utilise the Captain's Authentication Key and the Emergency Secondary Authentication Key to activate the Emergency Authentication Device.</li>"
return text
proc/get_pda_body()
return {"<b>&larr; From Anonymous Channel:</b> <p>\"You must read this! NanoTrasen Chain of Command COMPROMISED. Command Encryptions BROKEN. [station_name()] Captain [mode.head_loyalist] will receive orders that must NOT BE BROUGHT TO FRUITION!
proc/get_pda_body()
return {"<b>&larr; From Anonymous Channel:</b> <p>\"You must read this! NanoTrasen Chain of Command COMPROMISED. Command Encryptions BROKEN. [station_name()] Captain [mode.head_loyalist] will receive orders that must NOT BE BROUGHT TO FRUITION!
They don't care about us they only care about WEALTH and POWER... Share this message with people you trust.
Be safe, friend.\" (Unable to Reply)</p>"}
proc/announce_ert_unavailable()
// I might have gotten a little carried away.
centcom_announce({"
proc/announce_ert_unavailable()
// I might have gotten a little carried away.
centcom_announce({"
<p>The presence of [pick(
"political instability",
"quantum fluctuations",
"hostile raiders",
"derelict station debris",
"REDACTED",
"ancient alien artillery",
"solar magnetic storms",
"sentient time-travelling killbots",
"gravitational anomalies",
"wormholes to another dimension",
"a telescience mishap",
"radiation flares",
"supermatter dust",
"leaks into a negative reality",
"antiparticle clouds",
"residual bluespace energy",
"suspected syndicate operatives",
"malfunctioning von Neumann probe swarms",
"shadowy interlopers",
"a stranded Vox arkship",
"haywire IPC constructs",
"rogue Unathi exiles",
"artifacts of eldritch horror",
"a brain slug infestation",
"killer bugs that lay eggs in the husks of the living",
"a deserted transport carrying xenomorph specimens",
"an emissary for the gestalt requesting a security detail",
"a Tajaran slave rebellion",
"radical Skrellian transevolutionaries",
"classified security operations",
"science-defying raw elemental chaos")]
"political instability",
"quantum fluctuations",
"hostile raiders",
"derelict station debris",
"REDACTED",
"ancient alien artillery",
"solar magnetic storms",
"sentient time-travelling killbots",
"gravitational anomalies",
"wormholes to another dimension",
"a telescience mishap",
"radiation flares",
"supermatter dust",
"leaks into a negative reality",
"antiparticle clouds",
"residual bluespace energy",
"suspected syndicate operatives",
"malfunctioning von Neumann probe swarms",
"shadowy interlopers",
"a stranded Vox arkship",
"haywire IPC constructs",
"rogue Unathi exiles",
"artifacts of eldritch horror",
"a brain slug infestation",
"killer bugs that lay eggs in the husks of the living",
"a deserted transport carrying xenomorph specimens",
"an emissary for the gestalt requesting a security detail",
"a Tajaran slave rebellion",
"radical Skrellian transevolutionaries",
"classified security operations",
"science-defying raw elemental chaos")]
in the region is tying up all available local emergency resources;
<b>emergency response teams</b> can not be called at this time.</p>
"})
"})
proc/announce()
world << "<B>The current game mode is - Mutiny!</B>"
world << {"
proc/announce()
world << "<B>The current game mode is - Mutiny!</B>"
world << {"
<p>The crew will be divided by their sense of ethics when a morally turbulent emergency directive arrives with an incomplete command validation code.<br><br>
The [loyalist_tag("Head Loyalist")] is the Captain, who carries the [loyalist_tag("Captain's Authentication Key")] at all times.<br>
The [mutineer_tag("Head Mutineer")] is a random Head of Staff who carries the [mutineer_tag("Emergency Secondary Authentication Key")].</p>
@@ -136,24 +136,24 @@ Both keys are required to activate the <b>Emergency Authentication Device (EAD)<
<b>Loyalists</b> - Follow the Head Loyalist in carrying out [loyalist_tag("NanoTrasen's directives")] then activate the <b>EAD</b>.<br>
<b>Mutineers</b> - Prevent the completion of the [mutineer_tag("improperly validated directives")] and the activation of the <b>EAD</b>.
</p>
"}
"}
proc/loyalist_tag(text)
return "<font color='blue'><b>[text]</b></font>"
proc/loyalist_tag(text)
return "<font color='blue'><b>[text]</b></font>"
proc/mutineer_tag(text)
return "<font color='#FFA500'><b>[text]</b></font>"
proc/mutineer_tag(text)
return "<font color='#FFA500'><b>[text]</b></font>"
proc/their(datum/mind/head)
if (head.current.gender == MALE)
return "his"
else if (head.current.gender == FEMALE)
return "her"
proc/their(datum/mind/head)
if (head.current.gender == MALE)
return "his"
else if (head.current.gender == FEMALE)
return "her"
return "their"
return "their"
proc/loyalist_major_victory()
return {"
proc/loyalist_major_victory()
return {"
NanoTrasen has praised the efforts of Captain [mode.head_loyalist] and loyal members of [their(mode.head_loyalist)] crew, who recently managed to put down a mutiny--amid a local interstellar crisis--aboard the <b>[station_name()]</b>, a research station in Tau Ceti.
The mutiny was spurred by a top secret directive sent to the station, presumably in response to the crisis within the system.
Despite the mutiny, the crew was successful in implementing the directive and activating their on-board emergency authentication device.
@@ -161,10 +161,10 @@ Despite the mutiny, the crew was successful in implementing the directive and ac
NanoTrasen will be awarding [mode.loyalists.len] members of the crew with the [loyalist_tag("Star of Loyalty")], following their successful efforts, at a ceremony this coming Thursday.
[mode.body_count.len] are believed to have died during the coup.
<p>NanoTrasen's image will forever be haunted by the fact that a mutiny took place on one of its own stations.</p>
"}
"}
proc/loyalist_minor_victory()
return {"
proc/loyalist_minor_victory()
return {"
NanoTrasen has praised the efforts of Captain [mode.head_loyalist] and loyal members of [their(mode.head_loyalist)] crew, who recently managed to put down a mutiny--amid a local interstellar crisis--aboard the <b>[station_name()]</b>, a research station in Tau Ceti.
The mutiny was spurred by a top secret directive sent to the station, presumably in response to the crisis within the system.
Despite the mutiny, the crew was successful in implementing the directive. Unfortunately, they failed to notify Central Command of their successes due to a breach in the chain of command.
@@ -172,10 +172,10 @@ Despite the mutiny, the crew was successful in implementing the directive. Unfor
NanoTrasen will be awarding [mode.loyalists.len] members of the crew with the [loyalist_tag("Star of Loyalty")], following their mostly successful efforts, at a ceremony this coming Thursday.
[mode.body_count.len] are believed to have died during the coup.
<p>NanoTrasen's image will forever be haunted by the fact that a mutiny took place on one of its own stations.</p>
"}
"}
proc/no_victory()
return {"
proc/no_victory()
return {"
NanoTrasen has been thrust into turmoil following an apparent mutiny by key personnel aboard the <b>[station_name()]</b>, a research station in Tau Ceti.
The mutiny was spurred by a top secret directive sent to the station, presumably in response to the crisis within the system.
No further information has yet emerged from the station or its crew, who are presumed to be in holding with NanoTrasen investigators.
@@ -183,10 +183,10 @@ NanoTrasen officials refuse to comment.
Sources indicate that [mode.mutineers.len] members of the station's personnel are currently under investigation for mutiny, and [mode.loyalists.len] crew are currently providing evidence to investigators, believed to be the 'loyal' station personnel.
[mode.body_count.len] are believed to have died during the coup.
<p>NanoTrasen's image will forever be haunted by the fact that a mutiny took place on one of its own stations.</p>
"}
"}
proc/mutineer_minor_victory()
return {"
proc/mutineer_minor_victory()
return {"
Reports have emerged that an impromptu mutiny has taken place, amid a local interstellar crisis, aboard the <b>[station_name()]</b>, a research station in Tau Ceti.
The mutiny was spurred by a top secret directive sent to the station, presumably in response to the crisis within the system.
Information at present indicates that the top-secret directive--which has since been retracted--was invalid due to a broken authentication code. Members of the crew, including an unidentified Head of Staff, prevented the directive from being accomplished.
@@ -194,10 +194,10 @@ Information at present indicates that the top-secret directive--which has since
NanoTrasen has reprimanded [mode.loyalists.len] members of the crew for failing to follow command validation procedures.
[mode.body_count.len] are believed to have died during the coup.
<p>Even though the directive was not successfully implemented, NanoTrasen's image will forever be haunted by the fact that its authentication protocol was breached with such magnitude and that a mutiny was the result.</p>
"}
"}
proc/mutineer_major_victory()
return {"
proc/mutineer_major_victory()
return {"
NanoTrasen has praised the efforts of [mode.head_mutineer.assigned_role] [mode.head_mutineer] and several other members of the crew, who recently seized control of a research station in Tau Ceti--<b>[station_name()]</b>--amid a local interstellar crisis.
What appears to have been a "legitimate" mutiny was spurred by a top secret directive sent to the station, presumably in response to the crisis within the system.
It has been revealed that the directive was invalid and fraudulent. Company officials have not released a statement about the source of the directive.
@@ -206,4 +206,4 @@ Thanks to the efforts of the resistant members of the crew, the directive was no
NanoTrasen has [mode.loyalists.len] members of the crew in holding, while it investigates the circumstances that led to the acceptance and initiation of an invalid directive.
[mode.body_count.len] are believed to have died during the coup.
<p>Even though the directive was not successfully implemented, NanoTrasen's image will forever be haunted by the fact that its authentication protocol was breached with such magnitude and that a mutiny was the result.</p>
"}
"}
+16 -16
View File
@@ -1,27 +1,27 @@
/hook/death/proc/track_kills(mob/living/carbon/human/deceased, gibbed)
var/datum/game_mode/mutiny/mode = get_mutiny_mode()
if (!mode) return 1
var/datum/game_mode/mutiny/mode = get_mutiny_mode()
if (!mode) return 1
mode.body_count.Add(deceased.mind)
return 1
mode.body_count.Add(deceased.mind)
return 1
/hook/clone/proc/update_icon(mob/living/carbon/human/H)
var/datum/game_mode/mutiny/mode = get_mutiny_mode()
if (!mode) return 1
var/datum/game_mode/mutiny/mode = get_mutiny_mode()
if (!mode) return 1
mode.update_icon(H.mind)
return 1
mode.update_icon(H.mind)
return 1
/hook/harvest_podman/proc/update_icon(mob/living/carbon/monkey/diona/D)
var/datum/game_mode/mutiny/mode = get_mutiny_mode()
if (!mode) return 1
var/datum/game_mode/mutiny/mode = get_mutiny_mode()
if (!mode) return 1
mode.update_icon(D.mind)
return 1
mode.update_icon(D.mind)
return 1
/hook/roundend/proc/report_mutiny_news()
var/datum/game_mode/mutiny/mode = get_mutiny_mode()
if (!mode) return 1
var/datum/game_mode/mutiny/mode = get_mutiny_mode()
if (!mode) return 1
mode.round_outcome()
return 1
mode.round_outcome()
return 1
+1 -3
View File
@@ -543,13 +543,11 @@
/obj/item/proc/IsShield()
return 0
/*
/obj/item/proc/get_turf()
/obj/item/proc/get_loc_turf()
var/atom/L = loc
while(L && !istype(L, /turf/))
L = L.loc
return loc
*/
/obj/item/proc/eyestab(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
+216 -216
View File
@@ -7,182 +7,182 @@
//javascript, the part that does most of the work~
dat += {"
<head>
<script type='text/javascript'>
<head>
<script type='text/javascript'>
var locked_tabs = new Array();
var locked_tabs = new Array();
function updateSearch(){
function updateSearch(){
var filter_text = document.getElementById('filter');
var filter = filter_text.value.toLowerCase();
var filter_text = document.getElementById('filter');
var filter = filter_text.value.toLowerCase();
if(complete_list != null && complete_list != ""){
var mtbl = document.getElementById("maintable_data_archive");
mtbl.innerHTML = complete_list;
}
if(complete_list != null && complete_list != ""){
var mtbl = document.getElementById("maintable_data_archive");
mtbl.innerHTML = complete_list;
}
if(filter.value == ""){
return;
}else{
if(filter.value == ""){
return;
}else{
var maintable_data = document.getElementById('maintable_data');
var ltr = maintable_data.getElementsByTagName("tr");
for ( var i = 0; i < ltr.length; ++i )
{
try{
var tr = ltr\[i\];
if(tr.getAttribute("id").indexOf("data") != 0){
continue;
}
var ltd = tr.getElementsByTagName("td");
var td = ltd\[0\];
var lsearch = td.getElementsByTagName("b");
var search = lsearch\[0\];
//var inner_span = li.getElementsByTagName("span")\[1\] //Should only ever contain one element.
//document.write("<p>"+search.innerText+"<br>"+filter+"<br>"+search.innerText.indexOf(filter))
if ( search.innerText.toLowerCase().indexOf(filter) == -1 )
{
//document.write("a");
//ltr.removeChild(tr);
td.innerHTML = "";
i--;
}
}catch(err) { }
}
}
var count = 0;
var index = -1;
var debug = document.getElementById("debug");
locked_tabs = new Array();
var maintable_data = document.getElementById('maintable_data');
var ltr = maintable_data.getElementsByTagName("tr");
for ( var i = 0; i < ltr.length; ++i )
{
try{
var tr = ltr\[i\];
if(tr.getAttribute("id").indexOf("data") != 0){
continue;
}
var ltd = tr.getElementsByTagName("td");
var td = ltd\[0\];
var lsearch = td.getElementsByTagName("b");
var search = lsearch\[0\];
//var inner_span = li.getElementsByTagName("span")\[1\] //Should only ever contain one element.
//document.write("<p>"+search.innerText+"<br>"+filter+"<br>"+search.innerText.indexOf(filter))
if ( search.innerText.toLowerCase().indexOf(filter) == -1 )
{
function expand(id,job,name,real_name,image,key,ip,antagonist,ref){
clearAll();
var span = document.getElementById(id);
body = "<table><tr><td>";
body += "</td><td align='center'>";
body += "<font size='2'><b>"+job+" "+name+"</b><br><b>Real name "+real_name+"</b><br><b>Played by "+key+" ("+ip+")</b></font>"
body += "</td><td align='center'>";
body += "<a href='?src=\ref[src];adminplayeropts="+ref+"'>PP</a> - "
body += "<a href='?src=\ref[src];notes=show;mob="+ref+"'>N</a> - "
body += "<a href='?_src_=vars;Vars="+ref+"'>VV</a> - "
body += "<a href='?src=\ref[src];traitor="+ref+"'>TP</a> - "
body += "<a href='?src=\ref[usr];priv_msg=\ref"+ref+"'>PM</a> - "
body += "<a href='?src=\ref[src];subtlemessage="+ref+"'>SM</a> - "
body += "<a href='?src=\ref[src];adminplayerobservejump="+ref+"'>JMP</a><br>"
if(antagonist > 0)
body += "<font size='2'><a href='?src=\ref[src];check_antagonist=1'><font color='red'><b>Antagonist</b></font></a></font>";
body += "</td></tr></table>";
span.innerHTML = body
}
function clearAll(){
var spans = document.getElementsByTagName('span');
for(var i = 0; i < spans.length; i++){
var span = spans\[i\];
var id = span.getAttribute("id");
if(!(id.indexOf("item")==0))
continue;
var pass = 1;
for(var j = 0; j < locked_tabs.length; j++){
if(locked_tabs\[j\]==id){
pass = 0;
break;
}
}
if(pass != 1)
continue;
span.innerHTML = "";
}
}
function addToLocked(id,link_id,notice_span_id){
var link = document.getElementById(link_id);
var decision = link.getAttribute("name");
if(decision == "1"){
link.setAttribute("name","2");
}else{
link.setAttribute("name","1");
removeFromLocked(id,link_id,notice_span_id);
return;
}
var pass = 1;
for(var j = 0; j < locked_tabs.length; j++){
if(locked_tabs\[j\]==id){
pass = 0;
break;
}
}
if(!pass)
return;
locked_tabs.push(id);
var notice_span = document.getElementById(notice_span_id);
notice_span.innerHTML = "<font color='red'>Locked</font> ";
//link.setAttribute("onClick","attempt('"+id+"','"+link_id+"','"+notice_span_id+"');");
//document.write("removeFromLocked('"+id+"','"+link_id+"','"+notice_span_id+"')");
//document.write("aa - "+link.getAttribute("onClick"));
}
function attempt(ab){
return ab;
}
function removeFromLocked(id,link_id,notice_span_id){
//document.write("a");
//ltr.removeChild(tr);
td.innerHTML = "";
i--;
var index = 0;
var pass = 0;
for(var j = 0; j < locked_tabs.length; j++){
if(locked_tabs\[j\]==id){
pass = 1;
index = j;
break;
}
}
if(!pass)
return;
locked_tabs\[index\] = "";
var notice_span = document.getElementById(notice_span_id);
notice_span.innerHTML = "";
//var link = document.getElementById(link_id);
//link.setAttribute("onClick","addToLocked('"+id+"','"+link_id+"','"+notice_span_id+"')");
}
}catch(err) { }
}
}
var count = 0;
var index = -1;
var debug = document.getElementById("debug");
function selectTextField(){
var filter_text = document.getElementById('filter');
filter_text.focus();
filter_text.select();
}
locked_tabs = new Array();
}
function expand(id,job,name,real_name,image,key,ip,antagonist,ref){
clearAll();
var span = document.getElementById(id);
body = "<table><tr><td>";
body += "</td><td align='center'>";
body += "<font size='2'><b>"+job+" "+name+"</b><br><b>Real name "+real_name+"</b><br><b>Played by "+key+" ("+ip+")</b></font>"
body += "</td><td align='center'>";
body += "<a href='?src=\ref[src];adminplayeropts="+ref+"'>PP</a> - "
body += "<a href='?src=\ref[src];notes=show;mob="+ref+"'>N</a> - "
body += "<a href='?_src_=vars;Vars="+ref+"'>VV</a> - "
body += "<a href='?src=\ref[src];traitor="+ref+"'>TP</a> - "
body += "<a href='?src=\ref[usr];priv_msg=\ref"+ref+"'>PM</a> - "
body += "<a href='?src=\ref[src];subtlemessage="+ref+"'>SM</a> - "
body += "<a href='?src=\ref[src];adminplayerobservejump="+ref+"'>JMP</a><br>"
if(antagonist > 0)
body += "<font size='2'><a href='?src=\ref[src];check_antagonist=1'><font color='red'><b>Antagonist</b></font></a></font>";
body += "</td></tr></table>";
</script>
</head>
span.innerHTML = body
}
function clearAll(){
var spans = document.getElementsByTagName('span');
for(var i = 0; i < spans.length; i++){
var span = spans\[i\];
var id = span.getAttribute("id");
if(!(id.indexOf("item")==0))
continue;
var pass = 1;
for(var j = 0; j < locked_tabs.length; j++){
if(locked_tabs\[j\]==id){
pass = 0;
break;
}
}
if(pass != 1)
continue;
span.innerHTML = "";
}
}
function addToLocked(id,link_id,notice_span_id){
var link = document.getElementById(link_id);
var decision = link.getAttribute("name");
if(decision == "1"){
link.setAttribute("name","2");
}else{
link.setAttribute("name","1");
removeFromLocked(id,link_id,notice_span_id);
return;
}
var pass = 1;
for(var j = 0; j < locked_tabs.length; j++){
if(locked_tabs\[j\]==id){
pass = 0;
break;
}
}
if(!pass)
return;
locked_tabs.push(id);
var notice_span = document.getElementById(notice_span_id);
notice_span.innerHTML = "<font color='red'>Locked</font> ";
//link.setAttribute("onClick","attempt('"+id+"','"+link_id+"','"+notice_span_id+"');");
//document.write("removeFromLocked('"+id+"','"+link_id+"','"+notice_span_id+"')");
//document.write("aa - "+link.getAttribute("onClick"));
}
function attempt(ab){
return ab;
}
function removeFromLocked(id,link_id,notice_span_id){
//document.write("a");
var index = 0;
var pass = 0;
for(var j = 0; j < locked_tabs.length; j++){
if(locked_tabs\[j\]==id){
pass = 1;
index = j;
break;
}
}
if(!pass)
return;
locked_tabs\[index\] = "";
var notice_span = document.getElementById(notice_span_id);
notice_span.innerHTML = "";
//var link = document.getElementById(link_id);
//link.setAttribute("onClick","addToLocked('"+id+"','"+link_id+"','"+notice_span_id+"')");
}
function selectTextField(){
var filter_text = document.getElementById('filter');
filter_text.focus();
filter_text.select();
}
</script>
</head>
"}
"}
//body tag start + onload and onkeypress (onkeyup) javascript event calls
dat += "<body onload='selectTextField(); updateSearch();' onkeyup='updateSearch();'>"
@@ -190,27 +190,27 @@
//title + search bar
dat += {"
<table width='560' align='center' cellspacing='0' cellpadding='5' id='maintable'>
<tr id='title_tr'>
<td align='center'>
<font size='5'><b>Player panel</b></font><br>
Hover over a line to see more information - <a href='?src=\ref[src];check_antagonist=1'>Check antagonists</a>
<p>
</td>
</tr>
<tr id='search_tr'>
<td align='center'>
<b>Search:</b> <input type='text' id='filter' value='' style='width:300px;'>
</td>
</tr>
</table>
<table width='560' align='center' cellspacing='0' cellpadding='5' id='maintable'>
<tr id='title_tr'>
<td align='center'>
<font size='5'><b>Player panel</b></font><br>
Hover over a line to see more information - <a href='?src=\ref[src];check_antagonist=1'>Check antagonists</a>
<p>
</td>
</tr>
<tr id='search_tr'>
<td align='center'>
<b>Search:</b> <input type='text' id='filter' value='' style='width:300px;'>
</td>
</tr>
</table>
"}
"}
//player table header
dat += {"
<span id='maintable_data_archive'>
<table width='560' align='center' cellspacing='0' cellpadding='5' id='maintable_data'>"}
<span id='maintable_data_archive'>
<table width='560' align='center' cellspacing='0' cellpadding='5' id='maintable_data'>"}
var/list/mobs = sortmobs()
var/i = 1
@@ -290,34 +290,34 @@
//output for each mob
dat += {"
<tr id='data[i]' name='[i]' onClick="addToLocked('item[i]','data[i]','notice_span[i]')">
<td align='center' bgcolor='[color]'>
<span id='notice_span[i]'></span>
<a id='link[i]'
onmouseover='expand("item[i]","[M_job]","[M_name]","[M_rname]","--unused--","[M_key]","[M.lastKnownIP]",[is_antagonist],"\ref[M]")'
>
<b id='search[i]'>[M_name] - [M_rname] - [M_key] ([M_job])</b>
</a>
<br><span id='item[i]'></span>
</td>
</tr>
<tr id='data[i]' name='[i]' onClick="addToLocked('item[i]','data[i]','notice_span[i]')">
<td align='center' bgcolor='[color]'>
<span id='notice_span[i]'></span>
<a id='link[i]'
onmouseover='expand("item[i]","[M_job]","[M_name]","[M_rname]","--unused--","[M_key]","[M.lastKnownIP]",[is_antagonist],"\ref[M]")'
>
<b id='search[i]'>[M_name] - [M_rname] - [M_key] ([M_job])</b>
</a>
<br><span id='item[i]'></span>
</td>
</tr>
"}
"}
i++
//player table ending
dat += {"
</table>
</span>
</table>
</span>
<script type='text/javascript'>
var maintable = document.getElementById("maintable_data_archive");
var complete_list = maintable.innerHTML;
</script>
</body></html>
"}
<script type='text/javascript'>
var maintable = document.getElementById("maintable_data_archive");
var complete_list = maintable.innerHTML;
</script>
</body></html>
"}
usr << browse(dat, "window=players;size=600x480")
@@ -332,7 +332,7 @@
var/list/mobs = sortmobs()
for(var/mob/M in mobs)
if(!M.ckey) continue
if(!M.ckey) continue
dat += "<tr><td>[M.name]</td>"
if(isAI(M))
@@ -422,8 +422,8 @@
if(istype(disk_loc, /obj))
var/obj/O = disk_loc
dat += "in \a [O.name] "
disk_loc = disk_loc.loc
dat += "in [disk_loc.loc] at ([disk_loc.x], [disk_loc.y], [disk_loc.z])</td></tr>"
disk_loc = disk_loc.loc
dat += "in [disk_loc.loc] at ([disk_loc.x], [disk_loc.y], [disk_loc.z])</td></tr>"
dat += "</table>"
if(ticker.mode.head_revolutionaries.len || ticker.mode.revolutionaries.len)
@@ -497,23 +497,23 @@
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>
"}
<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>
"}
<td>
<a href='?src=\ref[admins];traitor=\ref[M]'>Show Objective</a>
</td>
"}
txt += "</tr>"
return txt