mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
Allow command to have missing limbs on roundstart. (#4311)
## About The Pull Request As the code currently is, if any missing limb is selected, command is locked. This PR adjusts the logic so that command is locked only if both arms are missing. ## Why It's Good For The Game Disabled captains and other heads of staff offer more character creation and roleplay opportunities. This change removes such logic discrepancies such as a paraplegic captain being fine bug a legless captain being disallowed. Crew with one hand are still very capable and do not need to be blocked from command roles. ## Proof Of Testing Code compiles with 0 errors, 0 warnings. Tested locally and working as expected. <details> <summary>Screenshots/Videos</summary> </details> ## Changelog 🆑 balance: Heads of staff are free to be missing as many roundstart limbs as they want, as long as they have at least one hand. /🆑
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#define JOB_UNAVAILABLE_LANGUAGE (JOB_UNAVAILABLE_SPECIES + 1)
|
||||
#define JOB_UNAVAILABLE_FLAVOUR (JOB_UNAVAILABLE_LANGUAGE + 1)
|
||||
#define JOB_UNAVAILABLE_AUGMENT (JOB_UNAVAILABLE_FLAVOUR + 1)
|
||||
#define JOB_UNAVAILABLE_NOHANDS (JOB_UNAVAILABLE_AUGMENT + 1)
|
||||
|
||||
#define SEC_RESTRICTED_QUIRKS "Blind" = TRUE, "Brain Tumor" = TRUE, "Deaf" = TRUE, "Paraplegic" = TRUE, "Hemiplegic" = TRUE, "Mute" = TRUE, "Foreigner" = TRUE, "Pacifist" = TRUE, "No Guns" = TRUE, "Illiterate" = TRUE, "Nerve Stapled" = TRUE
|
||||
//#define HEAD_RESTRICTED_QUIRKS "Blind" = TRUE, "Deaf" = TRUE, "Mute" = TRUE, "Foreigner" = TRUE, "Brain Tumor" = TRUE, "Illiterate" = TRUE //Bubberstation edit original
|
||||
@@ -12,5 +13,4 @@
|
||||
|
||||
#define RESTRICTED_QUIRKS_EXCEPTIONS list("Mute" = "Signer")
|
||||
|
||||
#define HEAD_RESTRICTED_AUGMENTS /obj/item/bodypart/arm/left/self_destruct, /obj/item/bodypart/arm/right/self_destruct, /obj/item/bodypart/leg/left/self_destruct, /obj/item/bodypart/leg/right/self_destruct
|
||||
#define SEC_RESTRICTED_AUGMENTS /obj/item/bodypart/arm/left/self_destruct, /obj/item/bodypart/arm/right/self_destruct, /obj/item/bodypart/leg/left/self_destruct, /obj/item/bodypart/leg/right/self_destruct
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#define RECORDS_TEXT_CHAR_REQUIREMENT 15
|
||||
#define JOB_UNAVAILABLE_FLAVOUR_SILICON (JOB_UNAVAILABLE_AUGMENT + 1)
|
||||
#define JOB_UNAVAILABLE_FLAVOUR_SILICON (JOB_UNAVAILABLE_NOHANDS + 1)
|
||||
//A proc to determine if a job is a silicon job.
|
||||
#define is_silicon_job(A) (istype(A, /datum/job/ai) || istype(A, /datum/job/cyborg))
|
||||
|
||||
|
||||
@@ -1004,11 +1004,14 @@ SUBSYSTEM_DEF(job)
|
||||
job_debug("[debug_prefix] Error: [get_job_unavailable_error_message(JOB_UNAVAILABLE_FLAVOUR)], Player: [player][add_job_to_log ? ", Job: [possible_job]" : ""]")
|
||||
return JOB_UNAVAILABLE_FLAVOUR
|
||||
|
||||
if (!possible_job.has_enough_hands(player.client.prefs))
|
||||
job_debug("[debug_prefix] Error: [get_job_unavailable_error_message(JOB_UNAVAILABLE_NOHANDS)], Player: [player][add_job_to_log ? ", Job: [possible_job]" : ""]")
|
||||
return JOB_UNAVAILABLE_NOHANDS
|
||||
|
||||
if(possible_job.has_banned_augment(player.client.prefs))
|
||||
job_debug("[debug_prefix] Error: [get_job_unavailable_error_message(JOB_UNAVAILABLE_AUGMENT)], Player: [player][add_job_to_log ? ", Job: [possible_job]" : ""]")
|
||||
return JOB_UNAVAILABLE_AUGMENT
|
||||
|
||||
|
||||
//SKYRAT EDIT END
|
||||
|
||||
|
||||
|
||||
@@ -138,6 +138,8 @@
|
||||
//BUBBER EDIT END: Silicon flavor text
|
||||
if(JOB_UNAVAILABLE_AUGMENT)
|
||||
return "[jobtitle] is restricted due to your selected body augments."
|
||||
if(JOB_UNAVAILABLE_NOHANDS)
|
||||
return "[jobtitle] requires at least one hand."
|
||||
//SKYRAT EDIT END
|
||||
if(JOB_UNAVAILABLE_ANTAG_INCOMPAT)
|
||||
return "[jobtitle] is not compatible with some antagonist role assigned to you."
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
var/list/banned_quirks
|
||||
/// List of banned augments
|
||||
var/list/banned_augments
|
||||
/// Whether or not a hand is required
|
||||
var/is_hand_required = FALSE
|
||||
///A list of slots that can't have loadout items assigned to them if no_dresscode is applied, used for important items such as ID, PDA, backpack and headset
|
||||
var/list/blacklist_dresscode_slots
|
||||
//Whitelist of allowed species for this job. If not specified then all roundstart races can be used. Associative with TRUE
|
||||
@@ -53,6 +55,19 @@
|
||||
|
||||
return FALSE
|
||||
|
||||
/datum/job/proc/has_enough_hands(datum/preferences/pref)
|
||||
if(!pref)
|
||||
return TRUE
|
||||
|
||||
var/list/player_augments = pref.augments
|
||||
var/is_missing_left_arm = player_augments["Left Arm"] == /obj/item/bodypart/arm/left/self_destruct
|
||||
var/is_missing_right_arm = player_augments["Right Arm"] == /obj/item/bodypart/arm/right/self_destruct
|
||||
|
||||
if(is_hand_required && is_missing_left_arm && is_missing_right_arm)
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
// Misc
|
||||
/datum/job/assistant
|
||||
no_dresscode = TRUE
|
||||
@@ -66,55 +81,61 @@
|
||||
/datum/job/security_officer
|
||||
banned_quirks = list(SEC_RESTRICTED_QUIRKS)
|
||||
banned_augments = list(SEC_RESTRICTED_AUGMENTS)
|
||||
is_hand_required = TRUE
|
||||
|
||||
/datum/job/detective
|
||||
banned_quirks = list(SEC_RESTRICTED_QUIRKS)
|
||||
banned_augments = list(SEC_RESTRICTED_AUGMENTS)
|
||||
is_hand_required = TRUE
|
||||
|
||||
/datum/job/warden
|
||||
banned_quirks = list(SEC_RESTRICTED_QUIRKS)
|
||||
banned_augments = list(SEC_RESTRICTED_AUGMENTS)
|
||||
is_hand_required = TRUE
|
||||
|
||||
/datum/job/blueshield
|
||||
banned_quirks = list(SEC_RESTRICTED_QUIRKS)
|
||||
banned_augments = list(SEC_RESTRICTED_AUGMENTS)
|
||||
is_hand_required = TRUE
|
||||
|
||||
/datum/job/corrections_officer
|
||||
banned_quirks = list(SEC_RESTRICTED_QUIRKS)
|
||||
banned_augments = list(SEC_RESTRICTED_AUGMENTS)
|
||||
is_hand_required = TRUE
|
||||
|
||||
// Command
|
||||
/datum/job/captain
|
||||
banned_quirks = list(HEAD_RESTRICTED_QUIRKS)
|
||||
banned_augments = list(HEAD_RESTRICTED_AUGMENTS)
|
||||
is_hand_required = TRUE
|
||||
|
||||
/datum/job/nanotrasen_consultant
|
||||
banned_quirks = list(HEAD_RESTRICTED_QUIRKS)
|
||||
banned_augments = list(HEAD_RESTRICTED_AUGMENTS)
|
||||
is_hand_required = TRUE
|
||||
|
||||
/datum/job/head_of_security
|
||||
banned_quirks = list(SEC_RESTRICTED_QUIRKS, HEAD_RESTRICTED_QUIRKS)
|
||||
banned_augments = list(SEC_RESTRICTED_AUGMENTS)
|
||||
is_hand_required = TRUE
|
||||
|
||||
/datum/job/chief_medical_officer
|
||||
banned_quirks = list(HEAD_RESTRICTED_QUIRKS)
|
||||
banned_augments = list(HEAD_RESTRICTED_AUGMENTS)
|
||||
is_hand_required = TRUE
|
||||
|
||||
/datum/job/chief_engineer
|
||||
banned_quirks = list(HEAD_RESTRICTED_QUIRKS, "Paraplegic" = TRUE)
|
||||
banned_augments = list(HEAD_RESTRICTED_AUGMENTS)
|
||||
is_hand_required = TRUE
|
||||
|
||||
/datum/job/research_director
|
||||
banned_quirks = list(HEAD_RESTRICTED_QUIRKS)
|
||||
banned_augments = list(HEAD_RESTRICTED_AUGMENTS)
|
||||
is_hand_required = TRUE
|
||||
|
||||
/datum/job/head_of_personnel
|
||||
banned_quirks = list(HEAD_RESTRICTED_QUIRKS)
|
||||
banned_augments = list(HEAD_RESTRICTED_AUGMENTS)
|
||||
is_hand_required = TRUE
|
||||
|
||||
/datum/job/quartermaster
|
||||
banned_quirks = list(HEAD_RESTRICTED_QUIRKS)
|
||||
banned_augments = list(HEAD_RESTRICTED_AUGMENTS)
|
||||
is_hand_required = TRUE
|
||||
|
||||
//Silicon
|
||||
/datum/job/ai
|
||||
@@ -239,16 +260,16 @@
|
||||
// Nanotrasen Fleet
|
||||
/datum/job/fleetmaster
|
||||
banned_quirks = list(HEAD_RESTRICTED_QUIRKS)
|
||||
banned_augments = list(HEAD_RESTRICTED_AUGMENTS)
|
||||
is_hand_required = TRUE
|
||||
|
||||
/datum/job/operations_inspector
|
||||
banned_quirks = list(HEAD_RESTRICTED_QUIRKS)
|
||||
banned_augments = list(HEAD_RESTRICTED_AUGMENTS)
|
||||
is_hand_required = TRUE
|
||||
|
||||
/datum/job/deck_crew
|
||||
banned_quirks = list(HEAD_RESTRICTED_QUIRKS)
|
||||
banned_augments = list(HEAD_RESTRICTED_AUGMENTS)
|
||||
is_hand_required = TRUE
|
||||
|
||||
/datum/job/bridge_officer
|
||||
banned_quirks = list(HEAD_RESTRICTED_QUIRKS)
|
||||
banned_augments = list(HEAD_RESTRICTED_AUGMENTS)
|
||||
is_hand_required = TRUE
|
||||
|
||||
Reference in New Issue
Block a user