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

Ограничения Раса/Роль #1693

Merged
merged 15 commits into from
Dec 13, 2024

Conversation

msw7007
Copy link

@msw7007 msw7007 commented Dec 9, 2024

Что этот PR делает

Добавляет систему механического ограничения расы для ролей (джобок).
Используется конфиг (для возможности различной настройки на разных серверах для разных рас (пример приведен в конфиге)).
Используется переменная для общего включения/выключения системы.

UPD: готовый вариант конфига по таблице для прайма

[job_configuration_restriction]

# Should enable job ban for species
allow_to_ban_job_for_species = true

# Job blacklist marks. Add species name to ban job for a specific species. Example: { name = "Captain", species_blacklist = ["Vox"] },
job_species_blacklist = [
	# Cental Command
	{ name = "Nanotrasen Navy Officer", species_blacklist = ["Unathi", "Slime People", "Vox", "Drask", "Grey", "Diona", "Machine", "Kidan", "Plasmaman", "Vulpkanin", "Nucleation", "Nian"] },
	{ name = "Special Operations Officer", species_blacklist = ["Unathi", "Slime People", "Vox", "Drask", "Grey", "Diona", "Machine", "Kidan", "Plasmaman", "Vulpkanin", "Nucleation", "Nian"] },
	{ name = "Trans-Solar Federation General", species_blacklist = ["Unathi", "Slime People", "Slime People", "Vox", "Drask", "Plasmaman", "Nian"] },
	{ name = "Syndicate Officer", species_blacklist = [] },
	# Commmand
	{ name = "Captain", species_blacklist = ["Unathi", "Diona", "Vulpkanin", "Tajaran", "Kidan", "Grey", "Plasmaman", "Slime People", "Drask", "Vox", "Nian"] },
	{ name = "Head of Personnel", species_blacklist = ["Unathi", "Diona", "Grey", "Plasmaman", "Vox", "Nian"] },
	{ name = "Head of Security", species_blacklist = [ "Vox",  "Slime People", "Diona", "Grey", "Kidan", "Plasmaman", "Nian", "Nucleation"] },
	{ name = "Chief Engineer", species_blacklist = ["Kidan", "Vox"] },
	{ name = "Research Director", species_blacklist = ["Kidan", "Slime People", "Vox"] },
	{ name = "Chief Medical Officer", species_blacklist = ["Kidan"] },
	{ name = "Quartermaster", species_blacklist = ["Vulpkanin", "Kidan"] },
	{ name = "Nanotrasen Representative", species_blacklist = ["Unathi", "Vulpkanin", "Diona", "Tajaran", "Kidan", "Grey", "Plasmaman", "Slime People", "Drask", "Vox",  "Nian"] },
	{ name = "Blueshield", species_blacklist = ["Unathi", "Vulpkanin", "Diona", "Tajaran", "Kidan", "Grey", "Plasmaman", "Slime People", "Drask", "Vox", "Nian", "Nucleation"] },
	{ name = "Magistrate", species_blacklist = ["Unathi", "Vulpkanin", "Diona", "Tajaran", "Kidan", "Grey", "Plasmaman", "Slime People", "Drask", "Vox", "Nian"] },
	# Engineering
	{ name = "Life Support Specialist", species_blacklist = ["Drask"] },
	{ name = "Station Engineer", species_blacklist = [] },
	{ name = "Trainee Engineer", species_blacklist = [] },
	# Medical
	{ name = "Chemist", species_blacklist = [] },
	{ name = "Paramedic", species_blacklist = [] },
	{ name = "Geneticist", species_blacklist = ["Kidan", "Plasmaman", "Drask"] },
	{ name = "Coroner", species_blacklist = [] },
	{ name = "Psychiatrist", species_blacklist = [] },
	{ name = "Medical Doctor", species_blacklist = [] },
	{ name = "Medical Intern", species_blacklist = [] },
	{ name = "Virologist", species_blacklist = ["Plasmaman"] },
	# Science
	{ name = "Roboticist", species_blacklist = ["Diona", "Drask"] },
	{ name = "Scientist", species_blacklist = ["Drask", ] },
	{ name = "Student Scientist", species_blacklist = ["Drask"] },
	# Security
	{ name = "Detective", species_blacklist = ["Diona", "Kidan", "Grey", "Plasmaman"] },
	{ name = "Security Officer", species_blacklist = ["Diona", "Kidan", "Grey", "Plasmaman", "Nian", "Nucleation"] },
	{ name = "Security Cadet", species_blacklist = ["Diona", "Kidan", "Grey", "Plasmaman", "Nucleation"] },
	{ name = "Warden", species_blacklist = ["Diona", "Kidan", "Grey", "Plasmaman", "Nian", "Nucleation"] },
	{ name = "Internal Affairs Agent", species_blacklist = ["Unathi", "Vulpkanin", "Diona", "Tajaran", "Kidan", "Grey", "Plasmaman", "Vox"] },
	# Service
	{ name = "Bartender", species_blacklist = [] },
	{ name = "Botanist", species_blacklist = [] },
	{ name = "Chaplain", species_blacklist = ["Grey"] },
	{ name = "Chef", species_blacklist = ["Vox"] },
	{ name = "Janitor", species_blacklist = [] },
	{ name = "Librarian", species_blacklist = [] },
	{ name = "Clown", species_blacklist = ["Grey"] },
	{ name = "Mime", species_blacklist = ["Grey"] },
	# Cargo/Supply
	{ name = "Explorer", species_blacklist = [] },
	{ name = "Shaft Miner", species_blacklist = ["Grey", "Plasmaman", "Nian"] },
	{ name = "Cargo Technician", species_blacklist = [] },
	# Silicon
	{ name = "AI", species_blacklist = [] },
	{ name = "Cyborg", species_blacklist = [] },
	# Misc
	{ name = "Assistant", species_blacklist = [] },
	# Donor
	# { name = "Donor", species_blacklist = [] },
	# { name = "Prisoner", species_blacklist = [] },
	# { name = "Barber", species_blacklist = [] },
	# { name = "Bath", species_blacklist = [] },
	# { name = "Casino", species_blacklist = [] },
	# { name = "Waiter", species_blacklist = [] },
	# { name = "Acolyte", species_blacklist = [] },
	# { name = "Wrestler", species_blacklist = [] },
	# { name = "Musician", species_blacklist = [] },
	# { name = "Actor", species_blacklist = [] },
	# { name = "Administrator", species_blacklist = [] },
	# { name = "Tourist TSF", species_blacklist = [] },
	# { name = "Tourist USSP", species_blacklist = [] },
	# { name = "Cleaning Manager", species_blacklist = [] },
	# { name = "Guard", species_blacklist = [] },
	# { name = "Migrant", species_blacklist = [] },
	# { name = "Uncertain", species_blacklist = [] },
	# { name = "Adjutant", species_blacklist = [] },
	# { name = "Representative TSF", species_blacklist = [] },
	# { name = "Representative USSP", species_blacklist = [] },
	# { name = "Dealer", species_blacklist = [] },
	# { name = "VIP Corporate Guest", species_blacklist = [] },
	# { name = "Banker", species_blacklist = [] },
	# { name = "Security Clown", species_blacklist = [] },
]

