[MIRROR] Replaces Batform with Vampire houses [MDB IGNORE] (#9636)

* Replaces Batform with Vampire houses (#62516)

Permissions for species change

image
About The Pull Request

Goodbye batform

Hello, new preference called vampire status. Outcast vampires act just like normal, Inoculated vampires join their department under a unified "vampire house name" everyone shares.

image

image

image
Why It's Good For The Game

I've heard people complain about batform for years now, if vampires aren't gone by next halloween we can at least enjoy making them far less griefy (ruining a lot of the fun of halloween as just a dumb grief holiday) and more roleplay oriented. I don't even know why vampires got a griefy spell when they already have their main mechanic encourage randomly attacking people and stealing their blood to stay alive
Changelog

cl
del: Batform is gone!
add: ...Replaced by vampire houses as a preference. Join your department as a vampire ménage!
/cl

* Replaces Batform with Vampire houses

Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-11-23 04:09:07 +00:00
committed by GitHub
parent 8e6590c600
commit de4647c320
11 changed files with 165 additions and 48 deletions
@@ -15,8 +15,11 @@
/// The priority at which names are decided, needed for proper randomization.
#define PREFERENCE_PRIORITY_NAMES 5
/// Preferences that aren't names, but change the name changes set by PREFERENCE_PRIORITY_NAMES.
#define PREFERENCE_PRIORITY_NAME_MODIFICATIONS 6
/// The maximum preference priority, keep this updated, but don't use it for `priority`.
#define MAX_PREFERENCE_PRIORITY PREFERENCE_PRIORITY_NAMES
#define MAX_PREFERENCE_PRIORITY PREFERENCE_PRIORITY_NAME_MODIFICATIONS
/// For choiced preferences, this key will be used to set display names in constant data.
#define CHOICED_PREFERENCE_DISPLAY_NAMES "display_names"
@@ -0,0 +1,48 @@
/datum/preference/choiced/vampire_status
savefile_key = "feature_vampire_status"
savefile_identifier = PREFERENCE_CHARACTER
category = PREFERENCE_CATEGORY_FEATURES
priority = PREFERENCE_PRIORITY_NAME_MODIFICATIONS //this will be overwritten by names otherwise
main_feature_name = "Vampire status"
should_generate_icons = TRUE
relevant_species_trait = BLOOD_CLANS
/datum/preference/choiced/vampire_status/create_default_value()
return "Inoculated" //eh, have em try out the mechanic first
/datum/preference/choiced/vampire_status/init_possible_values()
var/list/values = list()
values["Inoculated"] = icon('icons/obj/drinks.dmi', "bloodglass")
values["Outcast"] = icon('icons/obj/bloodpack.dmi', "generic_bloodpack")
return values
///list that stores a vampire house name for each department
GLOBAL_LIST_EMPTY(vampire_houses)
/datum/preference/choiced/vampire_status/apply_to_human(mob/living/carbon/human/target, value)
if(value != "Inoculated")
return
//find and setup the house (department) this vampire is joining
var/datum/job_department/vampire_house
var/datum/job/vampire_job = SSjob.GetJob(target.job)
if(!vampire_job) //no job or no mind LOSERS
return
var/list/valid_departments = (SSjob.joinable_departments.Copy()) - list(/datum/job_department/silicon, /datum/job_department/undefined)
for(var/datum/job_department/potential_house as anything in valid_departments)
if(vampire_job in potential_house.department_jobs)
vampire_house = potential_house
break
if(!vampire_house) //sillycones
return
if(!GLOB.vampire_houses[vampire_house.department_name])
GLOB.vampire_houses[vampire_house.department_name] = pick(GLOB.vampire_house_names)
var/house_name = GLOB.vampire_houses[vampire_house.department_name]
//modify name (Platos Syrup > Platos de Lioncourt)
var/first_space_index = findtextEx(target.real_name, " ")
var/new_name = copytext(target.real_name, 1, first_space_index + 1)
new_name += house_name
target.fully_replace_character_name(target.real_name, new_name)