diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 78dc1303508..1d9183ceea0 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -250,10 +250,10 @@ * Arguments: * * question - question to show players as part of poll * * jobban_type - Type of jobban to use to filter out potential candidates. - * * be_special_flag - Unknown/needs further documentation. + * * be_special_flag - The required role that the player has to have enabled to see the prompt. * * poll_time - Length of time in deciseconds that the poll input box exists before closing. * * target_mob - The mob that is being polled for. - * * ignore_category - Unknown/needs further documentation. + * * ignore_category - The notification preference that hides the prompt. */ /proc/poll_candidates_for_mob(question, jobban_type, be_special_flag = 0, poll_time = 30 SECONDS, mob/target_mob, ignore_category = null) var/static/list/mob/currently_polling_mobs = list() @@ -277,10 +277,10 @@ * Arguments: * * question - question to show players as part of poll * * jobban_type - Type of jobban to use to filter out potential candidates. - * * be_special_flag - Unknown/needs further documentation. + * * be_special_flag - The required role that the player has to have enabled to see the prompt. * * poll_time - Length of time in deciseconds that the poll input box exists before closing. * * mobs - The list of mobs being polled for. This list is mutated and invalid mobs are removed from it before the proc returns. - * * ignore_category - Unknown/needs further documentation. + * * ignore_category - The notification preference that hides the prompt. */ /proc/poll_candidates_for_mobs(question, jobban_type, be_special_flag = 0, poll_time = 30 SECONDS, list/mobs, ignore_category = null) var/list/candidate_list = poll_ghost_candidates(question, jobban_type, be_special_flag, poll_time, ignore_category) diff --git a/code/_globalvars/lists/poll_ignore.dm b/code/_globalvars/lists/poll_ignore.dm index e8aba5d39a9..e107a5091b0 100644 --- a/code/_globalvars/lists/poll_ignore.dm +++ b/code/_globalvars/lists/poll_ignore.dm @@ -22,6 +22,11 @@ #define POLL_IGNORE_CORTICAL_BORER "cortical_borer" // SKYRAT EDIT - Cortical Borer #define POLL_IGNORE_PAI "pai" #define POLL_IGNORE_VENUSHUMANTRAP "venus_human_trap" +#define POLL_IGNORE_REGAL_RAT "regal_rat" +#define POLL_IGNORE_CARGORILLA "cargorilla" +#define POLL_IGNORE_MONKEY_HELMET "mind_magnified_monkey" +#define POLL_IGNORE_LAVALAND_ELITE "lavaland_elite" +#define POLL_IGNORE_SHUTTLE_DENIZENS "shuttle_denizens" //Skyrat Edit Start: Cortical Borer GLOBAL_LIST_INIT(poll_ignore_desc, list( @@ -47,6 +52,11 @@ GLOBAL_LIST_INIT(poll_ignore_desc, list( POLL_IGNORE_CORTICAL_BORER = "Cortical Borer", POLL_IGNORE_PAI = JOB_PERSONAL_AI, POLL_IGNORE_VENUSHUMANTRAP = "Venus Human Traps", + POLL_IGNORE_REGAL_RAT = "Regal rat", + POLL_IGNORE_CARGORILLA = "Cargorilla", + POLL_IGNORE_MONKEY_HELMET = "Mind magnified monkey", + POLL_IGNORE_LAVALAND_ELITE = "Lavaland elite", + POLL_IGNORE_SHUTTLE_DENIZENS = "Shuttle denizens", )) //Skyrat Edit Stop: Cortical Borer GLOBAL_LIST_INIT(poll_ignore, init_poll_ignore()) diff --git a/code/modules/admin/fun_balloon.dm b/code/modules/admin/fun_balloon.dm index 77d9fdd0fbe..cdef9b9194c 100644 --- a/code/modules/admin/fun_balloon.dm +++ b/code/modules/admin/fun_balloon.dm @@ -88,7 +88,7 @@ bodies += possessable var/question = "Would you like to be [group_name]?" - var/list/candidates = poll_candidates_for_mobs(question, ROLE_PAI, FALSE, 10 SECONDS, bodies) + var/list/candidates = poll_candidates_for_mobs(question, ROLE_SENTIENCE, ROLE_SENTIENCE, 10 SECONDS, bodies, POLL_IGNORE_SHUTTLE_DENIZENS) while(LAZYLEN(candidates) && LAZYLEN(bodies)) var/mob/dead/observer/C = pick_n_take(candidates) var/mob/living/body = pick_n_take(bodies) diff --git a/code/modules/antagonists/sentient_creature/sentient_creature.dm b/code/modules/antagonists/sentient_creature/sentient_creature.dm new file mode 100644 index 00000000000..5b2d98e0697 --- /dev/null +++ b/code/modules/antagonists/sentient_creature/sentient_creature.dm @@ -0,0 +1,37 @@ +/datum/antagonist/sentient_creature + name = "\improper Sentient Creature" + show_in_antagpanel = FALSE + show_in_roundend = FALSE + count_against_dynamic_roll_chance = FALSE + ui_name = "AntagInfoSentient" + +/datum/antagonist/sentient_creature/get_preview_icon() + var/icon/final_icon = icon('icons/mob/simple/pets.dmi', "corgi") + + var/icon/broodmother = icon('icons/mob/simple/lavaland/lavaland_elites.dmi', "broodmother") + broodmother.Blend(rgb(128, 128, 128, 128), ICON_MULTIPLY) + final_icon.Blend(broodmother, ICON_UNDERLAY, -world.icon_size / 4, 0) + + var/icon/rat = icon('icons/mob/simple/animal.dmi', "regalrat") + rat.Blend(rgb(128, 128, 128, 128), ICON_MULTIPLY) + final_icon.Blend(rat, ICON_UNDERLAY, world.icon_size / 4, 0) + + final_icon.Scale(ANTAGONIST_PREVIEW_ICON_SIZE, ANTAGONIST_PREVIEW_ICON_SIZE) + return final_icon + +/datum/antagonist/sentient_creature/on_gain() + if(owner.enslaved_to) + owner.current.copy_languages(owner.enslaved_to, LANGUAGE_MASTER) + owner.current.update_atom_languages() + . = ..() + +/datum/antagonist/sentient_creature/ui_static_data(mob/user) + var/list/data = list() + if(owner.enslaved_to) + data["enslaved_to"] = owner.enslaved_to.real_name + data["p_them"] = owner.enslaved_to.p_them() + data["p_their"] = owner.enslaved_to.p_their() + data["holographic"] = owner.current.flags_1 & HOLOGRAM_1 + return data + + diff --git a/code/modules/client/preferences/middleware/antags.dm b/code/modules/client/preferences/middleware/antags.dm index 153a9d7b4d4..ef5195aa7a1 100644 --- a/code/modules/client/preferences/middleware/antags.dm +++ b/code/modules/client/preferences/middleware/antags.dm @@ -119,6 +119,7 @@ ROLE_FUGITIVE = /datum/antagonist/fugitive, ROLE_LONE_OPERATIVE = /datum/antagonist/nukeop/lone, ROLE_DRIFTING_CONTRACTOR = /datum/antagonist/contractor, //SKYRAT EDIT + ROLE_SENTIENCE = /datum/antagonist/sentient_creature, ) var/list/antagonists = non_ruleset_antagonists.Copy() diff --git a/code/modules/clothing/head/mind_monkey_helmet.dm b/code/modules/clothing/head/mind_monkey_helmet.dm index a9fc81ee973..33322777c0a 100644 --- a/code/modules/clothing/head/mind_monkey_helmet.dm +++ b/code/modules/clothing/head/mind_monkey_helmet.dm @@ -48,7 +48,7 @@ playsound(src, 'sound/machines/ping.ogg', 30, TRUE) RegisterSignal(magnification, COMSIG_SPECIES_LOSS, .proc/make_fall_off) polling = TRUE - var/list/candidates = poll_candidates_for_mob("Do you want to play as a mind magnified monkey?", ROLE_SENTIENCE, ROLE_SENTIENCE, 5 SECONDS, magnification, POLL_IGNORE_SENTIENCE_POTION) + var/list/candidates = poll_candidates_for_mob("Do you want to play as a mind magnified monkey?", ROLE_MONKEY_HELMET, null, 5 SECONDS, magnification, POLL_IGNORE_MONKEY_HELMET) polling = FALSE if(!magnification) return diff --git a/code/modules/events/sentience.dm b/code/modules/events/sentience.dm index 9880b32ee15..3888c4cf631 100644 --- a/code/modules/events/sentience.dm +++ b/code/modules/events/sentience.dm @@ -44,7 +44,7 @@ GLOBAL_LIST_INIT(high_priority_sentience, typecacheof(list( /datum/round_event/ghost_role/sentience/spawn_role() var/list/mob/dead/observer/candidates - candidates = get_candidates(ROLE_ALIEN, ROLE_ALIEN) + candidates = get_candidates(ROLE_SENTIENCE, ROLE_SENTIENCE) // find our chosen mob to breathe life into // Mobs have to be simple animals, mindless, on station, and NOT holograms. diff --git a/code/modules/mob/living/simple_animal/hostile/gorilla/gorilla.dm b/code/modules/mob/living/simple_animal/hostile/gorilla/gorilla.dm index 4f81e2ece3e..820cd294df3 100644 --- a/code/modules/mob/living/simple_animal/hostile/gorilla/gorilla.dm +++ b/code/modules/mob/living/simple_animal/hostile/gorilla/gorilla.dm @@ -154,9 +154,11 @@ being_polled_for = TRUE var/list/mob/dead/candidates = poll_candidates_for_mob( "Do you want to play as a Cargorilla?", - jobban_type = ROLE_SENTIENCE, - poll_time = 30 SECONDS, - target_mob = src, + ROLE_SENTIENCE, + ROLE_SENTIENCE, + 30 SECONDS, + src, + POLL_IGNORE_CARGORILLA ) being_polled_for = FALSE diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm index 8b17bfce984..d33529be570 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm @@ -179,7 +179,7 @@ While using this makes the system rely on OnFire, it still gives options for tim addtimer(CALLBACK(src, .proc/spawn_elite), 30) return visible_message(span_boldwarning("Something within [src] stirs...")) - var/list/candidates = poll_candidates_for_mob("Do you want to play as a lavaland elite?", ROLE_SENTIENCE, ROLE_SENTIENCE, 5 SECONDS, src, POLL_IGNORE_SENTIENCE_POTION) + var/list/candidates = poll_candidates_for_mob("Do you want to play as a lavaland elite?", ROLE_SENTIENCE, ROLE_SENTIENCE, 5 SECONDS, src, POLL_IGNORE_LAVALAND_ELITE) if(candidates.len) audible_message(span_boldwarning("The stirring sounds increase in volume!")) elitemind = pick(candidates) diff --git a/code/modules/mob/living/simple_animal/hostile/regalrat.dm b/code/modules/mob/living/simple_animal/hostile/regalrat.dm index 334ca837fd6..ee763a1bdfb 100644 --- a/code/modules/mob/living/simple_animal/hostile/regalrat.dm +++ b/code/modules/mob/living/simple_animal/hostile/regalrat.dm @@ -51,7 +51,7 @@ return ..() /mob/living/simple_animal/hostile/regalrat/proc/get_player() - var/list/mob/dead/observer/candidates = poll_ghost_candidates("Do you want to play as the Royal Rat, cheesey be their crown?", ROLE_SENTIENCE, FALSE, 100, POLL_IGNORE_SENTIENCE_POTION) + var/list/mob/dead/observer/candidates = poll_ghost_candidates("Do you want to play as the Regal Rat, cheesey be their crown?", ROLE_SENTIENCE, ROLE_SENTIENCE, 100, POLL_IGNORE_REGAL_RAT) if(LAZYLEN(candidates) && !mind) var/mob/dead/observer/C = pick(candidates) key = C.key diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index a939b02cb10..acfd91cac7b 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -719,10 +719,7 @@ if(isanimal(dumb_mob)) var/mob/living/simple_animal/smart_animal = dumb_mob smart_animal.sentience_act() - to_chat(dumb_mob, span_warning("All at once it makes sense: you know what you are and who you are! Self awareness is yours!")) - to_chat(dumb_mob, span_userdanger("You are grateful to be self aware and owe [user.real_name] a great debt. Serve [user.real_name], and assist [user.p_them()] in completing [user.p_their()] goals at any cost.")) - if(dumb_mob.flags_1 & HOLOGRAM_1) //Check to see if it's a holodeck creature - to_chat(dumb_mob, span_userdanger("You also become depressingly aware that you are not a real creature, but instead a holoform. Your existence is limited to the parameters of the holodeck.")) + dumb_mob.mind.add_antag_datum(/datum/antagonist/sentient_creature) to_chat(user, span_notice("[dumb_mob] accepts [src] and suddenly becomes attentive and aware. It worked!")) dumb_mob.copy_languages(user, LANGUAGE_MASTER) after_success(user, dumb_mob) diff --git a/code/modules/unit_tests/screenshots/screenshot_antag_icons_sentiencepotionspawn.png b/code/modules/unit_tests/screenshots/screenshot_antag_icons_sentiencepotionspawn.png new file mode 100644 index 00000000000..1d01c240008 Binary files /dev/null and b/code/modules/unit_tests/screenshots/screenshot_antag_icons_sentiencepotionspawn.png differ diff --git a/code/modules/unit_tests/species_change_clothing.dm b/code/modules/unit_tests/species_change_clothing.dm index d6c6c48d34d..d4e4aa881ca 100644 --- a/code/modules/unit_tests/species_change_clothing.dm +++ b/code/modules/unit_tests/species_change_clothing.dm @@ -9,12 +9,14 @@ morphing_human.equipOutfit(/datum/outfit/job/assistant/consistent) morphing_human.dna.features["legs"] = DIGITIGRADE_LEGS //you WILL have digitigrade legs + /* SKYRAT EDIT REMOVAL START - This part of the test is useless as it's behavior that we actually WANT from those shoes, here. var/obj/item/human_shoes = morphing_human.get_item_by_slot(ITEM_SLOT_FEET) human_shoes.supports_variations_flags = NONE //do not fit lizards at all costs. morphing_human.set_species(/datum/species/lizard) var/obj/item/lizard_shoes = morphing_human.get_item_by_slot(ITEM_SLOT_FEET) - // TEST_ASSERT_NOTEQUAL(human_shoes, lizard_shoes, "Lizard still has shoes after changing species.") // SKYRAT EDIT REMOVAL - This part of the test is useless as it's behavior that we actually WANT from those shoes, here. + // TEST_ASSERT_NOTEQUAL(human_shoes, lizard_shoes, "Lizard still has shoes after changing species.") + */ // SKYRAT EDIT REMOVAL END // Testing whether item-species restrictions properly blocks changing into a blacklisted species. morphing_human.set_species(/datum/species/monkey) diff --git a/modular_skyrat/master_files/code/modules/clothing/head/monkey_magnification_helmet.dm b/modular_skyrat/master_files/code/modules/clothing/head/monkey_magnification_helmet.dm index c0045a514eb..c0437c1abe0 100644 --- a/modular_skyrat/master_files/code/modules/clothing/head/monkey_magnification_helmet.dm +++ b/modular_skyrat/master_files/code/modules/clothing/head/monkey_magnification_helmet.dm @@ -5,13 +5,13 @@ inhand_icon_state = "monkeymind" strip_delay = 100 armor = list(MELEE = 5, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 25, BIO = 0, FIRE = 50, ACID = 50, WOUND = 0) - var/mob/living/carbon/human/magnification = null /// if the helmet is on a valid target (just works like a normal helmet if not (cargo please stop)) - var/polling = FALSE/// if the helmet is currently polling for targets (special code for removal) - var/light_colors = 1 /// which icon state color this is (red, blue, yellow) + var/mob/living/carbon/human/magnification = null ///if the helmet is on a valid target (just works like a normal helmet if not (cargo please stop)) + var/polling = FALSE///if the helmet is currently polling for targets (special code for removal) + var/light_colors = 1 ///which icon state color this is (red, blue, yellow) /obj/item/clothing/head/helmet/monkey_sentience/Initialize(mapload) . = ..() - light_colors = rand(1, 3) + light_colors = rand(1,3) update_appearance() /obj/item/clothing/head/helmet/monkey_sentience/examine(mob/user) @@ -50,7 +50,7 @@ /obj/item/clothing/head/helmet/monkey_sentience/proc/connect(mob/user) polling = TRUE - var/list/candidates = poll_candidates_for_mob("Do you want to play as a mind magnified monkey?", ROLE_SENTIENCE, target_mob = magnification, ignore_category = POLL_IGNORE_SENTIENCE_POTION) + var/list/candidates = poll_candidates_for_mob("Do you want to play as a mind magnified monkey?", ROLE_MONKEY_HELMET, null, 5 SECONDS, magnification, POLL_IGNORE_MONKEY_HELMET) polling = FALSE if(!magnification) return diff --git a/tgstation.dme b/tgstation.dme index 05ce6c26564..b6c953edf59 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -2421,6 +2421,7 @@ #include "code\modules\antagonists\revolution\enemy_of_the_state.dm" #include "code\modules\antagonists\revolution\revolution.dm" #include "code\modules\antagonists\santa\santa.dm" +#include "code\modules\antagonists\sentient_creature\sentient_creature.dm" #include "code\modules\antagonists\separatist\nation_creation.dm" #include "code\modules\antagonists\separatist\objectives.dm" #include "code\modules\antagonists\separatist\separatist.dm" diff --git a/tgui/packages/tgui/interfaces/AntagInfoSentient.js b/tgui/packages/tgui/interfaces/AntagInfoSentient.js new file mode 100644 index 00000000000..a389fe2df7e --- /dev/null +++ b/tgui/packages/tgui/interfaces/AntagInfoSentient.js @@ -0,0 +1,39 @@ +import { useBackend } from '../backend'; +import { BlockQuote, Section, Stack } from '../components'; +import { Window } from '../layouts'; + +export const AntagInfoSentient = (props, context) => { + const { act, data } = useBackend(context); + const { enslaved_to, holographic, p_them, p_their } = data; + return ( + + +
+ + + You are a sentient creature! + + +
+ All at once it makes sense: you know what you are and who you + are! Self awareness is yours! + {!!enslaved_to && + ' You are grateful to be self aware and owe ' + + enslaved_to + + ' a great debt. Serve ' + + enslaved_to + + ', and assist ' + + p_them + + ' in completing ' + + p_their + + ' goals at any cost.'} + {!!holographic && + ' You also become depressingly aware that you are not a real creature, but instead a holoform. Your existence is limited to the parameters of the holodeck.'} +
+
+
+
+
+
+ ); +}; diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/antagonists/antagonists/sentiencepotionspawn.ts b/tgui/packages/tgui/interfaces/PreferencesMenu/antagonists/antagonists/sentiencepotionspawn.ts new file mode 100644 index 00000000000..247b88aed0d --- /dev/null +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/antagonists/antagonists/sentiencepotionspawn.ts @@ -0,0 +1,23 @@ +import { Antagonist, Category } from '../base'; +import { multiline } from 'common/string'; + +const SentientCreature: Antagonist = { + key: 'sentiencepotionspawn', + name: 'Sentient Creature', + description: [ + multiline` + Either by cosmic happenstance, or due to crew's shenanigans, you have been + given sentience! + `, + + multiline` + This is a blanket preference. The more benign ones include random human + level intelligence events, the cargorilla, and creatures uplifted via sentience + potions. The less friendly ones include the regal rat, and the boosted + mining elite mobs. + `, + ], + category: Category.Midround, +}; + +export default SentientCreature;