################################################################

Почему это хорошо для игры

Позволит механически поддержить правила Пары, а так-же будет полезно для ГБСов.

Изображения изменений

image
image

Тестирование

Локальный сервер:
Внес изменения в список ограничений (капитан - воксы и включил систему).
Запустил игру - выбрал вокса - в настройках приоритета рас работает ограничение, при попытке присоединится заблокированная роль не отображается в списке.
Не останавливая сервер выбрал человека - все доступно и в меню и в присоединении.
Внес изменения в конфиг снова (выключил систему не убирая ограничения капитан - воксы).
Запустил игру - выбрал вокса или хумана - обоим было все доступно.

Changelog

🆑
add: Добавляется система ограничения раса/роль
/:cl:

@github-actions github-actions bot added 💾 Изменение конфига Ф-ф-фуриор...? :feelsgood: Частичная модульность Не всегда получается всё впихнуть в модуль, увы. labels Dec 9, 2024
Copy link
Collaborator

@m-dzianishchyts m-dzianishchyts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вроде норм

code/modules/client/preference/character.dm Outdated Show resolved Hide resolved
code/modules/mob/new_player/new_player.dm Outdated Show resolved Hide resolved
config/example/config.toml Outdated Show resolved Hide resolved
modular_ss220/jobs/code/jobs.dm Outdated Show resolved Hide resolved
modular_ss220/jobs/code/jobs.dm Outdated Show resolved Hide resolved
modular_ss220/jobs/code/jobs.dm Show resolved Hide resolved
@msw7007 msw7007 requested a review from larentoun December 10, 2024 13:05
config/example/config.toml Outdated Show resolved Hide resolved
config/example/config.toml Show resolved Hide resolved
modular_ss220/jobs/code/configuration.dm Outdated Show resolved Hide resolved
modular_ss220/jobs/code/configuration.dm Outdated Show resolved Hide resolved
modular_ss220/jobs/code/configuration.dm Outdated Show resolved Hide resolved
modular_ss220/jobs/code/jobs.dm Outdated Show resolved Hide resolved
modular_ss220/jobs/code/jobs.dm Outdated Show resolved Hide resolved
Copy link
Collaborator

@larentoun larentoun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

последнее, в остальном норм

modular_ss220/jobs/code/configuration.dm Outdated Show resolved Hide resolved
Copy link
Collaborator

@m-dzianishchyts m-dzianishchyts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Думаю валидити, на доверии

@github-actions github-actions bot added the Merge Conflict Ну блять... label Dec 10, 2024
@github-actions github-actions bot removed the Merge Conflict Ну блять... label Dec 11, 2024
@dj-34 dj-34 merged commit 8201f88 into ss220club:master Dec 13, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:feelsgood: Частичная модульность Не всегда получается всё впихнуть в модуль, увы. 💾 Изменение конфига Ф-ф-фуриор...? 📜 CL валиден
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants