-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIRROR] Makes Bioware into Status Effects because they're just Statu…
…s Effects but their own datum (#1597) * Makes Bioware into Status Effects because they're just Status Effects but their own datum (#81989) - Refactors `/datum/bioware` -> `/datum/status_effect/bioware`. - Literally everything bioware datum does is done by the status effect API, including handing dupes / unique keys - Tallies all blackbox surgeries done rather than just nerve splicing * Makes Bioware into Status Effects because they're just Status Effects but their own datum --------- Co-authored-by: MrMelbert <[email protected]>
- Loading branch information
1 parent
9aba8d1
commit e146fcb
Showing
19 changed files
with
215 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* ## Bioware status effect | ||
* | ||
* Simple holder status effects that grants the owner mob basic buffs | ||
*/ | ||
/datum/status_effect/bioware | ||
id = "bioware" | ||
alert_type = null | ||
duration = -1 | ||
tick_interval = -1 | ||
|
||
/datum/status_effect/bioware/on_apply() | ||
if(!ishuman(owner)) | ||
return FALSE | ||
|
||
bioware_gained() | ||
return TRUE | ||
|
||
/datum/status_effect/bioware/on_remove() | ||
bioware_lost() | ||
|
||
/// Called when applying to the mob. | ||
/datum/status_effect/bioware/proc/bioware_gained() | ||
return | ||
|
||
/// Called when removing from the mob. | ||
/datum/status_effect/bioware/proc/bioware_lost() | ||
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Bioware that affects the heart / circulatory system | ||
/datum/status_effect/bioware/heart | ||
id = "circulation" | ||
|
||
/// Muscled veins - Removes the need to have a heart | ||
/datum/status_effect/bioware/heart/muscled_veins | ||
|
||
/datum/status_effect/bioware/heart/muscled_veins/bioware_gained() | ||
ADD_TRAIT(owner, TRAIT_STABLEHEART, TRAIT_STATUS_EFFECT(id)) | ||
|
||
/datum/status_effect/bioware/heart/muscled_veins/bioware_lost() | ||
REMOVE_TRAIT(owner, TRAIT_STABLEHEART, TRAIT_STATUS_EFFECT(id)) | ||
|
||
/// Threaded veins - Bleed way less | ||
/datum/status_effect/bioware/heart/threaded_veins | ||
|
||
/datum/status_effect/bioware/heart/threaded_veins/bioware_gained() | ||
var/mob/living/carbon/human/human_owner = owner | ||
human_owner.physiology.bleed_mod *= 0.25 | ||
|
||
/datum/status_effect/bioware/heart/threaded_veins/bioware_lost() | ||
var/mob/living/carbon/human/human_owner = owner | ||
human_owner.physiology.bleed_mod *= 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Bioware that affects the brain | ||
/datum/status_effect/bioware/cortex | ||
id = "cortex" | ||
|
||
// Folded brain - Grants a bonus chance to getting special traumas via lobotomy | ||
/datum/status_effect/bioware/cortex/folded | ||
|
||
/datum/status_effect/bioware/cortex/folded/bioware_gained() | ||
ADD_TRAIT(owner, TRAIT_SPECIAL_TRAUMA_BOOST, TRAIT_STATUS_EFFECT(id)) | ||
|
||
/datum/status_effect/bioware/cortex/folded/bioware_lost() | ||
REMOVE_TRAIT(owner, TRAIT_SPECIAL_TRAUMA_BOOST, TRAIT_STATUS_EFFECT(id)) | ||
|
||
// Imprinted brain - Cures basic traumas continuously | ||
/datum/status_effect/bioware/cortex/imprinted | ||
tick_interval = 2 SECONDS | ||
|
||
/datum/status_effect/bioware/cortex/imprinted/tick(seconds_between_ticks) | ||
var/mob/living/carbon/human/human_owner = owner | ||
human_owner.cure_trauma_type(resilience = TRAUMA_RESILIENCE_BASIC) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Bioware that affects the player's limbs | ||
/datum/status_effect/bioware/ligaments | ||
id = "ligaments" | ||
|
||
// Hooked ligaments - Easier to dismember, but easier to reattach | ||
/datum/status_effect/bioware/ligaments/hooked | ||
|
||
/datum/status_effect/bioware/ligaments/hooked/bioware_gained() | ||
owner.add_traits(list(TRAIT_LIMBATTACHMENT, TRAIT_EASYDISMEMBER), TRAIT_STATUS_EFFECT(id)) | ||
|
||
/datum/status_effect/bioware/ligaments/hooked/bioware_lost() | ||
owner.remove_traits(list(TRAIT_LIMBATTACHMENT, TRAIT_EASYDISMEMBER), TRAIT_STATUS_EFFECT(id)) | ||
|
||
// Reinforced ligaments - Easier to break, but cannot be dismembered | ||
/datum/status_effect/bioware/ligaments/reinforced | ||
|
||
/datum/status_effect/bioware/ligaments/reinforced/bioware_gained() | ||
owner.add_traits(list(TRAIT_NODISMEMBER, TRAIT_EASILY_WOUNDED), TRAIT_STATUS_EFFECT(id)) | ||
|
||
/datum/status_effect/bioware/ligaments/reinforced/bioware_lost() | ||
owner.remove_traits(list(TRAIT_NODISMEMBER, TRAIT_EASILY_WOUNDED), TRAIT_STATUS_EFFECT(id)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Bioware that affects the CNS | ||
/datum/status_effect/bioware/nerves | ||
id = "nerves" | ||
|
||
// Grounded Nerves - Immunity to being zapped | ||
/datum/status_effect/bioware/nerves/grounded | ||
|
||
/datum/status_effect/bioware/nerves/grounded/bioware_gained() | ||
ADD_TRAIT(owner, TRAIT_SHOCKIMMUNE, TRAIT_STATUS_EFFECT(id)) | ||
|
||
/datum/status_effect/bioware/nerves/grounded/bioware_lost() | ||
REMOVE_TRAIT(owner, TRAIT_SHOCKIMMUNE, TRAIT_STATUS_EFFECT(id)) | ||
|
||
// Spliced Nerves - Reduced stun time and stamina damage taken | ||
/datum/status_effect/bioware/nerves/spliced | ||
|
||
/datum/status_effect/bioware/nerves/spliced/bioware_gained() | ||
var/mob/living/carbon/human/human_owner = owner | ||
human_owner.physiology.stun_mod *= 0.5 | ||
human_owner.physiology.stamina_mod *= 0.8 | ||
|
||
/datum/status_effect/bioware/nerves/spliced/bioware_lost() | ||
var/mob/living/carbon/human/human_owner = owner | ||
human_owner.physiology.stun_mod *= 2 | ||
human_owner.physiology.stamina_mod *= 1.25 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,29 @@ | ||
/datum/surgery/advanced/bioware | ||
name = "Enhancement surgery" | ||
var/bioware_target = BIOWARE_GENERIC | ||
/// What status effect is gained when the surgery is successful? | ||
/// Used to check against other bioware types to prevent stacking. | ||
var/status_effect_gained = /datum/status_effect/bioware | ||
|
||
/datum/surgery/advanced/bioware/can_start(mob/user, mob/living/carbon/human/target) | ||
if(!..()) | ||
return FALSE | ||
if(!istype(target)) | ||
return FALSE | ||
for(var/datum/bioware/bioware as anything in target.biowares) | ||
if(bioware.mod_type == bioware_target) | ||
return FALSE | ||
if(target.has_status_effect(status_effect_gained)) | ||
return FALSE | ||
return TRUE | ||
|
||
/datum/surgery_step/apply_bioware | ||
accept_hand = TRUE | ||
time = 12.5 SECONDS | ||
|
||
/datum/surgery_step/apply_bioware/success(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/advanced/bioware/surgery, default_display_results) | ||
. = ..() | ||
if(!.) | ||
return | ||
if(!istype(surgery)) | ||
return | ||
|
||
target.apply_status_effect(surgery.status_effect_gained) | ||
if(target.ckey) | ||
SSblackbox.record_feedback("tally", "bioware", 1, surgery.type) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.