-
Notifications
You must be signed in to change notification settings - Fork 123
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
Antag mix Whitelist #1710
base: master
Are you sure you want to change the base?
Antag mix Whitelist #1710
Changes from all commits
584d6a3
ebae254
33c9481
637e9e5
4949f47
ebda198
8d5db07
f8b7db7
8758255
17851af
6f9277c
2c2916f
5d5531a
2c94248
0c0e06a
187239a
129347e
f094f0a
bc9a264
bf1ec10
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -37,6 +37,8 @@ | |||||
var/list/protected_roles = list() | ||||||
/// Species that can't be chosen for the scenario | ||||||
var/list/restricted_species = list() | ||||||
/// Only species that can be chosen for the scenario, null - for all | ||||||
var/list/allowed_species = null | ||||||
/// List of available candidates for this scenario | ||||||
var/list/mob/new_player/candidates = list() | ||||||
/// List of players that were drafted to be antagonists of this scenario | ||||||
|
@@ -46,12 +48,12 @@ | |||||
var/is_crew_antag = TRUE | ||||||
/// Spawn antagonist at landmark name | ||||||
var/obj/effect/landmark/spawner/landmark_type = /obj/effect/landmark/spawner/xeno | ||||||
/// What species can be used for the antagonist | ||||||
var/list/possible_species = list("Human") | ||||||
/// Recommended species at prefs to increase the chance of getting a role for RP-experienced players | ||||||
/// What species can be used to create antagonist | ||||||
var/list/species_pool = null | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Избавляемся везде от null для упрощения проверок
Suggested change
|
||||||
// Recommended species at prefs to increase the chance of getting a role for RP-experienced players | ||||||
// For example list("Vox" = 8) modifier that increases the chance of landing by 8 times | ||||||
var/list/recommended_species_active_pref | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
/// Multiplication modifier that increases the chance of landing by N times | ||||||
var/recommended_species_mod = 0 | ||||||
|
||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
/datum/antag_scenario/New() | ||||||
if(abstract) | ||||||
|
@@ -176,6 +178,7 @@ | |||||
for(var/mob/new_player/candidate as anything in candidates) | ||||||
var/client/candidate_client = candidate.client | ||||||
var/datum/mind/candidate_mind = candidate.mind | ||||||
var/my_specie = candidate_client.prefs.active_character.species | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
if(!candidate_client || !candidate_mind || !candidate.ready) | ||||||
candidates.Remove(candidate) | ||||||
continue | ||||||
|
@@ -196,7 +199,11 @@ | |||||
candidates.Remove(candidate) | ||||||
continue | ||||||
|
||||||
if(!(antag_role in candidate.client.prefs.be_special) || (candidate.client.prefs.active_character.species in restricted_species)) | ||||||
if(!(antag_role in candidate_client.prefs.be_special) || (my_specie in restricted_species)) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
candidates.Remove(candidate) | ||||||
continue | ||||||
|
||||||
if(!((isnull(allowed_species)) || (my_specie in allowed_species))) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
candidates.Remove(candidate) | ||||||
continue | ||||||
|
||||||
|
@@ -241,9 +248,9 @@ | |||||
* Сreate characters if the antagonist is not from the crew. | ||||||
*/ | ||||||
/datum/antag_scenario/proc/make_character(datum/mind/mind, turf/loc_spawn) | ||||||
var/picked_species = pick(possible_species) | ||||||
var/picked_species = pick(species_pool) | ||||||
var/datum/antagonist/temp_antag_datum = locate(antag_datum) in mind.antag_datums | ||||||
temp_antag_datum.make_body(loc_spawn, mind, TRUE, picked_species, possible_species) | ||||||
temp_antag_datum.make_body(loc_spawn, mind, TRUE, picked_species, species_pool) | ||||||
|
||||||
/datum/antag_scenario/proc/equip_character(datum/mind/mind) | ||||||
return TRUE | ||||||
|
@@ -254,16 +261,13 @@ | |||||
if(!length(candidates)) | ||||||
return | ||||||
|
||||||
if(!recommended_species_mod) | ||||||
return | ||||||
|
||||||
if(!length(recommended_species_active_pref)) | ||||||
return | ||||||
|
||||||
for(var/mob/new_player/candidate in candidates) | ||||||
var/list/datum/character_save/characters = candidate.client.prefs.character_saves | ||||||
for(var/datum/character_save/character in characters) | ||||||
if(character.species in recommended_species_active_pref) | ||||||
candidates[candidate] = recommended_species_mod | ||||||
candidates[candidate] = recommended_species_active_pref[character.species] | ||||||
else | ||||||
candidates[candidate] = 1 |
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -115,7 +115,8 @@ | |||
"Special Operations Officer", | ||||
"Syndicate Officer", | ||||
"Solar Federation General") | ||||
possible_species = list("Machine") | ||||
|
||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
allowed_species = list("Machine") | ||||
|
||||
/datum/antag_scenario/team/blood_brothers | ||||
name = "Blood Brothers" | ||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Такое я имел в виду