mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
Sentience preference selection and antag datum (#69569)
This commit is contained in:
@@ -245,10 +245,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()
|
||||
@@ -272,10 +272,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)
|
||||
|
||||
@@ -21,6 +21,11 @@
|
||||
#define POLL_IGNORE_ACADEMY_WIZARD "academy_wizard"
|
||||
#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"
|
||||
|
||||
|
||||
GLOBAL_LIST_INIT(poll_ignore_desc, list(
|
||||
@@ -45,6 +50,11 @@ GLOBAL_LIST_INIT(poll_ignore_desc, list(
|
||||
POLL_IGNORE_ACADEMY_WIZARD = "Academy Wizard Defender",
|
||||
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",
|
||||
))
|
||||
GLOBAL_LIST_INIT(poll_ignore, init_poll_ignore())
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -118,6 +118,7 @@
|
||||
var/static/list/non_ruleset_antagonists = list(
|
||||
ROLE_FUGITIVE = /datum/antagonist/fugitive,
|
||||
ROLE_LONE_OPERATIVE = /datum/antagonist/nukeop/lone,
|
||||
ROLE_SENTIENCE = /datum/antagonist/sentient_creature,
|
||||
)
|
||||
|
||||
var/list/antagonists = non_ruleset_antagonists.Copy()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -50,7 +50,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
|
||||
|
||||
@@ -719,13 +719,8 @@
|
||||
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)
|
||||
dumb_mob.update_atom_languages()
|
||||
after_success(user, dumb_mob)
|
||||
qdel(src)
|
||||
else
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
@@ -2333,6 +2333,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"
|
||||
|
||||
@@ -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 (
|
||||
<Window width={400} height={400} theme="neutral">
|
||||
<Window.Content>
|
||||
<Section fill>
|
||||
<Stack vertical fill textAlign="center">
|
||||
<Stack.Item fontSize="20px">
|
||||
You are a sentient creature!
|
||||
</Stack.Item>
|
||||
<Stack.Item>
|
||||
<BlockQuote>
|
||||
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.'}
|
||||
</BlockQuote>
|
||||
</Stack.Item>
|
||||
</Stack>
|
||||
</Section>
|
||||
</Window.Content>
|
||||
</Window>
|
||||
);
|
||||
};
|
||||
+23
@@ -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;
|
||||
Reference in New Issue
Block a user