mirror of
https://github.com/Sandstorm-Station/Sandstorm-Station-13.git
synced 2026-08-22 20:57:48 +01:00
[PORT] New quirk: DNC Order (#293)
* Port DNC quirt Ports the do-not-clone quirk from SPLURT. This change is not modular. - Added a fix for cloning heads and brains - Removed flavor text implications that the order was voluntary - Quirk renamed from `DNC` to `DNC Order` - Trait renamed from `TRAIT_NO_CLONE` to `TRAIT_DNC_ORDER` * Modularize cloning machine DNC check Moves the code for DNC Order quirk check in the cloning machine into modular space, and removes it from base code.
This commit is contained in:
@@ -6,3 +6,5 @@
|
||||
#define TRAIT_SHELTERED "sheltered"
|
||||
/// Define for the quirk "infertile", self explanatory. Please make this a preference on the Content Preferences Tab.
|
||||
#define TRAIT_INFERTILE "infertile"
|
||||
/// DNC trait, used to prevent cloning
|
||||
#define TRAIT_DNC_ORDER "dnc_order"
|
||||
|
||||
@@ -94,6 +94,10 @@
|
||||
C.dna.copy_dna(brainmob.stored_dna)
|
||||
if(HAS_TRAIT(L, TRAIT_NOCLONE))
|
||||
LAZYSET(brainmob.status_traits, TRAIT_NOCLONE, L.status_traits[TRAIT_NOCLONE])
|
||||
// Sandstorm edit: DNC Order quirk
|
||||
if(HAS_TRAIT(L, TRAIT_DNC_ORDER))
|
||||
LAZYSET(brainmob.status_traits, TRAIT_DNC_ORDER, L.status_traits[TRAIT_DNC_ORDER])
|
||||
// End Sandstorm edit
|
||||
var/obj/item/organ/zombie_infection/ZI = L.getorganslot(ORGAN_SLOT_ZOMBIE)
|
||||
if(ZI)
|
||||
brainmob.set_species(ZI.old_species) //For if the brain is cloned
|
||||
|
||||
@@ -15,3 +15,10 @@
|
||||
/datum/quirk/sheltered/remove() //i mean, the lose text explains it, so i'm making it actually work
|
||||
var/mob/living/carbon/human/H = quirk_holder
|
||||
H.grant_language(/datum/language/common)
|
||||
|
||||
/datum/quirk/dnc_order
|
||||
name = "DNC Order"
|
||||
desc = "You have a Do Not Clone order on your record, stating that you may not be cloned. You can still be revived by other means."
|
||||
value = -2
|
||||
mob_trait = TRAIT_DNC_ORDER
|
||||
medical_record_text = "Patient has a DNC (Do Not Clone) order and will be rejected by cloning mechanisms as a result."
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
// Proc for scanning a mob in a cloning machine
|
||||
/obj/machinery/computer/cloning/can_scan(datum/dna/dna, mob/living/mob_occupant, experimental = FALSE, datum/bank_account/account)
|
||||
// Check for DNC Order quirk
|
||||
if(HAS_TRAIT(mob_occupant, TRAIT_DNC_ORDER))
|
||||
// Set scan failure reason
|
||||
scantemp = "Subject has an active DNC order on file. Further operations terminated."
|
||||
|
||||
// Play error sound
|
||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
||||
|
||||
// Return without scanning
|
||||
return
|
||||
|
||||
// Return normally
|
||||
. = ..()
|
||||
@@ -3965,6 +3965,7 @@
|
||||
#include "modular_sand\code\game\machinery\cryopod.dm"
|
||||
#include "modular_sand\code\game\machinery\cryptominers.dm"
|
||||
#include "modular_sand\code\game\machinery\Sleeper.dm"
|
||||
#include "modular_sand\code\game\machinery\computer\cloning.dm"
|
||||
#include "modular_sand\code\game\machinery\computer\arcade\tetris.dm"
|
||||
#include "modular_sand\code\game\machinery\pipe\construction.dm"
|
||||
#include "modular_sand\code\game\machinery\telecomms\machine_interactions.dm"
|
||||
|
||||
Reference in New Issue
Block a user