[MODULAR] Adds the option for missing a limb to the prosthetics menu (#22097)

* augment

* Update tgstation.dme

* sec restriction

* Update _job.dm

* revert

* Update _job.dm

* Update modular_skyrat/modules/customization/modules/surgery/bodyparts/parts.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Update _job.dm

* Update limbs.dm

* add early return, no icon to set

* Update new_player.dm

* restrict sec from augment

* Update modular_skyrat/modules/customization/modules/jobs/_job.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* command restriction

---------

Co-authored-by: BluBerry016 <50649185+unit0016@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
Co-authored-by: Bloop <vinylspiders@gmail.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
This commit is contained in:
lessthanthree
2023-09-15 09:51:25 -07:00
committed by GitHub
parent e0f485b06c
commit 11b681dc61
7 changed files with 103 additions and 3 deletions
+4
View File
@@ -4,6 +4,7 @@
#define JOB_UNAVAILABLE_SPECIES (JOB_UNAVAILABLE_QUIRK + 1)
#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 SEC_RESTRICTED_QUIRKS "Blind" = TRUE, "Brain Tumor" = TRUE, "Deaf" = TRUE, "Paraplegic" = TRUE, "Hemiplegic" = TRUE, "Mute" = TRUE, "Foreigner" = TRUE, "Pacifist" = TRUE, "Chunky Fingers" = TRUE, "No Guns" = TRUE, "Illiterate" = TRUE, "Nerve Stapled" = TRUE
#define HEAD_RESTRICTED_QUIRKS "Blind" = TRUE, "Deaf" = TRUE, "Mute" = TRUE, "Foreigner" = TRUE, "Chunky Fingers" = TRUE, "Brain Tumor" = TRUE, "Illiterate" = TRUE
@@ -11,3 +12,6 @@
#define GUARD_RESTRICTED_QUIRKS "Blind" = TRUE, "Deaf" = TRUE, "Foreigner" = TRUE, "Pacifist" = TRUE, "Nerve Stapled" = TRUE
#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
+4
View File
@@ -961,6 +961,10 @@ SUBSYSTEM_DEF(job)
JobDebug("[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_banned_augment(player.client.prefs))
JobDebug("[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
@@ -125,13 +125,15 @@
if(JOB_NOT_VETERAN)
return "You need to be veteran to join as [jobtitle]."
if(JOB_UNAVAILABLE_QUIRK)
return "[jobtitle] is restricted from your quirks."
return "[jobtitle] is restricted due to your selected quirks."
if(JOB_UNAVAILABLE_LANGUAGE)
return "[jobtitle] is restricted from your languages."
return "[jobtitle] is restricted due to your selected languages."
if(JOB_UNAVAILABLE_SPECIES)
return "[jobtitle] is restricted from your species."
return "[jobtitle] is restricted due to your selected species."
if(JOB_UNAVAILABLE_FLAVOUR)
return "[jobtitle] requires you to have flavour text for your character."
if(JOB_UNAVAILABLE_AUGMENT)
return "[jobtitle] is restricted due to your selected body augments."
//SKYRAT EDIT END
if(JOB_UNAVAILABLE_ANTAG_INCOMPAT)
return "[jobtitle] is not compatible with some antagonist role assigned to you."
@@ -67,6 +67,12 @@
path = /obj/item/bodypart/arm/left/plasmaman
uses_robotic_styles = FALSE
/datum/augment_item/limb/l_arm/self_destruct
name = "No Left Arm"
path = /obj/item/bodypart/arm/left/self_destruct
cost = -3
uses_robotic_styles = FALSE
//RIGHT ARMS
/datum/augment_item/limb/r_arm
slot = AUGMENT_SLOT_R_ARM
@@ -85,6 +91,12 @@
path = /obj/item/bodypart/arm/right/plasmaman
uses_robotic_styles = FALSE
/datum/augment_item/limb/r_arm/self_destruct
name = "No Right Arm"
path = /obj/item/bodypart/arm/right/self_destruct
cost = -3
uses_robotic_styles = FALSE
//LEFT LEGS
/datum/augment_item/limb/l_leg
slot = AUGMENT_SLOT_L_LEG
@@ -103,6 +115,12 @@
path = /obj/item/bodypart/leg/left/plasmaman
uses_robotic_styles = FALSE
/datum/augment_item/limb/l_leg/self_destruct
name = "No Left Leg"
path = /obj/item/bodypart/leg/left/self_destruct
cost = -3
uses_robotic_styles = FALSE
//RIGHT LEGS
/datum/augment_item/limb/r_leg
slot = AUGMENT_SLOT_R_LEG
@@ -120,3 +138,9 @@
name = "Plasmaman right leg"
path = /obj/item/bodypart/leg/right/plasmaman
uses_robotic_styles = FALSE
/datum/augment_item/limb/r_leg/self_destruct
name = "No Right Leg"
path = /obj/item/bodypart/leg/right/self_destruct
cost = -3
uses_robotic_styles = FALSE
@@ -5,6 +5,8 @@
var/loadout = TRUE
//List of banned quirks in their names(dont blame me, that's how they're stored), players can't join as the job if they have the quirk. Associative for the purposes of performance
var/list/banned_quirks
/// List of banned augments
var/list/banned_augments
///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
@@ -41,6 +43,20 @@
return TRUE
return FALSE
/datum/job/proc/has_banned_augment(datum/preferences/pref)
if(!pref)
return FALSE
if(!banned_augments)
return FALSE
var/list/player_augments = pref.augments
for(var/key in player_augments)
if(player_augments[key] in banned_augments)
return TRUE
return FALSE
// Misc
/datum/job/assistant
no_dresscode = TRUE
@@ -53,43 +69,56 @@
//Security
/datum/job/security_officer
banned_quirks = list(SEC_RESTRICTED_QUIRKS)
banned_augments = list(SEC_RESTRICTED_AUGMENTS)
/datum/job/detective
banned_quirks = list(SEC_RESTRICTED_QUIRKS)
banned_augments = list(SEC_RESTRICTED_AUGMENTS)
/datum/job/warden
banned_quirks = list(SEC_RESTRICTED_QUIRKS)
banned_augments = list(SEC_RESTRICTED_AUGMENTS)
/datum/job/blueshield
banned_quirks = list(SEC_RESTRICTED_QUIRKS)
banned_augments = list(SEC_RESTRICTED_AUGMENTS)
/datum/job/corrections_officer
banned_quirks = list(SEC_RESTRICTED_QUIRKS)
banned_augments = list(SEC_RESTRICTED_AUGMENTS)
// Command
/datum/job/captain
banned_quirks = list(HEAD_RESTRICTED_QUIRKS)
banned_augments = list(HEAD_RESTRICTED_AUGMENTS)
/datum/job/nanotrasen_consultant
banned_quirks = list(HEAD_RESTRICTED_QUIRKS)
banned_augments = list(HEAD_RESTRICTED_AUGMENTS)
/datum/job/head_of_security
banned_quirks = list(SEC_RESTRICTED_QUIRKS, HEAD_RESTRICTED_QUIRKS)
banned_augments = list(SEC_RESTRICTED_AUGMENTS)
/datum/job/chief_medical_officer
banned_quirks = list(HEAD_RESTRICTED_QUIRKS)
banned_augments = list(HEAD_RESTRICTED_AUGMENTS)
/datum/job/chief_engineer
banned_quirks = list(HEAD_RESTRICTED_QUIRKS, "Paraplegic" = TRUE)
banned_augments = list(HEAD_RESTRICTED_AUGMENTS)
/datum/job/research_director
banned_quirks = list(HEAD_RESTRICTED_QUIRKS)
banned_augments = list(HEAD_RESTRICTED_AUGMENTS)
/datum/job/head_of_personnel
banned_quirks = list(HEAD_RESTRICTED_QUIRKS)
banned_augments = list(HEAD_RESTRICTED_AUGMENTS)
/datum/job/quartermaster
banned_quirks = list(HEAD_RESTRICTED_QUIRKS)
banned_augments = list(HEAD_RESTRICTED_AUGMENTS)
//Silicon
/datum/job/ai
@@ -147,12 +176,16 @@
// Nanotrasen Fleet
/datum/job/fleetmaster
banned_quirks = list(HEAD_RESTRICTED_QUIRKS)
banned_augments = list(HEAD_RESTRICTED_AUGMENTS)
/datum/job/operations_inspector
banned_quirks = list(HEAD_RESTRICTED_QUIRKS)
banned_augments = list(HEAD_RESTRICTED_AUGMENTS)
/datum/job/deck_crew
banned_quirks = list(HEAD_RESTRICTED_QUIRKS)
banned_augments = list(HEAD_RESTRICTED_AUGMENTS)
/datum/job/bridge_officer
banned_quirks = list(HEAD_RESTRICTED_QUIRKS)
banned_augments = list(HEAD_RESTRICTED_AUGMENTS)
@@ -0,0 +1,32 @@
/// Self Destructing Bodyparts, For Augmentation. I'm leaving out heads + chests as, while it would be cool for synths, I also don't want people to start the round unrevivable sans botany because they're dumb as heck. You know who and what you are.
/obj/item/bodypart/arm/left/self_destruct/try_attach_limb(mob/living/carbon/limb_owner, special)
. = ..()
drop_limb()
qdel(src)
/obj/item/bodypart/arm/left/self_destruct/set_icon_static(new_icon)
return
/obj/item/bodypart/arm/right/self_destruct/try_attach_limb(mob/living/carbon/limb_owner, special)
. = ..()
drop_limb()
qdel(src)
/obj/item/bodypart/arm/right/self_destruct/set_icon_static(new_icon)
return
/obj/item/bodypart/leg/left/self_destruct/try_attach_limb(mob/living/carbon/limb_owner, special)
. = ..()
drop_limb()
qdel(src)
/obj/item/bodypart/leg/left/self_destruct/set_icon_static(new_icon)
return
/obj/item/bodypart/leg/right/self_destruct/try_attach_limb(mob/living/carbon/limb_owner, special)
. = ..()
drop_limb()
qdel(src)
/obj/item/bodypart/leg/right/self_destruct/set_icon_static(new_icon)
return
+1
View File
@@ -6614,6 +6614,7 @@
#include "modular_skyrat\modules\customization\modules\reagents\chemistry\reagents\toxin_reagents.dm"
#include "modular_skyrat\modules\customization\modules\reagents\chemistry\recipes\medicine.dm"
#include "modular_skyrat\modules\customization\modules\surgery\bodyparts\_bodyparts.dm"
#include "modular_skyrat\modules\customization\modules\surgery\bodyparts\parts.dm"
#include "modular_skyrat\modules\customization\modules\surgery\bodyparts\robot_bodyparts.dm"
#include "modular_skyrat\modules\customization\modules\surgery\organs\cap.dm"
#include "modular_skyrat\modules\customization\modules\surgery\organs\ears.dm"