Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storyteller #762

Draft
wants to merge 175 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
175 commits
Select commit Hold shift + click to select a range
cd4c446
Update TGS DMAPI
tgstation-server-ci[bot] Oct 6, 2024
44f12e4
ЧЕРНАЯ ОРБИТА С КУЧЕЙ АНТАГОВ
msw7007 Nov 18, 2024
6e10df9
Merge branch 'master' into black_orbit
msw7007 Nov 18, 2024
44bc2e4
Фикс конфига.
msw7007 Nov 18, 2024
e44b127
Ввод черной орбиты
msw7007 Nov 18, 2024
3d5d0ed
Внедрение орбиты в пул голосования
msw7007 Nov 18, 2024
9eff4de
Merge pull request #3 from msw7007/tgs-dmapi-update
msw7007 Nov 18, 2024
d6e03ec
Отработки по ревью
msw7007 Nov 18, 2024
a5ea27c
Небольшое обновление логики
msw7007 Nov 18, 2024
f4b7b85
Упс
msw7007 Nov 18, 2024
f31e551
Игра с конфигом
msw7007 Nov 18, 2024
c2f9500
Merge branch 'master' into black_orbit
msw7007 Nov 19, 2024
0f78890
Восстановление чеков после инициализации, плюс ревью
msw7007 Nov 19, 2024
ac23d37
Отработка по ревью
msw7007 Nov 20, 2024
17af59a
Фикс дикоспавна
msw7007 Nov 20, 2024
16a07c7
Фиксы после раунда с муней
msw7007 Nov 21, 2024
c53726d
Снижение базовых показателей Энди, вырез голосвания, включение подсче…
msw7007 Nov 21, 2024
144cc89
Фикс задержки раундстарта
msw7007 Nov 21, 2024
732f82c
Изменение логики
msw7007 Nov 21, 2024
84faa63
Изменение панели верба триггер ивент (внос в расписание шедуллера), о…
msw7007 Nov 21, 2024
b36ca27
Merge branch 'master' into black_orbit
msw7007 Nov 22, 2024
989a270
Исправления, пожелания
msw7007 Nov 22, 2024
15773d3
Отключение ивентов
msw7007 Nov 23, 2024
4b7d6de
Фикс красоты логов
msw7007 Nov 23, 2024
89e6d55
Фиксы и пожелания
msw7007 Nov 23, 2024
3f21a09
Изменение текста
msw7007 Nov 23, 2024
2f55d48
Изменение требуемого количество игроков для групповых антагов
msw7007 Nov 23, 2024
80fc699
Более подробная информация, внедрение органичение на отделы (мед, рнд…
msw7007 Nov 24, 2024
79fcbac
Отключение антагов в случае отсутствия СБ
msw7007 Nov 24, 2024
ffc07c1
Merge branch 'master' into black_orbit
msw7007 Nov 24, 2024
80dbfd0
Ребаланс событий
msw7007 Nov 24, 2024
e77c40e
Фикс ограничения антагов
msw7007 Nov 24, 2024
6322089
И фикс иньекции
msw7007 Nov 24, 2024
549dceb
Фикс группы братьев
msw7007 Nov 24, 2024
94d1636
Фикс логики раундстарта
msw7007 Nov 24, 2024
6fa3eaf
Корректировка спавна антагов раундстартом
msw7007 Nov 24, 2024
d79035c
Merge branch 'master' into black_orbit
msw7007 Nov 25, 2024
7dd6f70
Перепись рерола
msw7007 Nov 25, 2024
9e5d814
Фикс целей одержимого и брата
msw7007 Nov 26, 2024
8e8ef52
Ребаланс нюки и культа (шансы раундстарта)
msw7007 Nov 26, 2024
cf8c759
Исправления условий для Блоба, измненеие логики сранья в логи
msw7007 Nov 27, 2024
1349bc6
Измнение логики раундстарта
msw7007 Nov 27, 2024
fb16456
Фикс культа, отображения и запуска событий
msw7007 Nov 27, 2024
cd92c13
Возврат ограничения для культа, отобрежине числа антагов
msw7007 Nov 28, 2024
5e1ccc9
Фикс двойного сообщения и неверной логики кнопок
msw7007 Nov 29, 2024
dad4325
Merge branch 'master' into black_orbit
msw7007 Nov 29, 2024
a83b55a
Фикс множественного спавна раундстартом
msw7007 Nov 30, 2024
f3de8bd
Фиксы
msw7007 Dec 1, 2024
b5d1ba2
Фикс набора раундстарта
msw7007 Dec 1, 2024
8b1b456
Фиксы раундстарт спавна
msw7007 Dec 1, 2024
0fad7bf
Правка раннего старта (чтобы не мазолило глаза), вырезка из меню опци…
msw7007 Dec 1, 2024
dc8bbac
Снижение требуемого количества для генокрада, добавление проверки на …
msw7007 Dec 1, 2024
f4fe615
Временное ограничение антагонистов до размера СБ
msw7007 Dec 1, 2024
945aec1
Merge branch 'master' into black_orbit
msw7007 Dec 1, 2024
ad8a024
Линтер
msw7007 Dec 1, 2024
3654321
Merge branch 'black_orbit' of https://github.com/msw7007/Bandastation…
msw7007 Dec 1, 2024
445b7b1
Merge branch 'master' into black_orbit
msw7007 Dec 2, 2024
7d9e57b
Изменение нашего СТ в сторону Монкестейшен
msw7007 Dec 5, 2024
90952b2
Merge branch 'master' into black_orbit
msw7007 Dec 6, 2024
a0d4806
Merge branch 'master' into black_orbit
msw7007 Dec 6, 2024
9233178
Транслейт?
msw7007 Dec 6, 2024
3dfb553
Merge branch 'ss220club:master' into master
msw7007 Dec 6, 2024
dd9b21c
Переопределение работок
msw7007 Dec 6, 2024
7132d7a
Merge remote-tracking branch 'upstream/master' into black_orbit
msw7007 Dec 6, 2024
9cbf9da
Защита от деления на ноль в меню
msw7007 Dec 6, 2024
cd7c5d1
Защита от нуля в панели ивентов
msw7007 Dec 6, 2024
dd15ba0
Измнененный базовый конфиг
msw7007 Dec 6, 2024
157deb9
Отключение проверок на согласие быть антагом
msw7007 Dec 6, 2024
0816d08
Расширеный показ невозможности событий, фикс переключения СТ мидраундом
msw7007 Dec 6, 2024
c621006
Фикс логики раундстарта (разделение форс и добавить как проверку)
msw7007 Dec 6, 2024
2c8a940
Merge remote-tracking branch 'upstream/master' into black_orbit
msw7007 Dec 7, 2024
171d114
Merge branch 'ss220club:master' into master
msw7007 Dec 7, 2024
e0580aa
Merge branch 'master' into black_orbit
msw7007 Dec 7, 2024
f64309e
Merge branch 'master' into black_orbit
msw7007 Dec 7, 2024
a936d2d
Чистка после мерджа и автошаттла
msw7007 Dec 7, 2024
d4daea4
Merge branch 'master' into black_orbit
msw7007 Dec 7, 2024
1384cf8
Исправление ошибок требований к отделам
msw7007 Dec 8, 2024
575c83d
Корректировка показателей РНД
msw7007 Dec 8, 2024
4ca9716
SSEvents будет пытаться купить событие а не запускать его. Добавление…
msw7007 Dec 8, 2024
c199872
Фикс событий шедуллера, планирование теперь вводится. Обновление логи…
msw7007 Dec 8, 2024
24df45b
Исправление датумов трейторов
msw7007 Dec 9, 2024
ee69e29
Фикс блоба, вывод истории событий
msw7007 Dec 9, 2024
5600928
Возможность редактировать деноминатор и добавки антагов
msw7007 Dec 9, 2024
1ef468a
Обновление отображения переменных для ручного управления системой СТ
msw7007 Dec 9, 2024
218fbb0
Merge branch 'master' into black_orbit
msw7007 Dec 11, 2024
230ceb6
Отцепление очков от конфига, фикс логики раундстарта, изменение старт…
msw7007 Dec 11, 2024
72f31ad
Чистка от наследняи Монке, смещение старта раундстарт-ивентов, ввод п…
msw7007 Dec 12, 2024
abdde95
Возврат стартовых значений после разработки.
msw7007 Dec 12, 2024
2730985
Голова садовая
msw7007 Dec 13, 2024
b5d8ab4
Измнение раундстарт бюджета под настроенный
msw7007 Dec 13, 2024
88e6b25
Фикс модификатора
msw7007 Dec 13, 2024
5e09f51
Фикс ошибки в отображении формулы
msw7007 Dec 13, 2024
a651abc
Полная пересадка цен на динамик
msw7007 Dec 13, 2024
a318433
Фикс бюджета раундстартом
msw7007 Dec 13, 2024
5b64ae4
Изменеие раундстарта
msw7007 Dec 14, 2024
f86da0c
SSevents.no_more
msw7007 Dec 14, 2024
93334b3
Корректное отображение в ивент панели цен событий вместо весов при ра…
msw7007 Dec 14, 2024
bbb0eff
Merge branch 'master' into black_orbit
msw7007 Dec 15, 2024
a7b134b
Исправление ошибок логики раундстарта, отключение нюк и визарда до ис…
msw7007 Dec 15, 2024
26b5da0
Возвращение оперов и визарда
msw7007 Dec 15, 2024
6eda1dd
Фикс странного поведения сторителлера раундстратом
msw7007 Dec 15, 2024
af1e76f
Merge branch 'master' into black_orbit
msw7007 Dec 16, 2024
fb31aab
Merge branch 'master' into black_orbit
msw7007 Dec 17, 2024
792e550
Небольшой реворк по функциям, включение события от хака телекомов
msw7007 Dec 17, 2024
d914322
Merge branch 'black_orbit' of https://github.com/msw7007/Bandastation…
msw7007 Dec 17, 2024
bc784b3
Изменение очередности запуска событий при раундстарте, ввод очереди ф…
msw7007 Dec 17, 2024
ade8703
Merge branch 'master' into black_orbit
msw7007 Dec 18, 2024
1572f69
Merge branch 'master' into black_orbit
msw7007 Dec 19, 2024
47cd38b
Merge branch 'master' into black_orbit
msw7007 Dec 20, 2024
c8fd363
Возврат очков в случае нехватки игроков для купленного гост ивента
msw7007 Dec 20, 2024
c88d61f
Фикс черезмерного спавна противников выше капа
msw7007 Dec 20, 2024
ed0b927
Вывод раундстарт ивентов в список
msw7007 Dec 20, 2024
f768952
Фикс удаления насильного события. Фикс чужих.
msw7007 Dec 23, 2024
11b80d7
Отрабока по ревью dj-34
msw7007 Dec 24, 2024
7a10299
Фикс линтера и логики выборы раундстарта
msw7007 Dec 24, 2024
2fe6797
Попытка фикса линтера
msw7007 Dec 24, 2024
7045b60
Merge branch 'master' into black_orbit
msw7007 Dec 24, 2024
9a0b2b1
Merge remote-tracking branch 'upstream/master' into black_orbit
msw7007 Dec 25, 2024
ba4f400
Чистка после мерджа
msw7007 Dec 25, 2024
06252e3
Приведение к общему виду после последних изменений
msw7007 Dec 25, 2024
b36347b
Merge branch 'ss220club:master' into master
msw7007 Dec 25, 2024
d85bc8e
Merge branch 'master' into black_orbit
msw7007 Dec 25, 2024
d281134
Линтер Каги - 1:0
msw7007 Dec 25, 2024
dba298d
Merge branch 'master' into black_orbit
msw7007 Dec 25, 2024
951818a
Merge branch 'master' into black_orbit
msw7007 Dec 26, 2024
be9d6ab
Разблокировка СТ (на время апробации системы)
msw7007 Dec 27, 2024
685a82f
Merge branch 'black_orbit' of https://github.com/msw7007/Bandastation…
msw7007 Dec 27, 2024
baa47eb
Все события с консоли теперь могут быть запущены
msw7007 Dec 27, 2024
42c493c
Фикс форс бюджета и снятие доп проверок с форшенных ивентов, которые …
msw7007 Dec 29, 2024
2c3a815
Новый СТ: Andy Prime
msw7007 Dec 29, 2024
63fac68
Merge branch 'master' into black_orbit
msw7007 Dec 31, 2024
d7f3071
Merge branch 'master' into black_orbit
msw7007 Jan 3, 2025
3a822a8
Merge branch 'master' into black_orbit
msw7007 Jan 5, 2025
e1ec39f
Merge branch 'master' into black_orbit
msw7007 Jan 6, 2025
2a1f59f
Правки, отслеживания причин
msw7007 Jan 6, 2025
33ed718
Изменение события для обсесседа
msw7007 Jan 7, 2025
0c6be16
Фиксы расчет антага
msw7007 Jan 7, 2025
3d4a141
Merge branch 'ss220club:master' into master
msw7007 Jan 11, 2025
fcc367a
Merge branch 'master' into black_orbit
msw7007 Jan 11, 2025
b366a56
Добавление фейк-антаг флага обсесседу (родителю) и гличам
msw7007 Jan 11, 2025
cd96b83
Фикс рандомизации внешности
msw7007 Jan 11, 2025
cc71d71
Перенос иницилизации СТ в более ранюю стадию
msw7007 Jan 12, 2025
023f66d
Для спавна еретика необходимо наличие противников из СБ, блокировка а…
msw7007 Jan 12, 2025
b5671ca
Генерация и отчет по задачам
msw7007 Jan 12, 2025
9c03312
Merge branch 'master' into black_orbit
Legendaxe Jan 13, 2025
e366266
Новая попытка ограничить спавн антагов сверх капа
msw7007 Jan 13, 2025
c4712e3
Перенос в СТ начальных множителей
msw7007 Jan 15, 2025
b88a3e2
Merge branch 'master' into black_orbit
msw7007 Jan 15, 2025
2c4ac8d
Добавление возможности в СТ исключать события, добавление возможности…
msw7007 Jan 15, 2025
444b231
Фикс данных из конфига
msw7007 Jan 16, 2025
cfae6f5
Merge remote-tracking branch 'upstream/master' into black_orbit
msw7007 Jan 18, 2025
736d818
Merge branch 'master' into black_orbit
Gaxeer Jan 19, 2025
70832cd
Update modular_bandastation/modular_bandastation.dme
Gaxeer Jan 19, 2025
f696149
Отработка по последнему раунду
msw7007 Jan 19, 2025
0fc0799
Изменение логики
msw7007 Jan 20, 2025
32a49de
Убираем факап
msw7007 Jan 20, 2025
74ec8bd
Недоубирали факап
msw7007 Jan 20, 2025
9f74866
Добавление по просьбам прайма настроек
msw7007 Jan 20, 2025
dcfa76a
Merge branch 'master' into black_orbit
msw7007 Jan 21, 2025
24a2df5
Капелан не может быть еретиком, разделение форс-ивентов
msw7007 Jan 21, 2025
887b5d4
Перезапись форса при повторном форсе такого же события
msw7007 Jan 21, 2025
5eb3e6c
Откат фичи с заменой фаеров одного типа
msw7007 Jan 21, 2025
4bcaac9
Доработка - ограничение раундстартов, возможность выбирать количество…
msw7007 Jan 23, 2025
3b114f8
Изменение Энди-прайм дивизора
msw7007 Jan 23, 2025
ea3ad3b
Merge branch 'master' into black_orbit
msw7007 Jan 24, 2025
b438673
Ввод максимального количества активных антагонистов на раунд
msw7007 Jan 24, 2025
6806def
Небольшая перестановка
msw7007 Jan 24, 2025
223a9c6
Повышение деноминатора СТ Энди Прайма
msw7007 Jan 24, 2025
44ec639
Переброс части событий с ветки "Мажор" на ветку "Среднее"
msw7007 Jan 24, 2025
82c577f
Merge branch 'master' into black_orbit
Gaxeer Jan 25, 2025
8b58578
Merge branch 'master' into black_orbit
msw7007 Jan 26, 2025
af60a54
Фикс кандидтов в события
msw7007 Jan 26, 2025
7bc4683
Merge branch 'black_orbit' of https://github.com/msw7007/Bandastation…
msw7007 Jan 26, 2025
85b7315
Корректировка
msw7007 Jan 26, 2025
adf7ccd
Доработка - изменнеие силы СБ на 1, изменение отображения сообщения о…
msw7007 Jan 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/__DEFINES/anomaly.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

///Time in ticks before the anomaly goes poof/explodes depending on type.
#define ANOMALY_COUNTDOWN_TIMER (120 SECONDS)
#define ANOMALY_COUNTDOWN_TIMER (200 SECONDS) // BANDASTATION EDIT - STORYTELLER: 120 seconds -> 200 seconds

/**
* Nuisance/funny anomalies
Expand Down
6 changes: 6 additions & 0 deletions code/__DEFINES/antagonists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,12 @@ GLOBAL_LIST_INIT(human_invader_antagonists, list(

// This flag disables certain checks that presume antagonist datums mean 'baddie'.
#define FLAG_FAKE_ANTAG (1 << 0)
// BANDASTATION EDIT START - STORYTELLER
// The storyteller will ignore this antag datum as counting against the antag cap.
#define FLAG_ANTAG_CAP_IGNORE (1 << 1)
// The storyteller will count everyone on this antag's team as a singular antag instead.
#define FLAG_ANTAG_CAP_TEAM (1 << 2)
// BANDASTATION EDIT END - STORYTELLER

#define HUNTER_PACK_COPS "Spacepol Fugitive Hunters"
#define HUNTER_PACK_RUSSIAN "Russian Fugitive Hunters"
Expand Down
13 changes: 12 additions & 1 deletion code/__HELPERS/roundend.dm
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ GLOBAL_LIST_INIT(achievements_unlocked, list())

//Set news report and mode result
SSdynamic.set_round_result()
// BANDASTATION EDIT START - STORYTELLER
SSgamemode.round_end_report()
SSgamemode.store_roundend_data() // store data on roundend for next round
// BANDASTATION EDIT END - STORYTELLER

to_chat(world, span_infoplain(span_big(span_bold("<BR><BR><BR>The round has ended."))))
log_game("The round has ended.")
Expand Down Expand Up @@ -305,6 +309,9 @@ GLOBAL_LIST_INIT(achievements_unlocked, list())
/datum/controller/subsystem/ticker/proc/build_roundend_report()
var/list/parts = list()

//might want to make this a full section
parts += SSgamemode.create_roundend_score() // BANDASTATION EDIT - STORYTELLER

//AI laws
parts += law_report()

Expand Down Expand Up @@ -354,16 +361,20 @@ GLOBAL_LIST_INIT(achievements_unlocked, list())
else
parts += "[FOURSPACES]<i>Nobody died this shift!</i>"

// BANDASTATION EDIT START - STORYTELLER
/*
parts += "[FOURSPACES]Threat level: [SSdynamic.threat_level]"
parts += "[FOURSPACES]Threat left: [SSdynamic.mid_round_budget]"

if(SSdynamic.roundend_threat_log.len)
parts += "[FOURSPACES]Threat edits:"
for(var/entry as anything in SSdynamic.roundend_threat_log)
parts += "[FOURSPACES][FOURSPACES][entry]<BR>"
parts += "[FOURSPACES]Executed rules:"
for(var/datum/dynamic_ruleset/rule in SSdynamic.executed_rules)
parts += "[FOURSPACES][FOURSPACES][rule.ruletype] - <b>[rule.name]</b>: -[rule.cost + rule.scaled_times * rule.scaling_cost] threat"

*/
// BANDASTATION EDIT END - STORYTELLER
return parts.Join("<br>")

/client/proc/roundend_report_file()
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/lists/objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,4 @@ GLOBAL_LIST_INIT(prototype_organs, typecacheof(list(
/obj/item/organ/eyes/dullahan,
), only_root_path = TRUE))

GLOBAL_LIST_EMPTY(nuke_list) // BANDASTATION EDIT - STORYTELLER
1 change: 1 addition & 0 deletions code/controllers/master.dm
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ ADMIN_VERB(cmd_controller_view_ui, R_SERVER|R_DEBUG, "Controller Overview", "Vie
if(sleep_offline_after_initializations && CONFIG_GET(flag/resume_after_initializations))
world.sleep_offline = FALSE
initializations_finished_with_no_players_logged_in = initialized_tod < REALTIMEOFDAY - 10
SSgamemode.handle_picking_storyteller() // BANDASTATION EDIT - STORYTELLER

/**
* Initialize a given subsystem and handle the results.
Expand Down
7 changes: 6 additions & 1 deletion code/controllers/subsystem/ambience.dm
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,12 @@ SUBSYSTEM_DEF(ambience)
return

var/area/my_area = get_area(src)
var/sound_to_use = my_area.ambient_buzz
// BANDASTATION EDIT START - STORYTELLERS
var/sound_to_use
if(my_area)
sound_to_use= my_area.ambient_buzz
// BANDASTATION EDIT END - STORYTELLERS

var/volume_modifier = client.prefs.read_preference(/datum/preference/numeric/sound_ship_ambience_volume)

if(!sound_to_use || !(client.prefs.read_preference(/datum/preference/numeric/sound_ship_ambience_volume)))
Expand Down
5 changes: 3 additions & 2 deletions code/controllers/subsystem/dynamic/dynamic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ SUBSYSTEM_DEF(dynamic)
var/waittime_h = 1800

/// A number between 0 and 100. The maximum amount of threat allowed to generate.
var/max_threat_level = 100
var/max_threat_level = 0 // BANDASTATION EDIT - STORYTELLER

/// The extra chance multiplier that a heavy impact midround ruleset will run next time.
/// For example, if this is set to 50, then the next heavy roll will be about 50% more likely to happen.
Expand Down Expand Up @@ -326,7 +326,8 @@ SUBSYSTEM_DEF(dynamic)
continue
min_threat = min(ruleset.cost, min_threat)

var/greenshift = GLOB.dynamic_forced_extended || (threat_level < min_threat) //if threat is below any ruleset, its extended time
// var/greenshift = GLOB.dynamic_forced_extended || (threat_level < min_threat) //if threat is below any ruleset, its extended time
var/greenshift = SSgamemode.current_storyteller.disable_distribution // BANDASTATION EDIT - STORYTELLER
SSstation.generate_station_goals(greenshift ? INFINITY : CONFIG_GET(number/station_goal_budget))

var/list/datum/station_goal/goals = SSstation.get_station_goals()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@
cost = 7
minimum_round_time = 70 MINUTES
requirements = REQUIREMENTS_VERY_HIGH_THREAT_NEEDED
ruleset_lazy_templates = list(LAZY_TEMPLATE_KEY_NUKIEBASE)
//ruleset_lazy_templates = list(LAZY_TEMPLATE_KEY_NUKIEBASE) // BANDASTATION EDIT - STORYTELLER
flags = HIGH_IMPACT_RULESET
signup_item_path = /obj/machinery/nuclearbomb

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ GLOBAL_VAR_INIT(revolutionary_win, FALSE)
requirements = list(90,90,90,80,60,40,30,20,10,10)
flags = HIGH_IMPACT_RULESET
antag_cap = list("denominator" = 18, "offset" = 1)
ruleset_lazy_templates = list(LAZY_TEMPLATE_KEY_NUKIEBASE)
//ruleset_lazy_templates = list(LAZY_TEMPLATE_KEY_NUKIEBASE) // BANDASTATION EDIT - STORYTELLER
var/required_role = ROLE_NUCLEAR_OPERATIVE
var/datum/team/nuclear/nuke_team
///The job type to dress up our nuclear operative as.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,25 @@
return list()

var/list/possible_heavies = list()
for (var/datum/dynamic_ruleset/midround/ruleset as anything in midround_rules)
// BANDASTATION EDIT START - STORYTELLER
var/list/generated_midround_rules = init_rulesets(/datum/dynamic_ruleset/midround)
for (var/datum/dynamic_ruleset/midround/ruleset as anything in generated_midround_rules)
// BANDASTATION EDIT END - STORYTELLER
if (ruleset.midround_ruleset_style != MIDROUND_RULESET_STYLE_HEAVY)
continue

if (ruleset.weight == 0)
continue

// BANDASTATION EDIT START - STORYTELLER
/*
if (ruleset.cost > max_threat_level)
continue

if (!ruleset.acceptable(GLOB.alive_player_list.len, threat_level))
continue
*/
// BANDASTATION EDIT END - STORYTELLER

if (ruleset.minimum_round_time > world.time - SSticker.round_start_time)
continue
Expand Down
20 changes: 15 additions & 5 deletions code/controllers/subsystem/events.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ SUBSYSTEM_DEF(events)
*/
/datum/controller/subsystem/events/proc/spawnEvent(datum/round_event_control/excluded_event)
set waitfor = FALSE //for the admin prompt
if(!CONFIG_GET(flag/allow_random_events))
if(!CONFIG_GET(flag/allow_random_events) || !excluded_event) // BANDASTATION EDIT START - STORYTELLER - No SSevents spawn except rerolling
return

var/players_amt = get_active_player_count(alive_check = TRUE, afk_check = TRUE, human_check = TRUE)
Expand All @@ -86,8 +86,8 @@ SUBSYSTEM_DEF(events)
continue
if(!event_to_check.can_spawn_event(players_amt))
continue
if(event_to_check.weight < 0) //for round-start events etc.
var/res = TriggerEvent(event_to_check)
if(event_to_check.roundstart) //for round-start events etc.
var/res = SSgamemode.TriggerEvent(event_to_check)
if(res == EVENT_INTERRUPTED)
continue //like it never happened
if(res == EVENT_CANT_RUN)
Expand All @@ -97,15 +97,25 @@ SUBSYSTEM_DEF(events)

var/datum/round_event_control/event_to_run = pick_weight(event_roster)
if(event_to_run)
TriggerEvent(event_to_run)
// BANDASTATION EDIT START - STORYTELLER
/// TriggerEvent(event_to_run)
SSgamemode.TriggerEvent(event_to_run, forced = FALSE)
// BANDASTATION EDIT END - STORYTELLER

///Does the last pre-flight checks for the passed event, and runs it if the event is ready.

/datum/controller/subsystem/events/proc/TriggerEvent(datum/round_event_control/event_to_trigger)
. = event_to_trigger.preRunEvent()
if(. == EVENT_CANT_RUN)//we couldn't run this event for some reason, set its max_occurrences to 0
event_to_trigger.max_occurrences = 0
else if(. == EVENT_READY)
event_to_trigger.run_event(random = TRUE)
// BANDASTATION EDIT START - STORYTELLER
//event_to_trigger.run_event(random = TRUE)
message_admins("<font color='[COLOR_DARK_MODERATE_LIME_GREEN]'>SSevents</font> runs and try to buy a event: [event_to_trigger.name]!")
log_game("<font color='[COLOR_DARK_MODERATE_LIME_GREEN]'>SSevents</font> runs and try to buy a event: [event_to_trigger.name]!")
SSgamemode.current_storyteller.try_buy_event(src)
// BANDASTATION EDIT END - STORYTELLER


///Toggles whether or not wizard events will be in the event pool, and sends a notification to the admins.
/datum/controller/subsystem/events/proc/toggleWizardmode()
Expand Down
99 changes: 99 additions & 0 deletions code/controllers/subsystem/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ SUBSYSTEM_DEF(job)
## The game will not read any line that is commented out with a '#', as to allow you to defer to codebase defaults.\n## If you want to override the codebase values, add the value and then uncomment that line by removing the # from the job key's name.\n\
## Ensure that the key is flush, do not introduce any whitespaces when you uncomment a key. For example:\n## \"# Total Positions\" should always be changed to \"Total Positions\", no additional spacing.\n\
## Best of luck editing!\n"
// BANDASTATIONE EDIT START - STORYTELLER
/// Assoc list of new players keyed to the type of job they will currently get
var/list/assigned_players_by_job = list()
// BANDASTATIONE EDIT END - STORYTELLER

/datum/controller/subsystem/job/Initialize()
setup_job_lists()
Expand Down Expand Up @@ -979,3 +983,98 @@ SUBSYSTEM_DEF(job)
return TRUE

return FALSE

// BANDASTATION EDIT START - STORYTELLER
/datum/controller/subsystem/job/proc/FreeRole(rank)
if(!rank)
return
job_debug("Freeing role: [rank]")
var/datum/job/job = get_job(rank)
if(!job)
return FALSE
job.current_positions = max(0, job.current_positions - 1)

/datum/controller/subsystem/job/proc/SetupOccupations()
name_occupations = list()
type_occupations = list()

var/list/all_jobs = subtypesof(/datum/job)
if(!length(all_jobs))
all_occupations = list()
joinable_occupations = list()
joinable_departments = list()
joinable_departments_by_type = list()
experience_jobs_map = list()
to_chat(world, span_boldannounce("Error setting up jobs, no job datums found"))
return FALSE

var/list/new_all_occupations = list()
var/list/new_joinable_occupations = list()
var/list/new_joinable_departments = list()
var/list/new_joinable_departments_by_type = list()
var/list/new_experience_jobs_map = list()

for(var/job_type in all_jobs)
var/datum/job/job = new job_type()
if(!job.config_check())
continue
if(!job.map_check()) //Even though we initialize before mapping, this is fine because the config is loaded at new
log_job_debug("Removed [job.title] due to map config")
continue
new_all_occupations += job
name_occupations[job.title] = job
type_occupations[job_type] = job
if(job.job_flags & JOB_NEW_PLAYER_JOINABLE)
new_joinable_occupations += job
if(!LAZYLEN(job.departments_list))
var/datum/job_department/department = new_joinable_departments_by_type[/datum/job_department/undefined]
if(!department)
department = new /datum/job_department/undefined()
new_joinable_departments_by_type[/datum/job_department/undefined] = department
department.add_job(job)
continue
for(var/department_type in job.departments_list)
var/datum/job_department/department = new_joinable_departments_by_type[department_type]
if(!department)
department = new department_type()
new_joinable_departments_by_type[department_type] = department
department.add_job(job)

sortTim(new_all_occupations, GLOBAL_PROC_REF(cmp_job_display_asc))
for(var/datum/job/job as anything in new_all_occupations)
if(!job.exp_granted_type)
continue
new_experience_jobs_map[job.exp_granted_type] += list(job)

sortTim(new_joinable_departments_by_type, GLOBAL_PROC_REF(cmp_department_display_asc), associative = TRUE)
for(var/department_type in new_joinable_departments_by_type)
var/datum/job_department/department = new_joinable_departments_by_type[department_type]
sortTim(department.department_jobs, GLOBAL_PROC_REF(cmp_job_display_asc))
new_joinable_departments += department
if(department.department_experience_type)
new_experience_jobs_map[department.department_experience_type] = department.department_jobs.Copy()

all_occupations = new_all_occupations
joinable_occupations = sortTim(new_joinable_occupations, GLOBAL_PROC_REF(cmp_job_display_asc))
joinable_departments = new_joinable_departments
joinable_departments_by_type = new_joinable_departments_by_type
experience_jobs_map = new_experience_jobs_map

return TRUE

/datum/controller/subsystem/job/proc/SendToLateJoin(mob/M, buckle = TRUE)
var/atom/destination

if(M.mind && !is_unassigned_job(M.mind.assigned_role) && length(GLOB.jobspawn_overrides[M.mind.assigned_role.title])) //We're doing something special today.
destination = pick(GLOB.jobspawn_overrides[M.mind.assigned_role.title])
destination.JoinPlayerHere(M, FALSE)
return TRUE

if(latejoin_trackers.len)
destination = pick(latejoin_trackers)
destination.JoinPlayerHere(M, buckle)
return TRUE

destination = get_last_resort_spawn_points()
destination.JoinPlayerHere(M, buckle)
// BANDASTATION EDIT END - STORYTELLER
1 change: 1 addition & 0 deletions code/controllers/subsystem/statpanel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ SUBSYSTEM_DEF(statpanels)
global_data = list(
"Map: [SSmapping.current_map?.map_name || "Loading..."]",
cached ? "Next Map: [cached.map_name]" : null,
"Storyteller: [!SSgamemode.secret_storyteller && SSgamemode.current_storyteller ? SSgamemode.current_storyteller.name : "Secret"]", // BANDASTATION ADDITION - STORYTELLER
"Round ID: [GLOB.round_id ? GLOB.round_id : "NULL"]",
"Players Connected: [LAZYLEN(GLOB.clients)]", // BANDASTATION ADD
"Players in Lobby: [LAZYLEN(GLOB.new_player_list)]", // BANDASTATION ADD
Expand Down
12 changes: 9 additions & 3 deletions code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,13 @@ SUBSYSTEM_DEF(ticker)
to_chat(world, span_notice("<b>Welcome to [station_name()]!</b>"))
send2chat(new /datum/tgs_message_content("New round starting on [SSmapping.current_map.map_name]!"), CONFIG_GET(string/channel_announce_new_game))
current_state = GAME_STATE_PREGAME
//SSvote.initiate_vote(/datum/vote/storyteller, "Storyteller Vote", forced = TRUE) // BANDASTATION EDIT - STORYTELLER
SEND_SIGNAL(src, COMSIG_TICKER_ENTER_PREGAME)
msw7007 marked this conversation as resolved.
Show resolved Hide resolved

fire()
if(GAME_STATE_PREGAME)
//lobby stats for statpanels
SSgamemode.init_storyteller() // BANDASTATION EDIT - STORYTELLER
if(isnull(timeLeft))
timeLeft = max(0,start_at - world.time)
totalPlayers = LAZYLEN(GLOB.new_player_list)
Expand Down Expand Up @@ -231,11 +233,14 @@ SUBSYSTEM_DEF(ticker)
/datum/controller/subsystem/ticker/proc/setup()
to_chat(world, span_boldannounce("Starting game..."))
var/init_start = world.timeofday

// BANDASTATION EDIT START - STORYTELLER
CHECK_TICK
//Configure mode and assign player to antagonists
var/can_continue = FALSE
can_continue = SSdynamic.pre_setup() //Choose antagonists

CHECK_TICK
can_continue = SSgamemode.pre_setup()
// BANDASTATION EDIT END - STORYTELLER
CHECK_TICK
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_PRE_JOBS_ASSIGNED, src)
can_continue = can_continue && SSjob.divide_occupations() //Distribute jobs
Expand Down Expand Up @@ -301,7 +306,8 @@ SUBSYSTEM_DEF(ticker)

/datum/controller/subsystem/ticker/proc/PostSetup()
set waitfor = FALSE
SSdynamic.post_setup()
//SSdynamic.post_setup() // BANDASTATION EDIT - STORYTELLER
SSgamemode.post_setup() // BANDASTATION EDIT - STORYTELLER
GLOB.start_state = new /datum/station_state()
GLOB.start_state.count()

Expand Down
Loading
Loading