diff --git a/SQL/paradise_schema.sql b/SQL/paradise_schema.sql
index ea78bcc0d55..60c0dc25dc0 100644
--- a/SQL/paradise_schema.sql
+++ b/SQL/paradise_schema.sql
@@ -79,6 +79,7 @@ CREATE TABLE `characters` (
`hair_gradient_colour` varchar(7) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '#000000',
`hair_gradient_alpha` tinyint(3) UNSIGNED NOT NULL DEFAULT '255',
`custom_emotes` LONGTEXT COLLATE 'utf8mb4_unicode_ci' DEFAULT NULL,
+ `cyborg_brain_type` ENUM('MMI', 'Robobrain', 'Positronic') NOT NULL DEFAULT 'MMI',
PRIMARY KEY (`id`),
KEY `ckey` (`ckey`)
) ENGINE=InnoDB AUTO_INCREMENT=125467 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
diff --git a/SQL/updates/53-54.sql b/SQL/updates/53-54.sql
new file mode 100644
index 00000000000..303de0b32be
--- /dev/null
+++ b/SQL/updates/53-54.sql
@@ -0,0 +1,5 @@
+#Updating SQL from 53 to 54 -Wilk
+#Add a choice for what type of brain borgs want to have
+
+ALTER TABLE `characters`
+ ADD COLUMN `cyborg_brain_type` VARCHAR(11) NOT NULL DEFAULT 'MMI' AFTER `height`;
diff --git a/code/__DEFINES/misc_defines.dm b/code/__DEFINES/misc_defines.dm
index db931f29746..b3bb3de5491 100644
--- a/code/__DEFINES/misc_defines.dm
+++ b/code/__DEFINES/misc_defines.dm
@@ -392,7 +392,7 @@
#define INVESTIGATE_BOMB "bombs"
// The SQL version required by this version of the code
-#define SQL_VERSION 53
+#define SQL_VERSION 54
// Vending machine stuff
#define CAT_NORMAL (1<<0)
diff --git a/code/_globalvars/lists/flavor_misc.dm b/code/_globalvars/lists/flavor_misc.dm
index 19768711ea1..5d588c4793b 100644
--- a/code/_globalvars/lists/flavor_misc.dm
+++ b/code/_globalvars/lists/flavor_misc.dm
@@ -61,3 +61,10 @@ GLOBAL_LIST_INIT(phonetic_alphabet, list("Alpha", "Bravo", "Charlie",
#define DSATCHEL "Department Satchel"
#define DDUFFLEBAG "Department Dufflebag"
GLOBAL_LIST_INIT(backbaglist, list(DBACKPACK, DSATCHEL, DDUFFLEBAG, GBACKPACK, GSATCHEL, GDUFFLEBAG, LSATCHEL))
+
+//Chooseable brain types for borgs
+#define MMI_BORG "MMI"
+#define ROBOBRAIN_BORG "Robobrain"
+#define POSITRONIC_BORG "Positronic"
+GLOBAL_LIST_INIT(borg_brain_choices, list(MMI_BORG, ROBOBRAIN_BORG, POSITRONIC_BORG))
+GLOBAL_PROTECT(borg_brain_choices)
diff --git a/code/modules/client/login_processing/20-load_characters.dm b/code/modules/client/login_processing/20-load_characters.dm
index f22512e75e9..40be0ffc0cd 100644
--- a/code/modules/client/login_processing/20-load_characters.dm
+++ b/code/modules/client/login_processing/20-load_characters.dm
@@ -60,7 +60,8 @@
hair_gradient_alpha,
custom_emotes,
physique,
- height
+ height,
+ cyborg_brain_type
FROM characters WHERE ckey=:ckey"}, list(
"ckey" = C.ckey
))
diff --git a/code/modules/client/preference/character.dm b/code/modules/client/preference/character.dm
index 333acaf4d4b..ca75666d651 100644
--- a/code/modules/client/preference/character.dm
+++ b/code/modules/client/preference/character.dm
@@ -38,7 +38,8 @@
var/species = "Human"
var/language = "None" //Secondary language
var/autohiss_mode = AUTOHISS_OFF //Species autohiss level. OFF, BASIC, FULL.
-
+ /// If a spawned cyborg should have an MMI, a positronic, or a robobrain. MMI by default
+ var/cyborg_brain_type = MMI_BORG
/// The body accessory name of the mob (e.g. wings, tail).
var/body_accessory = null
@@ -191,7 +192,8 @@
hair_gradient_offset=:h_grad_offset,
hair_gradient_colour=:h_grad_colour,
hair_gradient_alpha=:h_grad_alpha,
- custom_emotes=:custom_emotes
+ custom_emotes=:custom_emotes,
+ cyborg_brain_type=:cyborg_brain_type
WHERE ckey=:ckey
AND slot=:slot"}, list(
// OH GOD SO MANY PARAMETERS
@@ -251,6 +253,7 @@
"h_grad_colour" = h_grad_colour,
"h_grad_alpha" = h_grad_alpha,
"custom_emotes" = json_encode(custom_emotes),
+ "cyborg_brain_type" = cyborg_brain_type,
"ckey" = C.ckey,
"slot" = slot_number
))
@@ -291,7 +294,7 @@
player_alt_titles,
disabilities, organ_data, rlimb_data, nanotrasen_relation, physique, height, speciesprefs,
socks, body_accessory, gear, autohiss,
- hair_gradient, hair_gradient_offset, hair_gradient_colour, hair_gradient_alpha, custom_emotes)
+ hair_gradient, hair_gradient_offset, hair_gradient_colour, hair_gradient_alpha, custom_emotes, cyborg_brain_type)
VALUES
(:ckey, :slot, :metadata, :name, :be_random_name, :gender,
:age, :species, :language,
@@ -318,7 +321,7 @@
:playertitlelist,
:disabilities, :organ_list, :rlimb_list, :nanotrasen_relation, :physique, :height, :speciesprefs,
:socks, :body_accessory, :gearlist, :autohiss_mode,
- :h_grad_style, :h_grad_offset, :h_grad_colour, :h_grad_alpha, :custom_emotes)
+ :h_grad_style, :h_grad_offset, :h_grad_colour, :h_grad_alpha, :custom_emotes, :cyborg_brain_type)
"}, list(
// This has too many params for anyone to look at this without going insae
"ckey" = C.ckey,
@@ -379,6 +382,7 @@
"h_grad_colour" = h_grad_colour,
"h_grad_alpha" = h_grad_alpha,
"custom_emotes" = json_encode(custom_emotes),
+ "cyborg_brain_type" = cyborg_brain_type
))
if(!query.warn_execute())
@@ -466,6 +470,7 @@
var/custom_emotes_tmp = query.item[55]
physique = query.item[56]
height = query.item[57]
+ cyborg_brain_type = query.item[58]
//Sanitize
var/datum/species/SP = GLOB.all_species[species]
@@ -551,7 +556,7 @@
loadout_gear = sanitize_json(loadout_gear)
custom_emotes_tmp = sanitize_json(custom_emotes_tmp)
custom_emotes = init_custom_emotes(custom_emotes_tmp)
-
+ cyborg_brain_type = sanitize_inlist(cyborg_brain_type, GLOB.borg_brain_choices, initial(cyborg_brain_type))
if(!player_alt_titles)
player_alt_titles = new()
if(!organ_data)
diff --git a/code/modules/client/preference/link_processing.dm b/code/modules/client/preference/link_processing.dm
index 41aa9f771ae..f33977c4a3d 100644
--- a/code/modules/client/preference/link_processing.dm
+++ b/code/modules/client/preference/link_processing.dm
@@ -862,7 +862,9 @@
active_character.organ_data[organ] = null
if("Cybernetic")
active_character.organ_data[organ] = "cybernetic"
-
+ if("cyborg_brain_type")
+ var/brain_type = tgui_input_list(user, "What type of brain would you like to have as a cyborg?", "Cyborg Brain Type", GLOB.borg_brain_choices)
+ active_character.cyborg_brain_type = brain_type
if("clientfps")
var/version_message
if(user.client && user.client.byond_version < 511)
diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm
index d47ab9fb326..902d8313215 100644
--- a/code/modules/client/preference/preferences.dm
+++ b/code/modules/client/preference/preferences.dm
@@ -373,6 +373,8 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
if(!ind) dat += "\[...\]
"
else dat += "
"
+ dat += "