.
diff --git a/README.md b/README.md
index cf5bfc38..8d2210c3 100644
--- a/README.md
+++ b/README.md
@@ -4,6 +4,17 @@
---
+### LICENSE
+Aurorastation, as it is forked from Baystation12, is licensed under the GNU Affero General Public License version 3, which can be found in full in LICENSE-AGPL3.txt.
+
+Commits with a git authorship date prior to `1420675200 +0000` (2015/01/08 00:00) are licensed under the GNU General Public License version 3, which can be found in full in LICENSE-GPL3.txt.
+
+All commits whose authorship dates are not prior to `1420675200 +0000` are assumed to be licensed under AGPL v3, if you wish to license under GPL v3 please make this clear in the commit message and any added files.
+
+If you wish to develop and host this codebase in a closed source manner you may use all commits prior to `1420675200 +0000`, which are licensed under GPL v3. The major change here is that if you host a server using any code licensed under AGPLv3 you are required to provide full source code for your servers users as well including addons and modifications you have made.
+
+See [here](https://www.gnu.org/licenses/why-affero-gpl.html) for more information.
+
### GETTING THE CODE
The simplest way to obtain the code is using the github .zip feature.
diff --git a/SQL/aurora_schema.sql b/SQL/aurora_schema.sql
new file mode 100644
index 00000000..a6729e81
--- /dev/null
+++ b/SQL/aurora_schema.sql
@@ -0,0 +1,35 @@
+-- ------------------------------
+-- Custom Items Table
+-- tgstation.aurora_customitems
+-- ------------------------------
+CREATE TABLE `aurora_customitems` (
+ `id` INT(11) NOT NULL AUTO_INCREMENT,
+ `ckey` VARCHAR(32) NOT NULL,
+ `character` VARCHAR(32) NOT NULL,
+ `item` VARCHAR(124) NOT NULL,
+ `job` TEXT NULL, -- Job restrictions go here. Can be left blank. Format is Job One,Job Two,Job Three Point Five
+ PRIMARY KEY (`id`)
+) ENGINE=INNODB DEFAULT CHARSET=LATIN1;
+
+-- ------------------------------
+-- Blacklisted IP table
+-- tgstation.aurora_ipblacklist
+-- ------------------------------
+CREATE TABLE `aurora_ipblacklist` (
+ `id` INT(11) NOT NULL AUTO_INCREMENT, -- Auto-incremented, had issues with a missing ID field, so here
+ `ip` VARCHAR(32) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=INNODB DEFAULT CHARSET=LATIN1;
+
+-- ------------------------------
+-- Forms table
+-- tgstation.aurora_forms
+-- ------------------------------
+CREATE TABLE `aurora_forms` (
+ `id` VARCHAR(4) NOT NULL,
+ `name` VARCHAR(32) NOT NULL, -- Name for the paper
+ `department` VARCHAR(32) NOT NULL, -- What department, one word, usually
+ `data` TEXT NOT NULL, -- The contents of the paper itself, formatted in BB
+ `info` TEXT NULL, -- Info for further request, plain text
+ PRIMARY KEY(`id`)
+) ENGINE=INNODB DEFAULT CHARSET=LATIN1;
\ No newline at end of file
diff --git a/aurora.dme b/aurora.dme
index 97939030..b7fe191e 100644
--- a/aurora.dme
+++ b/aurora.dme
@@ -322,6 +322,20 @@
#include "code\game\gamemodes\malfunction\malfunction.dm"
#include "code\game\gamemodes\meteor\meteor.dm"
#include "code\game\gamemodes\meteor\meteors.dm"
+#include "code\game\gamemodes\mutiny\auth_key.dm"
+#include "code\game\gamemodes\mutiny\directive.dm"
+#include "code\game\gamemodes\mutiny\emergency_authentication_device.dm"
+#include "code\game\gamemodes\mutiny\key_pinpointer.dm"
+#include "code\game\gamemodes\mutiny\mutiny.dm"
+#include "code\game\gamemodes\mutiny\mutiny_admin.dm"
+#include "code\game\gamemodes\mutiny\mutiny_fluff.dm"
+#include "code\game\gamemodes\mutiny\mutiny_hooks.dm"
+#include "code\game\gamemodes\mutiny\directives\alien_fraud_directive.dm"
+#include "code\game\gamemodes\mutiny\directives\bluespace_contagion_directive.dm"
+#include "code\game\gamemodes\mutiny\directives\financial_crisis_directive.dm"
+#include "code\game\gamemodes\mutiny\directives\ipc_virus_directive.dm"
+#include "code\game\gamemodes\mutiny\directives\tau_ceti_needs_women_directive.dm"
+#include "code\game\gamemodes\mutiny\directives\terminations_directive.dm"
#include "code\game\gamemodes\ninja\ninja.dm"
#include "code\game\gamemodes\nuclear\nuclear.dm"
#include "code\game\gamemodes\nuclear\nuclearbomb.dm"
@@ -930,7 +944,6 @@
#include "code\modules\events\money_hacker.dm"
#include "code\modules\events\money_lotto.dm"
#include "code\modules\events\money_spam.dm"
-#include "code\modules\events\organ_failure.dm"
#include "code\modules\events\prison_break.dm"
#include "code\modules\events\radiation_storm.dm"
#include "code\modules\events\rogue_drones.dm"
diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm
index b6e38961..ce70d501 100644
--- a/code/controllers/configuration.dm
+++ b/code/controllers/configuration.dm
@@ -104,7 +104,7 @@
var/health_threshold_dead = -100
var/organ_health_multiplier = 1
- var/organ_regeneration_multiplier = 1
+ var/organ_regeneration_multiplier = 0
var/bones_can_break = 0
var/limbs_can_break = 0
diff --git a/code/controllers/master_controller.dm b/code/controllers/master_controller.dm
index 649dc475..01178e8e 100644
--- a/code/controllers/master_controller.dm
+++ b/code/controllers/master_controller.dm
@@ -61,9 +61,6 @@ datum/controller/game_controller/New()
datum/controller/game_controller/proc/setup()
world.tick_lag = config.Ticklag
- spawn(20)
- createRandomZlevel()
-
if(!air_master)
air_master = new /datum/controller/air_system()
air_master.Setup()
diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm
index 8198341b..15c68352 100644
--- a/code/game/area/Space Station 13 areas.dm
+++ b/code/game/area/Space Station 13 areas.dm
@@ -378,6 +378,9 @@ var/list/ghostteleportlocs = list()
/area/centcom/holding
name = "\improper Holding Facility"
+/area/centcom/prison
+ name = "\improper Prison Facility"
+
//SYNDICATES
/area/syndicate_mothership
diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm
index d98853dd..3a896d8b 100644
--- a/code/game/gamemodes/changeling/changeling_powers.dm
+++ b/code/game/gamemodes/changeling/changeling_powers.dm
@@ -33,6 +33,8 @@
if(!(language in mind.changeling.absorbed_languages))
mind.changeling.absorbed_languages += language
+ add_language("Changeling")
+
return 1
//removes our changeling verbs
@@ -41,6 +43,7 @@
for(var/datum/power/changeling/P in mind.changeling.purchasedpowers)
if(P.isVerb)
verbs -= P.verbpath
+ remove_language("Changeling")
//Helper proc. Does all the checks and stuff for us to avoid copypasta
@@ -657,6 +660,7 @@ var/list/datum/dna/hivemind_bank = list()
return
var/mimic_voice = input("Enter a name to mimic.", "Mimic Voice", null) as text
+ mimic_voice = strip_html(mimic_voice, MAX_NAME_LEN) //Why am I doing it like this? Because 30+ hours no sleeps
if(!mimic_voice)
return
@@ -691,6 +695,8 @@ var/list/datum/dna/hivemind_bank = list()
var/list/victims = list()
for(var/mob/living/carbon/C in oview(changeling.sting_range))
+ if(C.isipc())
+ continue
victims += C
var/mob/living/carbon/T = input(src, "Who will we sting?") as null|anything in victims
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index 16bb208e..0932b1fc 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -28,6 +28,7 @@
var/required_enemies = 0
var/recommended_enemies = 0
var/newscaster_announcements = null
+ var/ert_disabled = 0
var/uplink_welcome = "Syndicate Uplink Console:"
var/uplink_uses = 10
var/uplink_items = {"Highly Visible and Dangerous Weapons;
@@ -418,6 +419,9 @@ Implants;
heads += player.mind
return heads
+/datum/game_mode/proc/check_antagonists_topic(href, href_list[])
+ return 0
+
/datum/game_mode/New()
newscaster_announcements = pick(newscaster_standard_feeds)
diff --git a/code/game/gamemodes/heist/heist.dm b/code/game/gamemodes/heist/heist.dm
index 8b88594b..032ca13e 100644
--- a/code/game/gamemodes/heist/heist.dm
+++ b/code/game/gamemodes/heist/heist.dm
@@ -102,6 +102,7 @@ VOX HEIST ROUNDTYPE
vox.languages = list() // Removing language from chargen.
vox.flavor_text = ""
vox.add_language("Vox-pidgin")
+ vox.add_language("Ceti Basic")
vox.h_style = "Short Vox Quills"
vox.f_style = "Shaved"
for(var/datum/organ/external/limb in vox.organs)
diff --git a/code/game/gamemodes/mutiny/auth_key.dm b/code/game/gamemodes/mutiny/auth_key.dm
new file mode 100644
index 00000000..1f7ea3c8
--- /dev/null
+++ b/code/game/gamemodes/mutiny/auth_key.dm
@@ -0,0 +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
+
+ var/time_entered_space
+ var/obj/item/device/radio/radio
+
+ 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
+
+ spawn(10 SECONDS)
+ keep_alive()
+
+/obj/item/weapon/mutiny/auth_key/captain
+ name = "Captain's Authentication Key"
+
+/obj/item/weapon/mutiny/auth_key/secondary
+ name = "Emergency Secondary Authentication Key"
diff --git a/code/game/gamemodes/mutiny/directive.dm b/code/game/gamemodes/mutiny/directive.dm
new file mode 100644
index 00000000..857e0730
--- /dev/null
+++ b/code/game/gamemodes/mutiny/directive.dm
@@ -0,0 +1,32 @@
+datum/directive
+ var/datum/game_mode/mutiny/mode
+ var/list/special_orders
+
+ New(var/datum/game_mode/mutiny/M)
+ mode = M
+
+ proc/get_description()
+ return {"
+
+ NanoTrasen's reasons for the following directives are classified.
+
+ "}
+
+ proc/meets_prerequisites()
+ return 0
+
+ proc/directives_complete()
+ return 1
+
+ proc/initialize()
+ return 1
+
+ proc/get_remaining_orders()
+ return ""
+
+/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
+
+ return mode.current_directive
diff --git a/code/game/gamemodes/mutiny/directives/alien_fraud_directive.dm b/code/game/gamemodes/mutiny/directives/alien_fraud_directive.dm
new file mode 100644
index 00000000..6df5a220
--- /dev/null
+++ b/code/game/gamemodes/mutiny/directives/alien_fraud_directive.dm
@@ -0,0 +1,41 @@
+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.")
+
+ proc/is_alien(mob/M)
+ var/species = M.get_species()
+ return species == "Tajaran" || species == "Unathi"
+
+datum/directive/terminations/alien_fraud/get_crew_to_terminate()
+ var/list/aliens[0]
+ for(var/mob/M in player_list)
+ if (M.is_ready() && is_alien(M) && M != mode.head_loyalist.current)
+ aliens.Add(M)
+ return aliens
+
+datum/directive/terminations/alien_fraud/get_description()
+ return {"
+
+ An extensive conspiracy network aimed at defrauding NanoTrasen of large amounts of funds has been uncovered
+ operating within [system_name()]. Human personnel are not suspected to be involved. Further information is classified.
+
+ "}
+
+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/M in player_list)
+ var/species = M.get_species()
+ if(species == "Tajaran")
+ tajarans++
+ if(species == "Unathi")
+ unathi++
+
+ if (!tajarans || !unathi)
+ return 0
+
+ return (tajarans + unathi) <= (player_list.len / 3)
diff --git a/code/game/gamemodes/mutiny/directives/bluespace_contagion_directive.dm b/code/game/gamemodes/mutiny/directives/bluespace_contagion_directive.dm
new file mode 100644
index 00000000..0d892d55
--- /dev/null
+++ b/code/game/gamemodes/mutiny/directives/bluespace_contagion_directive.dm
@@ -0,0 +1,62 @@
+#define INFECTION_COUNT 5
+
+datum/directive/bluespace_contagion
+ var/list/infected = list()
+
+ proc/get_infection_candidates()
+ var/list/candidates[0]
+ for(var/mob/M in player_list)
+ if (M.is_ready() && !M.is_mechanical())
+ candidates.Add(M)
+ return candidates
+
+datum/directive/bluespace_contagion/get_description()
+ return {"
+
+ A manufactured and near-undetectable virus is spreading on NanoTrasen stations.
+ The pathogen travels by bluespace after maturing for one day and meets the Sol Health Organisation standards for a class X biological threat, warranting use of lethal force to contain an outbreak.
+ No treatment has yet been discovered. Personnel onboard [station_name()] have been infected. Further information is classified.
+
+ "}
+
+datum/directive/bluespace_contagion/initialize()
+ var/list/candidates = get_infection_candidates()
+ var/list/infected_names = list()
+ for(var/i=0, i < INFECTION_COUNT, i++)
+ if(!candidates.len)
+ break
+
+ var/mob/candidate = pick(candidates)
+ candidates.Remove(candidate)
+
+ if(!candidate.mind.assigned_role == "Captain") //Insure the loyalist doesn't get picked
+ continue
+
+ 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 and burn the infected.")
+
+datum/directive/bluespace_contagion/meets_prerequisites()
+ var/list/candidates = get_infection_candidates()
+ return candidates.len >= 7
+
+datum/directive/bluespace_contagion/directives_complete()
+ return infected.len == 0
+
+datum/directive/bluespace_contagion/get_remaining_orders()
+ var/text = ""
+ for(var/victim in infected)
+ text += "Kill [victim]"
+ return text
+
+/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
+
+ if(deceased in D.infected)
+ D.infected.Remove(deceased)
+ return 1
diff --git a/code/game/gamemodes/mutiny/directives/financial_crisis_directive.dm b/code/game/gamemodes/mutiny/directives/financial_crisis_directive.dm
new file mode 100644
index 00000000..03f36c4e
--- /dev/null
+++ b/code/game/gamemodes/mutiny/directives/financial_crisis_directive.dm
@@ -0,0 +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.")
+
+datum/directive/terminations/financial_crisis/get_crew_to_terminate()
+ var/list/civilians[0]
+ var/list/candidates = civilian_positions - "Head of Personnel"
+ for(var/mob/M in player_list)
+ if (M.is_ready() && candidates.Find(M.mind.assigned_role))
+ civilians.Add(M)
+ return civilians
+
+datum/directive/terminations/financial_crisis/get_description()
+ return {"
+
+ [system_name()] system banks in financial crisis. Local emergency situation ongoing.
+ NT Funds redistributed in accordance with financial regulations covered by employee contracts, impact upon civilian department expected.
+ Further information is classified.
+
+ "}
+
+datum/directive/terminations/financial_crisis/meets_prerequisites()
+ var/list/civilians = get_crew_to_terminate()
+ return civilians.len >= 5
diff --git a/code/game/gamemodes/mutiny/directives/ipc_virus_directive.dm b/code/game/gamemodes/mutiny/directives/ipc_virus_directive.dm
new file mode 100644
index 00000000..e035b665
--- /dev/null
+++ b/code/game/gamemodes/mutiny/directives/ipc_virus_directive.dm
@@ -0,0 +1,96 @@
+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.")
+
+ 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()
+
+ proc/get_ipcs()
+ var/list/machines[0]
+ for(var/mob/M in player_list)
+ if (M.is_ready() && M.get_species() == "Machine")
+ machines.Add(M)
+ return machines
+
+ proc/get_roboticists()
+ var/list/roboticists[0]
+ for(var/mob/M in player_list)
+ if (M.is_ready() && roboticist_roles.Find(M.mind.assigned_role))
+ roboticists.Add(M)
+ 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)
+
+datum/directive/ipc_virus/get_description()
+ return {"
+
+ IPC units have been found to be infected with a violent and undesired virus in Virgus Ferrorus system.
+ Risk to [station_name()] IPC units has not been assessed. Further information is classified.
+
+ "}
+
+datum/directive/ipc_virus/meets_prerequisites()
+ 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
+
+datum/directive/ipc_virus/get_remaining_orders()
+ var/text = ""
+ for(var/brain in brains_to_enslave)
+ text += "Debrain [brain]"
+
+ for(var/brain in cyborgs_to_make)
+ text += "Enslave [brain] as a Cyborg"
+
+ for(var/id in ids_to_terminate)
+ text += "Terminate [id]"
+
+ return text
+
+/hook/debrain/proc/debrain_directive(var/obj/item/organ/brain/B)
+ var/datum/directive/ipc_virus/D = get_directive("ipc_virus")
+ if (!D) return 1
+
+ if(B && B.brainmob && B.brainmob.mind && D.brains_to_enslave.Find(B.brainmob.mind))
+ D.brains_to_enslave.Remove(B.brainmob.mind)
+
+ 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
+
+ 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)
+
+ 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
+
+ if(D.ids_to_terminate && D.ids_to_terminate.Find(id))
+ D.ids_to_terminate.Remove(id)
+
+ return 1
diff --git a/code/game/gamemodes/mutiny/directives/tau_ceti_needs_women_directive.dm b/code/game/gamemodes/mutiny/directives/tau_ceti_needs_women_directive.dm
new file mode 100644
index 00000000..a9d047d4
--- /dev/null
+++ b/code/game/gamemodes/mutiny/directives/tau_ceti_needs_women_directive.dm
@@ -0,0 +1,108 @@
+datum/directive/tau_ceti_needs_women
+ 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.get_gender() == FEMALE ? MALE : FEMALE
+
+ proc/is_target_gender(mob/M)
+ var/species = M.get_species()
+ return species != "Diona" && M.get_gender() == get_target_gender()
+
+ proc/get_crew_of_target_gender()
+ var/list/targets[0]
+ for(var/mob/M in player_list)
+ if(M.is_ready() && is_target_gender(M) && !M.is_mechanical())
+ targets.Add(M)
+ return targets
+
+ proc/get_target_heads()
+ var/list/heads[0]
+ for(var/mob/M in get_crew_of_target_gender())
+ if(command_positions.Find(M.mind.assigned_role))
+ heads.Add(M)
+ return heads
+
+ proc/get_target_aliens()
+ var/list/aliens[0]
+ for(var/mob/M in get_crew_of_target_gender())
+ var/species = M.get_species()
+ if(species == "Tajaran" || species == "Unathi" || species == "Skrell")
+ aliens.Add(M)
+ 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++
+
+ return heads_reassigned
+
+datum/directive/tau_ceti_needs_women/get_description()
+ return {"
+
+ Recent evidence suggests [get_target_gender()] aptitudes may be effected by radiation from [system_name()].
+ Effects were measured under laboratory and station conditions. Humans remain more trusted than Xeno. Further information is classified.
+
+ "}
+
+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_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, Tajaran, and Unathi.")
+
+datum/directive/tau_ceti_needs_women/meets_prerequisites()
+ var/females = 0
+ var/males = 0
+ for(var/mob/M in player_list)
+ if(M.is_ready() && !M.is_mechanical() && M.get_species() != "Diona")
+ var/gender = M.get_gender()
+ if(gender == MALE)
+ males++
+ else if(gender == FEMALE)
+ females++
+
+ return males >= 2 && females >= 2
+
+datum/directive/tau_ceti_needs_women/directives_complete()
+ return command_targets.len == count_heads_reassigned() && alien_targets.len == 0
+
+datum/directive/tau_ceti_needs_women/get_remaining_orders()
+ var/text = ""
+ for(var/head in command_targets)
+ if(!command_targets[head])
+ text += "Remove [head] from a Head Role"
+
+ for(var/id in alien_targets)
+ text += "Terminate [id]"
+
+ return text
+
+/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
+
+ 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
+
+/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
+
+ 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
+
+ return 1
diff --git a/code/game/gamemodes/mutiny/directives/terminations_directive.dm b/code/game/gamemodes/mutiny/directives/terminations_directive.dm
new file mode 100644
index 00000000..7f3744dc
--- /dev/null
+++ b/code/game/gamemodes/mutiny/directives/terminations_directive.dm
@@ -0,0 +1,71 @@
+// This is a parent directive meant to be derived by directives that fit
+// the "fire X type of employee" pattern of directives. Simply apply your
+// 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()
+
+ 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_revoke)
+ if (!accounts_to_revoke[account_number])
+ return 0
+
+ return ids_to_terminate.len == 0
+
+datum/directive/terminations/initialize()
+ for(var/mob/living/carbon/human/H in get_crew_to_terminate())
+ var/datum/money_account/account = H.mind.initial_account
+ accounts_to_revoke["[account.account_number]"] = 0
+ accounts_to_suspend["[account.account_number]"] = account.suspended
+ ids_to_terminate.Add(H.wear_id)
+
+datum/directive/terminations/get_remaining_orders()
+ var/text = ""
+ for(var/account_number in accounts_to_suspend)
+ if(!accounts_to_suspend[account_number])
+ text += "Suspend Account #[account_number]"
+
+ for(var/account_number in accounts_to_revoke)
+ if(!accounts_to_revoke[account_number])
+ text += "Revoke Account #[account_number]"
+
+ for(var/id in ids_to_terminate)
+ text += "Terminate [id]"
+
+ return text
+
+/hook/revoke_payroll/proc/payroll_directive(datum/money_account/account)
+ 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
+
+ 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
+
+ if(D.accounts_to_suspend && D.accounts_to_suspend.Find("[account.account_number]"))
+ D.accounts_to_suspend["[account.account_number]"] = account.suspended
+
+ 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
+
+ if(D.ids_to_terminate && D.ids_to_terminate.Find(id))
+ D.ids_to_terminate.Remove(id)
+
+ return 1
diff --git a/code/game/gamemodes/mutiny/emergency_authentication_device.dm b/code/game/gamemodes/mutiny/emergency_authentication_device.dm
new file mode 100644
index 00000000..5bdcf275
--- /dev/null
+++ b/code/game/gamemodes/mutiny/emergency_authentication_device.dm
@@ -0,0 +1,105 @@
+/obj/machinery/emergency_authentication_device
+ var/datum/game_mode/mutiny/mode
+
+ 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
+
+ flags = FPRINT
+ use_power = 0
+
+ New(loc, mode)
+ src.mode = mode
+ ..(loc)
+
+ proc/check_key_existence()
+ if(!mode.captains_key)
+ captains_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"
+
+/obj/machinery/emergency_authentication_device/attack_hand(mob/user)
+ 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
+
+ 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)
+ 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
+
+ // 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(!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
+
+ 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
+
+ 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 << {"
+This is a specialized communications device that is able to instantly send a message to NanoTrasen High Command via quantum entanglement with a sister device at CentCom.
+The EAD's status is [get_status()]."}
diff --git a/code/game/gamemodes/mutiny/key_pinpointer.dm b/code/game/gamemodes/mutiny/key_pinpointer.dm
new file mode 100644
index 00000000..c481fd5b
--- /dev/null
+++ b/code/game/gamemodes/mutiny/key_pinpointer.dm
@@ -0,0 +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
+
+ 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."
+
+/obj/item/weapon/pinpointer/advpinpointer/auth_key/examine()
+ 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"
+
+ New()
+ // This crate is only accessible during mutiny rounds
+ if (istype(ticker.mode,/datum/game_mode/mutiny))
+ ..()
diff --git a/code/game/gamemodes/mutiny/mutiny.dm b/code/game/gamemodes/mutiny/mutiny.dm
new file mode 100644
index 00000000..3b968315
--- /dev/null
+++ b/code/game/gamemodes/mutiny/mutiny.dm
@@ -0,0 +1,390 @@
+#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/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
+
+ uplink_welcome = "Mutineers Uplink Console:"
+ uplink_uses = 0
+
+ New()
+ fluff = new(src)
+
+ proc/reveal_directives()
+ spawn(rand(1 MINUTE, 3 MINUTES))
+ command_alert("Incoming emergency directive: Captain's office fax machine, [station_name()].","Emergency Transmission")
+ spawn(rand(3 MINUTES, 5 MINUTES))
+ send_pda_message()
+ spawn(rand(3 MINUTES, 5 MINUTES))
+ fluff.announce_directives()
+ spawn(rand(2 MINUTES, 3 MINUTE))
+
+ var/list/reasons = list(
+ "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"
+ )
+ command_alert("The presence of [pick(reasons)] in the region is tying up all available local emergency resources; emergency response teams cannot be called at this time.","Emergency Transmission")
+
+ // 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.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.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
+
+ 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]*"))
+
+ 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/equip_head_loyalist()
+ equip_head(head_loyalist, "loyalist", /mob/living/carbon/human/proc/recruit_loyalist)
+
+ proc/equip_head_mutineer()
+ equip_head(head_mutineer, "mutineer", /mob/living/carbon/human/proc/recruit_mutineer)
+
+ proc/equip_head(datum/mind/head, faction, proc/recruitment_verb)
+ var/mob/living/carbon/human/H = head.current
+ H << "You are the Head [capitalize(faction)]!"
+ head.special_role = "head_[faction]"
+
+ var/slots = get_equipment_slots()
+ switch(faction)
+ if("loyalist")
+ if(captains_key) del(captains_key)
+ captains_key = new(H)
+ H.equip_in_one_of_slots(captains_key, slots)
+ if("mutineer")
+ if(secondary_key) del(secondary_key)
+ secondary_key = new(H)
+ H.equip_in_one_of_slots(secondary_key, slots)
+
+ H.update_icons()
+ H.verbs += recruitment_verb
+
+ proc/add_loyalist(datum/mind/M)
+ add_faction(M, "loyalist", loyalists)
+
+ proc/add_mutineer(datum/mind/M)
+ add_faction(M, "mutineer", mutineers)
+
+ 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
+
+ if(M in loyalists)
+ loyalists.Remove(M)
+
+ if(M in mutineers)
+ mutineers.Remove(M)
+
+ M.special_role = faction
+ faction_list.Add(M)
+
+ 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!")
+
+ update_icon(M)
+
+ proc/was_bloodbath()
+ var/list/remaining_loyalists = loyalists - body_count
+ if (!remaining_loyalists.len)
+ return 1
+
+ var/list/remaining_mutineers = mutineers - body_count
+ if (!remaining_mutineers.len)
+ return 1
+
+ return 0
+
+ proc/replace_nuke_with_ead()
+ for(var/obj/machinery/nuclearbomb/N in world)
+ ead = new(N.loc, src)
+ del(N)
+
+ proc/unbolt_vault_door()
+ var/obj/machinery/door/airlock/vault = locate(/obj/machinery/door/airlock/vault)
+ vault.lock()
+
+ proc/make_secret_transcript()
+ var/obj/machinery/computer/telecomms/server/S = locate(/obj/machinery/computer/telecomms/server)
+ if(!S) return
+
+ var/obj/item/weapon/paper/crumpled/bloody/transcript = new(S.loc)
+ transcript.name = "secret transcript"
+ transcript.info = fluff.secret_transcript()
+
+ 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/round_outcome()
+ world << "Breaking News
"
+ if (was_bloodbath())
+ world << fluff.no_victory()
+ return
+
+ 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()
+
+ world << sound('sound/machines/twobeep.ogg')
+
+ proc/update_all_icons()
+ spawn(0)
+ for(var/datum/mind/M in mutineers)
+ update_icon(M)
+
+ for(var/datum/mind/M in loyalists)
+ update_icon(M)
+ return 1
+
+ proc/update_icon(datum/mind/M)
+ if(!M.current || !M.current.client)
+ return 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)
+
+ 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(M in loyalists)
+ var/I = image('icons/mob/mob.dmi', loc=M.current, icon_state = "loyalist")
+ head_loyalist.current.client.images += I
+
+ if(M in mutineers)
+ var/I = image('icons/mob/mob.dmi', loc=M.current, icon_state = "mutineer")
+ head_mutineer.current.client.images += I
+
+ return 1
+
+/datum/game_mode/mutiny/announce()
+ fluff.announce()
+
+/datum/game_mode/mutiny/pre_setup()
+ var/list/loyalist_candidates = get_head_loyalist_candidates()
+ msg_scopes("Loyalist candidates: [loyalist_candidates]")
+ if(!loyalist_candidates || loyalist_candidates.len == 0)
+ world << "\red Mutiny mode aborted: no valid candidates for head loyalist."
+ return 0
+
+ var/list/mutineer_candidates = get_head_mutineer_candidates()
+ msg_scopes("Mutineer candidates: [mutineer_candidates]")
+ if(!mutineer_candidates || mutineer_candidates.len == 0)
+ world << "\red Mutiny mode aborted: no valid candidates for head mutineer."
+ return 0
+
+ var/list/directive_candidates = get_directive_candidates()
+ msg_scopes("Directive candidates: [directive_candidates]")
+ if(!directive_candidates || directive_candidates.len == 0)
+ world << "\red Mutiny mode aborted: no valid candidates for Directive X."
+ return 0
+
+ head_loyalist = pick(loyalist_candidates)
+ msg_scopes("Head loyalist: [head_loyalist]")
+ head_mutineer = pick(mutineer_candidates)
+ msg_scopes("Head mutineer: [head_mutineer]")
+ current_directive = pick(directive_candidates)
+ msg_scopes("Directive chosen: [current_directive]")
+
+ return 1
+
+/datum/game_mode/mutiny/post_setup()
+ equip_head_loyalist()
+ equip_head_mutineer()
+
+ loyalists.Add(head_loyalist)
+ mutineers.Add(head_mutineer)
+
+ replace_nuke_with_ead()
+ current_directive.initialize()
+ unbolt_vault_door()
+ make_secret_transcript()
+
+ update_all_icons()
+ spawn(0)
+ reveal_directives()
+ ..()
+
+/mob/living/carbon/human/proc/recruit_loyalist()
+ 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/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(world.time < mode.recruit_loyalist_cooldown)
+ src << "\red Wait [MUTINY_RECRUITMENT_COOLDOWN] seconds before recruiting again."
+ return
+
+ mode.recruit_loyalist_cooldown = world.time + (MUTINY_RECRUITMENT_COOLDOWN SECONDS)
+
+ 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 [M] declined to support the loyalists."
+
+/mob/living/carbon/human/proc/recruit_mutineer()
+ 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/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(world.time < mode.recruit_mutineer_cooldown)
+ src << "\red Wait [MUTINY_RECRUITMENT_COOLDOWN] seconds before recruiting again."
+ return
+
+ mode.recruit_mutineer_cooldown = world.time + (MUTINY_RECRUITMENT_COOLDOWN SECONDS)
+
+ 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 [M] declined to support the mutineers."
+
+/proc/get_mutiny_mode()
+ if(!ticker || !istype(ticker.mode, /datum/game_mode/mutiny))
+ return null
+
+ return ticker.mode
diff --git a/code/game/gamemodes/mutiny/mutiny_admin.dm b/code/game/gamemodes/mutiny/mutiny_admin.dm
new file mode 100644
index 00000000..2ba08def
--- /dev/null
+++ b/code/game/gamemodes/mutiny/mutiny_admin.dm
@@ -0,0 +1,83 @@
+/datum/game_mode/mutiny/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/remaining_objectives = current_directive.get_remaining_orders()
+ var/txt = {"
+ Context:
+
+ [current_directive.get_description()]
+
+ Orders:
+
+ [fluff.get_orders()]
+
+
+ Remaining Objectives
+
+ [remaining_objectives ? remaining_objectives : "- None
"]
+
+
+ Authentication:
+ Captain's Key: [captains_key_loc]
+ Activate
+ Secondary Key: [secondary_key_loc]
+ Activate
+ EAD: [ead ? ead.get_status() : "Lost or Destroyed"]
+ Activate
+
+ "}
+
+ txt += "Reassign Head Loyalist
"
+ 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)
+
+ txt += "Reassign Head Mutineer
"
+ 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/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
+ if("reassign_head_loyalist")
+ var/mob/M = get_reassignment_candidate("Loyalist")
+ if(M)
+ head_loyalist = M.mind
+ equip_head_loyalist()
+ return 1
+ if("reassign_head_mutineer")
+ var/mob/M = get_reassignment_candidate("Mutineer")
+ if(M)
+ head_mutineer = M.mind
+ equip_head_mutineer()
+ return 1
+ else
+ return 0
+
+/datum/game_mode/mutiny/proc/get_reassignment_candidate(faction)
+ var/list/targets[0]
+ for(var/mob/living/carbon/human/H in player_list)
+ if(H.is_ready() && !H.is_dead())
+ targets.Add(H)
+
+ return input("Select a player to lead the [faction] faction.", "Head [faction] reassignment", null) as mob in targets
diff --git a/code/game/gamemodes/mutiny/mutiny_fluff.dm b/code/game/gamemodes/mutiny/mutiny_fluff.dm
new file mode 100644
index 00000000..f8634e8e
--- /dev/null
+++ b/code/game/gamemodes/mutiny/mutiny_fluff.dm
@@ -0,0 +1,198 @@
+/datum/mutiny_fluff
+ var/datum/game_mode/mutiny/mode
+
+ New(datum/game_mode/mutiny/M)
+ mode = M
+
+ 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 {"
+ NOT A DRILL . . . EMERGENCY DIRECTIVE . . . NOT A DRILL
+
+ TO: Captain [mode.head_loyalist], Commanding Officer, [station_name()]
+ FROM: NanoTrasen Emergency Messaging Relay
+ DATE: [time2text(world.realtime, "MM/DD")]/[game_year]
+ SUBJECT: Directive X
+
+
+ [mode.current_directive.get_description()]
+
+
+ Emergency Authentication Protocol
+
+ A member of your Command Staff is this shift's designated Emergency Secondary Authenticator.
+ This Emergency Secondary Authenticator is uniquely aware of their role and possesses the Emergency Secondary Authentication Key.
+ As Captain, you possess the Captain's Authentication Key.
+ The Emergency Authentication Device is located in the vault of your station, and requires simultaneous activation of the Authentication Keys.
+ An Authentication Key Pinpointer can be delivered via Cargo Bay to assist recovery of the Authentication Keys should they be lost aboard the station.
+ A key's destruction or removal from the station's perimeter will automatically and irreversibly activate the Emergency Authentication Device.
+
+
+
+ Orders
+
+ Captain [mode.head_loyalist], you are to immediately initiate the following procedure; codenamed Directive X:
+
+
+ [get_orders()]
+
+
+
+ Authentication
+
+ Encoded Authentication String: T0JCJUwoIVFDQA==
+ Emergency Action Code: O B B _ L _ _ Q C _
+ ERROR: DECODING INCOMPLETE (40% LOSS)
+
+
+
+
+ NOT A DRILL . . . EMERGENCY DIRECTIVE . . . NOT A DRILL
+ "}
+
+ proc/get_orders()
+ var/text = "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."
+ for(var/order in mode.current_directive.special_orders)
+ text += "[order]"
+
+ text += "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."
+ return text
+
+ proc/get_pda_body()
+ return {"← From Anonymous Channel: \"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)
"}
+
+ proc/announce()
+ world << "The current game mode is - Mutiny!"
+ world << {"
+The crew will be divided by their sense of ethics when a morally turbulent emergency directive arrives with an incomplete command validation code.
+The [loyalist_tag("Head Loyalist")] is the Captain, who carries the [loyalist_tag("Captain's Authentication Key")] at all times.
+The [mutineer_tag("Head Mutineer")] is a random Head of Staff who carries the [mutineer_tag("Emergency Secondary Authentication Key")].
+Both keys are required to activate the Emergency Authentication Device (EAD) in the vault, signalling to NanoTrasen that the directive is complete.
+
+
+Loyalists - Follow the Head Loyalist in carrying out [loyalist_tag("NanoTrasen's directives")] then activate the EAD.
+Mutineers - Prevent the completion of the [mutineer_tag("improperly validated directives")] and the activation of the EAD.
+
+ "}
+
+ proc/loyalist_tag(text)
+ return "[text]"
+
+ proc/mutineer_tag(text)
+ return "[text]"
+
+ proc/their(datum/mind/head)
+ if (head.current.gender == MALE)
+ return "his"
+ else if (head.current.gender == FEMALE)
+ return "her"
+
+ return "their"
+
+ 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 [station_name()], a research station in [system_name()].
+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.
+[mode.mutineers.len] members of the station's personnel were charged with terrorist action against the Company and, if found guilty by a Sol magistrate, will be sentenced to life incarceration.
+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.
+NanoTrasen's image will forever be haunted by the fact that a mutiny took place on one of its own stations.
+ "}
+
+ 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 [station_name()], a research station in [system_name()].
+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.
+[mode.mutineers.len] members of the station's personnel were charged with terrorist action against the Company and, if found guilty by a Sol magistrate, will be sentenced to life incarceration.
+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.
+NanoTrasen's image will forever be haunted by the fact that a mutiny took place on one of its own stations.
+ "}
+
+ proc/no_victory()
+ return {"
+NanoTrasen has been thrust into turmoil following an apparent mutiny by key personnel aboard the [station_name()], a research station in [system_name()].
+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.
+NanoTrasen officials refuse to comment.
+Sources indicate that [mode.mutineers.len] members of the station's personnel are currently under investigation for terrorist activity, 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.
+NanoTrasen's image will forever be haunted by the fact that a mutiny took place on one of its own stations.
+ "}
+
+ proc/mutineer_minor_victory()
+ return {"
+Reports have emerged that an impromptu mutiny has taken place, amid a local interstellar crisis, aboard the [station_name()], a research station in [system_name()].
+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.
+[mode.mutineers.len] members of the station's personnel were released from interrogations today, following a mutiny investigation.
+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.
+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.
+ "}
+
+ 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 company station in [system_name()]--[station_name()]--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.
+Thanks to the efforts of the resistant members of the crew, the directive was not carried out.
+[mode.mutineers.len] members of the station's personnel were congratulated and awarded with the [mutineer_tag("Star of Bravery")], for their efforts in preventing the illegal directive's completion.
+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.
+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.
+ "}
+
+ proc/secret_transcript()
+ return {"
+Corporate Rival Threat Assessment
+Gilthari Exports Incident Transcript
+CONFIDENTIAL: PROPERTY OF NANOTRASEN
+Location: Operator's Desk, D Deck, Polumetis Installation
+Time: 16:11, May 24, 2558 (Sol Reckoning)
+
+
+
+\[Start of transcript\]
+\[Sound of an internal airlock door opening\]
+TM: Thank you for coming to see me, Director. I'm afraid this is urgent.
+D: Mr. Mitchell, first you send cryptic messages to my office and then you request to have me come personally to this barely lit closet you call a workstation; all of this to talk about a computer glitch?
+\[Sound of the internal airlock door shutting\]
+TM: Do you remember Mallory?
+D: Who?
+TM: It's not who, it's what. The computer program we planted in the [system_name()] communications satellite.
+D: What is so important about this computer program?
+TM: We call her an eavesdropper. Captures network traffic, records it, and forwards the stream to the receiver autonomously.
+D: Speak English goddamnit.
+TM: Standard intelligence acquisition package, sir; we bug their satellite and listen. It's like we have their playbook and we know what their moves are going to be on the market before they make them.
+D: So Mallory doesn't work?
+TM: She worked, sir. We've had an ear on NanoTrasen's regional communications for weeks.
+D: Any news about their Phoron refinement process?
+TM: No sir. Our analysts believe they are using a separate channel for their most sensitive data.
+D: So what's the problem?
+TM: The intelligence hasn't been doing us any good. Anything that appears actionable, I send it to the analysts and they make a plan. Thing is, NanoTrasen always sees us coming.
+D: Tim...
+TM: I think they discovered the hack, sir. Case in point, Energine Consolidated Solutions. That subsidiary of ours that was awarded a lease on NanoTrasen's mining platform in Nyx? NanoTrasen acquired them a week before we made the announcement.
+D: They know about they have a bug. They left her on and fed her the information for us to hear, those sneaks. How did they find it?
+TM: Top secret communique came through. I'm not sure what happened. Either Mallory couldn't replicate the encryption scheme and garbled it going out or the transmission was already corrupted to begin with.
+D: Either way the transmission caused NanoTrasen to look at the satellite. They found out about Mallory.
+TM: Precisely sir. There's only so much I can do to cover our tracks from here.
+D: I'm pulling the plug. We have assets in the sector that are capable of a job like this. Thank you for bringing this to my attention.
+\[Computer device chirps\]
+D: One last thing, did you happen to read anything from those secure transmissions?
+TM: Just the subject, 'Directive X'.
+D: Directive X... Now what do you suppose that means?
+\[End of transcript\]
+ "}
diff --git a/code/game/gamemodes/mutiny/mutiny_hooks.dm b/code/game/gamemodes/mutiny/mutiny_hooks.dm
new file mode 100644
index 00000000..9e64bd2e
--- /dev/null
+++ b/code/game/gamemodes/mutiny/mutiny_hooks.dm
@@ -0,0 +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
+
+ 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
+
+ mode.update_icon(H.mind)
+ return 1
+
+/hook/harvest_podman/proc/update_icon(mob/living/carbon/alien/diona/D)
+ var/datum/game_mode/mutiny/mode = get_mutiny_mode()
+ if (!mode) 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
+
+ mode.round_outcome()
+ return 1
diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm
index 5c056077..bd4d1ee8 100644
--- a/code/game/jobs/access.dm
+++ b/code/game/jobs/access.dm
@@ -3,7 +3,7 @@
/var/const/access_security = 1 // Security equipment
/var/const/access_brig = 2 // Brig timers and permabrig
/var/const/access_armory = 3
-/var/const/access_forensics_lockers= 4
+/var/const/access_forensics = 4 //Forensic tech access
/var/const/access_medical = 5
/var/const/access_morgue = 6
/var/const/access_tox = 7
@@ -65,6 +65,7 @@
/var/const/access_sec_doors = 63 // Security front doors
/var/const/access_psychiatrist = 64 // Psychiatrist's office
/var/const/access_xenoarch = 65
+/var/const/access_detective = 66 //Detective access
//BEGIN CENTCOM ACCESS
/*Should leave plenty of room if we need to add more access levels.
@@ -193,7 +194,7 @@
return get_all_centcom_access()
/proc/get_all_accesses()
- return list(access_security, access_sec_doors, access_brig, access_armory, access_forensics_lockers, access_court,
+ return list(access_security, access_sec_doors, access_brig, access_armory, access_forensics, access_court,
access_medical, access_genetics, access_morgue, access_rd,
access_tox, access_tox_storage, access_chemistry, access_engine, access_engine_equip, access_maint_tunnels,
access_external_airlocks, access_change_ids, access_ai_upload,
@@ -203,7 +204,7 @@
access_hydroponics, access_library, access_lawyer, access_virology, access_psychiatrist, access_cmo, access_qm, access_clown, access_mime, access_surgery,
access_theatre, access_research, access_mining, access_mailsorting,
access_heads_vault, access_mining_station, access_xenobiology, access_ce, access_hop, access_hos, access_RC_announce,
- access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch)
+ access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch, access_detective)
/proc/get_all_centcom_access()
return list(access_cent_general, access_cent_thunder, access_cent_specops, access_cent_medical, access_cent_living, access_cent_storage, access_cent_teleporter, access_cent_creed, access_cent_captain)
@@ -219,7 +220,7 @@
if(0)
return get_all_accesses()
if(1) //security
- return list(access_sec_doors, access_security, access_brig, access_armory, access_forensics_lockers, access_court, access_hos)
+ return list(access_sec_doors, access_security, access_brig, access_armory, access_forensics, access_court, access_hos)
if(2) //medbay
return list(access_medical, access_genetics, access_morgue, access_chemistry, access_psychiatrist, access_virology, access_surgery, access_cmo)
if(3) //research
@@ -265,7 +266,7 @@
return "Holding Cells"
if(access_court)
return "Courtroom"
- if(access_forensics_lockers)
+ if(access_forensics)
return "Forensics"
if(access_medical)
return "Medical"
@@ -385,6 +386,8 @@
return "Gateway"
if(access_sec_doors)
return "Brig"
+ if(access_detective)
+ return "Detective"
/proc/get_centcom_access_desc(A)
switch(A)
diff --git a/code/game/jobs/job/captain.dm b/code/game/jobs/job/captain.dm
index acc7c3e8..3facb542 100644
--- a/code/game/jobs/job/captain.dm
+++ b/code/game/jobs/job/captain.dm
@@ -58,18 +58,18 @@
idtype = /obj/item/weapon/card/id/silver
req_admin_notify = 1
minimal_player_age = 10
- access = list(access_security, access_sec_doors, access_brig, access_court, access_forensics_lockers,
+ access = list(access_security, access_sec_doors, access_brig, access_court, access_forensics,
access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads,
access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue,
access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
access_theatre, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
- access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway)
- minimal_access = list(access_security, access_sec_doors, access_brig, access_court, access_forensics_lockers,
+ access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway, access_detective)
+ minimal_access = list(access_security, access_sec_doors, access_brig, access_court, access_forensics,
access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads,
access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue,
access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
access_theatre, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
- access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway)
+ access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway, access_detective)
equip(var/mob/living/carbon/human/H)
diff --git a/code/game/jobs/job/security.dm b/code/game/jobs/job/security.dm
index 7202443b..79fc512e 100644
--- a/code/game/jobs/job/security.dm
+++ b/code/game/jobs/job/security.dm
@@ -10,13 +10,13 @@
idtype = /obj/item/weapon/card/id/silver
req_admin_notify = 1
access = list(access_security, access_sec_doors, access_brig, access_armory, access_court,
- access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
+ access_forensics, access_morgue, access_maint_tunnels, access_all_personal_lockers,
access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting,
- access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_external_airlocks)
+ access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_external_airlocks, access_detective)
minimal_access = list(access_security, access_sec_doors, access_brig, access_armory, access_court,
- access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
+ access_forensics, access_morgue, access_maint_tunnels, access_all_personal_lockers,
access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting,
- access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_external_airlocks)
+ access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_external_airlocks, access_detective)
minimal_player_age = 14
equip(var/mob/living/carbon/human/H)
@@ -96,8 +96,9 @@
supervisors = "the head of security"
selection_color = "#ffeeee"
- access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court)
- minimal_access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court)
+ access = list(access_security, access_sec_doors, access_morgue, access_maint_tunnels, access_court, access_detective)
+ minimal_access = list(access_security, access_sec_doors, access_morgue, access_maint_tunnels, access_court, access_detective)
+ alt_titles = list("Investigator")
minimal_player_age = 3
equip(var/mob/living/carbon/human/H)
if(!H) return 0
@@ -135,8 +136,8 @@
supervisors = "the head of security"
selection_color = "#ffeeee"
- access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court)
- minimal_access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court)
+ access = list(access_security, access_sec_doors, access_forensics, access_morgue, access_maint_tunnels, access_court)
+ minimal_access = list(access_security, access_sec_doors, access_forensics, access_morgue, access_maint_tunnels, access_court)
alt_titles = list("Crime Scene Investigator")
minimal_player_age = 3
equip(var/mob/living/carbon/human/H)
diff --git a/code/game/machinery/bots/ed209bot.dm b/code/game/machinery/bots/ed209bot.dm
index 6e084931..94815c9f 100644
--- a/code/game/machinery/bots/ed209bot.dm
+++ b/code/game/machinery/bots/ed209bot.dm
@@ -7,7 +7,7 @@
density = 1
anchored = 0
// weight = 1.0E7
- req_one_access = list(access_security, access_forensics_lockers)
+ req_one_access = list(access_security, access_forensics, access_detective)
health = 100
maxhealth = 100
fire_dam_coeff = 0.7
diff --git a/code/game/machinery/bots/secbot.dm b/code/game/machinery/bots/secbot.dm
index 587ca17e..6d4eab3f 100644
--- a/code/game/machinery/bots/secbot.dm
+++ b/code/game/machinery/bots/secbot.dm
@@ -11,7 +11,7 @@
fire_dam_coeff = 0.7
brute_dam_coeff = 0.5
// weight = 1.0E7
- req_one_access = list(access_security, access_forensics_lockers)
+ req_one_access = list(access_security, access_forensics, access_detective)
var/mob/target
var/oldtarget_name
var/threatlevel = 0
diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm
index 77212d64..e27b80d7 100644
--- a/code/game/machinery/computer/medical.dm
+++ b/code/game/machinery/computer/medical.dm
@@ -4,7 +4,7 @@
name = "Medical Records"
desc = "This can be used to check medical records."
icon_state = "medcomp"
- req_one_access = list(access_medical, access_forensics_lockers)
+ req_one_access = list(access_medical, access_forensics, access_detective)
circuit = "/obj/item/weapon/circuitboard/med_data"
var/obj/item/weapon/card/id/scan = null
var/authenticated = null
diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm
index fb22780c..702c3f53 100644
--- a/code/game/machinery/computer/security.dm
+++ b/code/game/machinery/computer/security.dm
@@ -4,7 +4,7 @@
name = "Security Records"
desc = "Used to view and edit personnel's security records"
icon_state = "security"
- req_one_access = list(access_security, access_forensics_lockers)
+ req_one_access = list(access_security, access_forensics, access_detective)
circuit = "/obj/item/weapon/circuitboard/secure_data"
var/obj/item/weapon/card/id/scan = null
var/authenticated = null
diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm
index af39be1e..89a56a56 100644
--- a/code/game/machinery/deployable.dm
+++ b/code/game/machinery/deployable.dm
@@ -9,7 +9,7 @@ for reference:
access_security = 1
access_brig = 2
access_armory = 3
- access_forensics_lockers= 4
+ access_forensics= 4
access_medical = 5
access_morgue = 6
access_tox = 7
diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm
index 05e12878..67bc6806 100644
--- a/code/game/machinery/requests_console.dm
+++ b/code/game/machinery/requests_console.dm
@@ -198,9 +198,10 @@ var/list/obj/machinery/requests_console/allConsoles = list()
if(!dbcon.IsConnected())
dat += text("ERROR: Unable to contact external database. Please contact your system administrator for assistance.")
+ log_game("SQL database connection failed. Attempted to fetch form information.")
else
dat += {"
- | NCF ID | Form Name | | |
"}
+ | NCF ID | Form Name | | | |
"}
//For reference:
//Command forms, 01xx series
@@ -218,7 +219,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
var/id = query.item[1]
var/name = query.item[2]
var/department = query.item[3]
- dat += "| NCF-[id] | [name] | [department] | Print |
"
+ dat += "| NCF-[id] | [name] | [department] | Print | ? |
"
dat += "
"
dat += text("
Reset Search")
dat += text("
Back
")
@@ -370,6 +371,8 @@ var/list/obj/machinery/requests_console/allConsoles = list()
if(!dbcon.IsConnected())
alert("Connection to the database lost. Aborting.")
+ if(!printid)
+ alert("Invalid query. Try again.")
var/DBQuery/query = dbcon.NewQuery("SELECT id, name, data FROM aurora_forms WHERE id=[printid]")
query.Execute()
@@ -388,24 +391,34 @@ var/list/obj/machinery/requests_console/allConsoles = list()
C.info = C.parsepencode(C.info)
C.updateinfolinks()
C.name = "NFC-[id] - [name]"
+ paperstock--
-/* WIP, finish in a further update.
-
- if(href_list["info"])
- var/whatisname = sanitizeSQL(href_list["info"])
+ if(href_list["whatis"])
+ var/whatisid = sanitizeSQL(href_list["whatis"])
establish_db_connection()
if(!dbcon.IsConnected())
alert("Connection to the database lost. Aborting.")
- var/DBQuery/query = dbcon.NewQuery("SELECT id, name, department, info FROM aurora_forms WHERE name=[whatisname]")
+ if(!whatisid)
+ alert("Invalid query. Try again.")
+ var/DBQuery/query = dbcon.NewQuery("SELECT id, name, department, info FROM aurora_forms WHERE id=[whatisid]")
query.Execute()
+ var/dat = "NanoTrasen Corporate Form
"
+
while(query.NextRow())
var/id = query.item[1]
var/name = query.item[2]
var/department = query.item[3]
- var/info = query.item[1]
-*/
+ var/info = query.item[4]
+
+ dat += "NCF-[id]
"
+ dat += "[name]
"
+ dat += "[department] Department
"
+ dat += "[info]"
+ dat += ""
+ usr << browse(dat, "window=Information;size=560x240")
+
switch( href_list["setLid"] )
if(null) //skip
if("1") lid = 1
diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm
index 9761ed7c..72493e6f 100644
--- a/code/game/machinery/suit_storage_unit.dm
+++ b/code/game/machinery/suit_storage_unit.dm
@@ -1121,13 +1121,13 @@
if("^%###^%$" || "Mercenary")
if(helmet)
helmet.name = "blood-red hardsuit helmet"
- helmet.icon_state = "rig0-syndie"
+ helmet.icon_state = "rig0-syndi"
helmet.item_state = "syndie_helm"
helmet.item_color = "syndie"
if(suit)
suit.name = "blood-red hardsuit"
suit.item_state = "syndie_hardsuit"
- suit.icon_state = "rig-syndie"
+ suit.icon_state = "rig-syndi"
if(helmet) helmet.name = "refitted [helmet.name]"
if(suit) suit.name = "refitted [suit.name]"
\ No newline at end of file
diff --git a/code/game/machinery/telecomms/traffic_control.dm b/code/game/machinery/telecomms/traffic_control.dm
index 226c4722..5c5a038b 100644
--- a/code/game/machinery/telecomms/traffic_control.dm
+++ b/code/game/machinery/telecomms/traffic_control.dm
@@ -15,7 +15,7 @@
var/list/viewingcode = list()
var/obj/machinery/telecomms/server/SelectedServer
- var/network = "NULL" // the network to probe
+ var/network = "tcommsat" // the network to probe
var/temp = "" // temporary feedback messages
var/storedcode = "" // code stored
diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm
index b04ca203..a420245f 100644
--- a/code/game/objects/items/devices/PDA/PDA.dm
+++ b/code/game/objects/items/devices/PDA/PDA.dm
@@ -102,7 +102,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/heads
default_cartridge = /obj/item/weapon/cartridge/head
- icon_state = "pda-h"
+ icon_state = "pda-hop"
/obj/item/device/pda/heads/hop
default_cartridge = /obj/item/weapon/cartridge/hop
diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm
index 1ab358e5..db7472de 100644
--- a/code/game/objects/items/devices/radio/headset.dm
+++ b/code/game/objects/items/devices/radio/headset.dm
@@ -19,6 +19,18 @@
keyslot1 = new /obj/item/device/encryptionkey/
recalculateChannels()
+/obj/item/device/radio/headset/handle_message_mode(mob/living/M as mob, message, channel)
+ if (channel == "special")
+ if (translate_binary)
+ var/datum/language/binary = all_languages["Robot Talk"]
+ binary.broadcast(M, message)
+ if (translate_hive)
+ var/datum/language/hivemind = all_languages["Hivemind"]
+ hivemind.broadcast(M, message)
+ return null
+
+ return ..()
+
/obj/item/device/radio/headset/receive_range(freq, level, aiOverride = 0)
if (aiOverride)
return ..(freq, level)
diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm
index cf63ddbc..f9fa55ba 100644
--- a/code/game/objects/items/devices/radio/radio.dm
+++ b/code/game/objects/items/devices/radio/radio.dm
@@ -54,6 +54,22 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
if(radio_controller)
initialize()
+// Interprets the message mode when talking into a radio, possibly returning a connection datum
+/obj/item/device/radio/proc/handle_message_mode(mob/living/M as mob, message, message_mode)
+ // If a channel isn't specified, send to common.
+ if(!message_mode || message_mode == "headset")
+ return radio_connection
+
+ // Otherwise, if a channel is specified, look for it.
+ if(channels)
+ if (message_mode == "department") // Department radio shortcut
+ message_mode = channels[1]
+
+ if (channels[message_mode]) // only broadcast if the channel is set on
+ return secure_radio_connections[message_mode]
+
+ // If we were to send to a channel we don't have, drop it.
+ return null
/obj/item/device/radio/initialize()
@@ -229,6 +245,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
if(!(src.wires & WIRE_TRANSMIT)) // The device has to have all its wires and shit intact
return
+ M.last_target_click = world.time
if(GLOBAL_RADIO_TYPE == 1) // NEW RADIO SYSTEMS: By Doohl
@@ -244,26 +261,12 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
*/
//#### Grab the connection datum ####//
- var/datum/radio_frequency/connection = null
- if(channel == "headset")
- channel = null
- if(channel) // If a channel is specified, look for it.
- if(channels && channels.len > 0)
- if (channel == "department")
- //world << "DEBUG: channel=\"[channel]\" switching to \"[channels[1]]\""
- channel = channels[1]
- connection = secure_radio_connections[channel]
- if (!channels[channel]) // if the channel is turned off, don't broadcast
- return
- else
- // If we were to send to a channel we don't have, drop it.
- else // If a channel isn't specified, send to common.
- connection = radio_connection
- channel = null
+
+ var/datum/radio_frequency/connection = handle_message_mode(M, message, channel)
if (!istype(connection))
- return
+ return 0
if (!connection)
- return
+ return 0
var/turf/position = get_turf(src)
@@ -279,7 +282,6 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
var/jobname // the mob's "job"
-
// --- Human: use their actual job ---
if (ishuman(M))
jobname = M:get_assignment()
@@ -368,7 +370,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
return
- /* ###### Intercoms and station-bounced radios ###### */
+ /* ###### Intercoms and station-bounced radios ###### */
var/filter_type = 2
diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm
index 5a7fe171..e8909cb5 100644
--- a/code/game/objects/items/weapons/weaponry.dm
+++ b/code/game/objects/items/weapons/weaponry.dm
@@ -118,7 +118,7 @@
throwforce = 10
sharp = 1
edge = 1
- w_class = 3
+ w_class = 4
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
IsShield()
@@ -143,7 +143,7 @@
throwforce = 10
sharp = 1
edge = 1
- w_class = 3
+ w_class = 4
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
suicide_act(mob/user)
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm
index 7d7d21f8..be8ffaa3 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm
@@ -234,7 +234,7 @@
/obj/structure/closet/secure_closet/forensics
name = "Forensic tech's closet"
- req_access = list(access_forensics_lockers)
+ req_access = list(access_forensics)
icon_state = "sec1"
icon_closed = "sec"
icon_locked = "sec1"
@@ -260,7 +260,7 @@
/obj/structure/closet/secure_closet/detective
name = "Detective's Cabinet"
- req_access = list(access_forensics_lockers)
+ req_access = list(access_detective)
icon_state = "cabinetdetective_locked"
icon_closed = "cabinetdetective"
icon_locked = "cabinetdetective_locked"
diff --git a/code/modules/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm
index c2c40831..8c44a438 100644
--- a/code/modules/admin/IsBanned.dm
+++ b/code/modules/admin/IsBanned.dm
@@ -20,17 +20,39 @@ world/IsBanned(key,address,computer_id)
return list("reason"="Using ToR", "desc"="\nReason: The network you are using to connect has been banned.\nIf you believe this is a mistake, please request help at [config.banappeals]")
if(config && config.ip_blacklist_enabled)
- msg_scopes("Doing blacklist stuff")
- if(!blacklist)
- loadBlacklist()
- if(blacklist)
- if(address in blacklist)
- log_access("Failed Login: [src] - Blacklisted IP")
- message_admins("\blue Failed Login: [src] - Blacklisted IP")
- AddBan(ckey(key), computer_id, "Bad IP", "Automated Ban", 0, 0)
- return list("reason"="IP Blacklisted", "desc"="\nReason: This IP has been blacklisted from the server.\nIf you believe this is a mistake, please request help at [config.banappeals]")
+ var/banhe = 0
+ msg_scopes("Checking [key]'s IP for blacklist.")
+ if(!establish_db_connection())
+ //No database. Make do!
+ error("Database connection failed while checking blacklist. Reverted to old system.")
+
+ msg_scopes("Executing old blacklisting.")
+ if(!blacklist)
+ loadBlacklist()
+ if(blacklist)
+ if(address in blacklist)
+ banhe = 1
+ else
+ msg_scopes("Where is the blacklist!")
else
- msg_scopes("Where is the blacklist!")
+ //Have data, will base.
+ var/DBQuery/query = dbcon.NewQuery("SELECT ip FROM aurora_ipblacklist WHERE ip = '[address]'")
+ query.Execute()
+
+ while(query.NextRow())
+ var/bip = query.item[1]
+
+ if(bip == address)
+ banhe = 1
+
+ if(banhe == 1)
+ log_access("Failed Login: [key] - Blacklisted IP")
+ message_admins("\blue Failed Login: [key] - Blacklisted IP")
+ message_mods("\blue Failed Login: [key] - Blacklisted IP")
+ AddBan(ckey(key), computer_id, "Bad IP", "Automated Ban", 0, 0)
+ return list("reason"="IP Blacklisted", "desc"="\nReason: This IP has been blacklisted from the server.\nIf you believe this is a mistake, please request help at [config.banappeals]")
+
+ msg_scopes("[key]'s blacklist check completed.")
if(config.ban_legacy_system)
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index f164aae5..45378a5a 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -159,8 +159,6 @@ var/list/admin_verbs_dev = list(
/client/proc/restart_controller,
/client/proc/enable_debug_verbs,
/client/proc/toggledebuglogs,
- /client/proc/SDQL_query,
- /client/proc/SDQL2_query,
/client/proc/cmd_dev_say,
/client/proc/cmd_dev_bst,
/client/proc/cmd_dev_reset_gravity,
@@ -184,6 +182,8 @@ var/list/admin_verbs_server = list(
/datum/admins/proc/toggleAI,
/client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/
/client/proc/cmd_debug_del_all,
+ /client/proc/SDQL_query,
+ /client/proc/SDQL2_query,
/datum/admins/proc/adrev,
/datum/admins/proc/adspawn,
/datum/admins/proc/adjump,
@@ -216,8 +216,6 @@ var/list/admin_verbs_debug = list(
/client/proc/enable_debug_verbs,
/client/proc/callproc,
/client/proc/toggledebuglogs,
- /client/proc/SDQL_query,
- /client/proc/SDQL2_query,
/client/proc/cmd_dev_reset_gravity,
/client/proc/cmd_dev_reset_floating,
/client/proc/fillspace,
diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm
index f3e9096a..f06e70c9 100644
--- a/code/modules/admin/player_panel.dm
+++ b/code/modules/admin/player_panel.dm
@@ -553,7 +553,44 @@
dat += "| Traitor not found! |
"
dat += ""
+ var/datum/game_mode/mutiny/mutiny = get_mutiny_mode()
+ if(mutiny)
+ dat += mutiny.check_antagonists_ui(src)
+
dat += "