diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index b6945b2c07..eb661b2c7c 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -94,6 +94,10 @@ else return 0 + for(var/modifier_type in R.genetic_modifiers) //Can't be cloned, even if they had a previous scan + if(istype(modifier_type, /datum/modifier/no_clone)) + return 0 + attempting = 1 //One at a time!! locked = 1 @@ -516,32 +520,4 @@ /* EMP grenade/spell effect if(istype(A, /obj/machinery/clonepod)) A:malfunction() -*/ - -/* - * Modifier applied to newly cloned people. - */ - -// Gives rather nasty downsides for awhile, making them less robust. -/datum/modifier/recently_cloned - name = "recently cloned" - desc = "You feel rather weak, having been cloned awhile ago." - - on_created_text = "You feel really weak." - on_expired_text = "You feel your strength returning to you." - - max_health_percent = 0.6 // -40% max health. - incoming_damage_percent = 1.1 // 10% more incoming damage. - outgoing_melee_damage_percent = 0.7 // 30% less melee damage. - disable_duration_percent = 1.25 // Stuns last 25% longer. - slowdown = 1 // Slower. - evasion = -1 // 15% easier to hit. - -// Does nothing. -/datum/modifier/cloned - name = "cloned" - desc = "You died and were cloned, and you can never forget that." - - flags = MODIFIER_GENETIC // So it gets copied if they die and get cloned again. - stacks = MODIFIER_STACK_ALLOWED // Two deaths means two instances of this. - +*/ \ No newline at end of file diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index 668520eee5..0bd354b541 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -316,6 +316,10 @@ if (subject.species && subject.species.flags & NO_SCAN) scantemp = "Error: Mental interface failure." return + for(var/modifier_type in subject.modifiers) //Can't be cloned, even if they had a previous scan + if(istype(modifier_type, /datum/modifier/no_clone)) + scantemp = "Error: Mental interface failure." + return if (!isnull(find_record(subject.ckey))) scantemp = "Subject already in database." return diff --git a/code/modules/mob/_modifiers/cloning.dm b/code/modules/mob/_modifiers/cloning.dm new file mode 100644 index 0000000000..71b4c8b305 --- /dev/null +++ b/code/modules/mob/_modifiers/cloning.dm @@ -0,0 +1,37 @@ +/* + * Modifier applied to newly cloned people. + */ + +// Gives rather nasty downsides for awhile, making them less robust. +/datum/modifier/recently_cloned + name = "recently cloned" + desc = "You feel rather weak, having been cloned awhile ago." + + on_created_text = "You feel really weak." + on_expired_text = "You feel your strength returning to you." + + max_health_percent = 0.6 // -40% max health. + incoming_damage_percent = 1.1 // 10% more incoming damage. + outgoing_melee_damage_percent = 0.7 // 30% less melee damage. + disable_duration_percent = 1.25 // Stuns last 25% longer. + slowdown = 1 // Slower. + evasion = -1 // 15% easier to hit. + +// Tracks number of deaths, one modifier added per cloning +/datum/modifier/cloned + name = "cloned" + desc = "You died and were cloned, and you can never forget that." + + flags = MODIFIER_GENETIC // So it gets copied if they die and get cloned again. + stacks = MODIFIER_STACK_ALLOWED // Two deaths means two instances of this. + +// Prevents cloning, actual effect is on the cloning machine +/datum/modifier/no_clone + name = "Cloning Incompatability" + desc = "For whatever reason, you cannot be cloned." + + //WIP, but these may never be seen anyway, so *shrug + on_created_text = "Life suddenly feels more precious." + on_expired_text = "Death is cheap again." + + flags = MODIFIER_GENETIC \ No newline at end of file diff --git a/code/modules/mob/modifiers.dm b/code/modules/mob/_modifiers/modifiers.dm similarity index 100% rename from code/modules/mob/modifiers.dm rename to code/modules/mob/_modifiers/modifiers.dm diff --git a/code/modules/mob/_modifiers/traits.dm b/code/modules/mob/_modifiers/traits.dm new file mode 100644 index 0000000000..1ee7b41090 --- /dev/null +++ b/code/modules/mob/_modifiers/traits.dm @@ -0,0 +1,10 @@ +/datum/modifier/frail + name = "frail" + desc = "You are more delicate than the average person." + + flags = MODIFIER_GENETIC + + on_created_text = "You feel really weak." + on_expired_text = "You feel your strength returning to you." + + max_health_percent = 0.9 \ No newline at end of file diff --git a/polaris.dme b/polaris.dme index 3cec695f70..e5466e3f38 100644 --- a/polaris.dme +++ b/polaris.dme @@ -1554,11 +1554,13 @@ #include "code\modules\mob\mob_helpers.dm" #include "code\modules\mob\mob_movement.dm" #include "code\modules\mob\mob_transformation_simple.dm" -#include "code\modules\mob\modifiers.dm" #include "code\modules\mob\say.dm" #include "code\modules\mob\transform_procs.dm" #include "code\modules\mob\typing_indicator.dm" #include "code\modules\mob\update_icons.dm" +#include "code\modules\mob\_modifiers\cloning.dm" +#include "code\modules\mob\_modifiers\modifiers.dm" +#include "code\modules\mob\_modifiers\traits.dm" #include "code\modules\mob\dead\death.dm" #include "code\modules\mob\dead\observer\login.dm" #include "code\modules\mob\dead\observer\logout.dm"