mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 13:05:44 +01:00
Origin Trait Changes + Vaurca Language Traits (#18912)
Origin traits, as well as species natural armor, will correctly remove themselves when culture/origin/species is changed. Vaurca primary language processors (K'lax Sinta'Unathi and C'thur Nral'malic) are now culture traits rather than loadout items. This means that they can be added/removed from ghostroles automatically without having to copypaste the same code 200 times. Secondary language processors (Sinta'Azaziba, Freespeak, Tradeband) have stayed as loadout items as some of them do not have distinct cultures or origins they can be added to.
This commit is contained in:
@@ -21,15 +21,25 @@
|
||||
for(var/trait in origin_traits)
|
||||
ADD_TRAIT(H, trait, CULTURE_TRAIT)
|
||||
|
||||
/singleton/origin_item/proc/on_remove(var/mob/living/carbon/human/H)
|
||||
for(var/trait in origin_traits)
|
||||
REMOVE_TRAIT(H, trait, CULTURE_TRAIT)
|
||||
|
||||
/mob/living/carbon/human/proc/set_culture(var/singleton/origin_item/OI)
|
||||
var/singleton/origin_item/culture/old_culture = culture
|
||||
if(!istype(OI))
|
||||
crash_with("Invalid culture supplied: [OI]!")
|
||||
culture = OI
|
||||
if(old_culture && culture != old_culture)
|
||||
old_culture.on_remove(src)
|
||||
OI.on_apply(src)
|
||||
|
||||
/mob/living/carbon/human/proc/set_origin(var/singleton/origin_item/OI)
|
||||
var/singleton/origin_item/origin/old_origin = origin
|
||||
if(!istype(OI))
|
||||
crash_with("Invalid origin supplied: [OI]!")
|
||||
origin = OI
|
||||
if(old_origin && origin != old_origin)
|
||||
old_origin.on_remove(src)
|
||||
OI.on_apply(src)
|
||||
|
||||
|
||||
@@ -65,8 +65,14 @@
|
||||
origin_traits_descriptions = list("have a small resistance to radiation", "are more sensitive to bright lights")
|
||||
|
||||
/singleton/origin_item/origin/gadpathur/on_apply(var/mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
H.AddComponent(/datum/component/armor, list(rad = ARMOR_RAD_MINOR))
|
||||
|
||||
/singleton/origin_item/origin/gadpathur/on_remove(mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
var/datum/component/armor/armor_component = H.GetComponent(/datum/component/armor)
|
||||
armor_component.RemoveComponent()
|
||||
|
||||
/singleton/origin_item/origin/gadpathur_exile
|
||||
name = "Gadpathurian Exile"
|
||||
desc = "As an exile from Gadpathur you are, above all other things, a failure. A failure to meet the standards of Gadpathurian society found unworthy of defending it from the Solarian imperialists. You are a weakness that the planet and its people cannot afford to keep around, lest you compromise its defense. Stripped over everything that makes you Gadpathurian and cast aside to the Republic of Biesel or Coalition of Colonies, it is now up to you -- and you alone -- to make something of yourself despite your status as a failure. The one certainty is that your home will not take you back, no matter what you do."
|
||||
@@ -77,8 +83,14 @@
|
||||
origin_traits_descriptions = list("have a small resistance to radiation", "are more sensitive to bright lights")
|
||||
|
||||
/singleton/origin_item/origin/gadpathur_exile/on_apply(var/mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
H.AddComponent(/datum/component/armor, list(rad = ARMOR_RAD_MINOR))
|
||||
|
||||
/singleton/origin_item/origin/gadpathur_exile/on_remove(mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
var/datum/component/armor/armor_component = H.GetComponent(/datum/component/armor)
|
||||
armor_component.RemoveComponent()
|
||||
|
||||
/singleton/origin_item/origin/assunzione
|
||||
name = "Republic of Assunzione"
|
||||
desc = "One of the most remote planets colonized by humanity, the Republic of Assunzione is widely known for its lack of a functional sun - which burnt out mysteriously shortly after the planet was colonized - and its unusual native faith, Luceism. Luceism itself is an offshoot of traditional Abrahamic faiths and is centered around the worship of Ennoia, an abstract representation of light. Assunzionii society is quite insular and is centered around the planet's faith, with an overwhelming majority of the planet's residents adhering to Luceism."
|
||||
|
||||
@@ -13,5 +13,11 @@
|
||||
possible_religions = list(RELIGION_THAKH, RELIGION_SKAKH, RELIGION_SIAKH, RELIGION_OTHER, RELIGION_NONE)
|
||||
origin_traits_descriptions = list("have a small resistance to radiation") //they live in the wasteland
|
||||
|
||||
/singleton/origin_item/origin/wastelander/on_apply(var/mob/living/carbon/human/H)
|
||||
/singleton/origin_item/origin/queendom/on_apply(var/mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
H.AddComponent(/datum/component/armor, list(rad = ARMOR_RAD_MINOR))
|
||||
|
||||
/singleton/origin_item/origin/queendom/on_remove(mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
var/datum/component/armor/armor_component = H.GetComponent(/datum/component/armor)
|
||||
armor_component.RemoveComponent()
|
||||
|
||||
@@ -63,4 +63,10 @@
|
||||
origin_traits_descriptions = list("have a small resistance to radiation")
|
||||
|
||||
/singleton/origin_item/origin/wastelander/on_apply(var/mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
H.AddComponent(/datum/component/armor, list(rad = ARMOR_RAD_MINOR))
|
||||
|
||||
/singleton/origin_item/origin/wastelander/on_remove(mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
var/datum/component/armor/armor_component = H.GetComponent(/datum/component/armor)
|
||||
armor_component.RemoveComponent()
|
||||
|
||||
@@ -6,6 +6,20 @@
|
||||
/singleton/origin_item/origin/mouv_b,
|
||||
/singleton/origin_item/origin/vytel_b
|
||||
)
|
||||
origin_traits_descriptions = list("can speak Nral'malic")
|
||||
|
||||
/singleton/origin_item/culture/cthur_breeder/on_apply(mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
var/obj/item/organ/A = new /obj/item/organ/internal/augment/language/cthur(H)
|
||||
var/obj/item/organ/external/affected = H.get_organ(A.parent_organ)
|
||||
A.replaced(H, affected)
|
||||
|
||||
/singleton/origin_item/culture/cthur_breeder/on_remove(mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
var/obj/item/organ/internal/augment/language/cthur/A = locate() in H.internal_organs
|
||||
if(istype(A))
|
||||
A.removed(H)
|
||||
qdel(A)
|
||||
|
||||
/singleton/origin_item/origin/cthur_b
|
||||
name = "C'thur Brood"
|
||||
|
||||
@@ -1,12 +1,26 @@
|
||||
/singleton/origin_item/culture/klax_breeder
|
||||
name = "K'lax Hive"
|
||||
desc = "The new High Queen of the K'lax, the Zkaii Brood is often mocked for their eccentric Mother Dream religion. Many still remain within Tret and other Izweski territories."
|
||||
desc = "Known as 'The Deceivers', it was the second Hive discovered by humanity after their Hiveship, Klo'zxera, appeared in the Unathi system of Uueoa-Esa. K'lax is known as a client state of the Zo'ra, but since the Exodus from Sedantis they have struggled for political independence. Now parting their own ways, both Hives have developed differently. "
|
||||
possible_origins = list(
|
||||
/singleton/origin_item/origin/zkaii_b,
|
||||
/singleton/origin_item/origin/leto_b,
|
||||
/singleton/origin_item/origin/vedhra_b,
|
||||
/singleton/origin_item/origin/tupii_b
|
||||
)
|
||||
origin_traits_descriptions = list("can speak Sinta'Unathi")
|
||||
|
||||
/singleton/origin_item/culture/klax_breeder/on_apply(mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
var/obj/item/organ/A = new /obj/item/organ/internal/augment/language/klax(H)
|
||||
var/obj/item/organ/external/affected = H.get_organ(A.parent_organ)
|
||||
A.replaced(H, affected)
|
||||
|
||||
/singleton/origin_item/culture/klax_breeder/on_remove(mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
var/obj/item/organ/internal/augment/language/klax/A = locate() in H.internal_organs
|
||||
if(istype(A))
|
||||
A.removed(H)
|
||||
qdel(A)
|
||||
|
||||
/singleton/origin_item/origin/zkaii_b
|
||||
name = "Zkaii Brood"
|
||||
|
||||
@@ -8,6 +8,20 @@
|
||||
/singleton/origin_item/origin/xetl,
|
||||
/singleton/origin_item/origin/klatxatl
|
||||
)
|
||||
origin_traits_descriptions = list("can speak Nral'malic")
|
||||
|
||||
/singleton/origin_item/culture/cthur/on_apply(mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
var/obj/item/organ/A = new /obj/item/organ/internal/augment/language/cthur(H)
|
||||
var/obj/item/organ/external/affected = H.get_organ(A.parent_organ)
|
||||
A.replaced(H, affected)
|
||||
|
||||
/singleton/origin_item/culture/cthur/on_remove(mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
var/obj/item/organ/internal/augment/language/cthur/A = locate() in H.internal_organs
|
||||
if(istype(A))
|
||||
A.removed(H)
|
||||
qdel(A)
|
||||
|
||||
/singleton/origin_item/origin/cthur
|
||||
name = "C'thur Brood"
|
||||
|
||||
@@ -10,6 +10,20 @@
|
||||
/singleton/origin_item/origin/mikuetz,
|
||||
/singleton/origin_item/origin/queenless_klax
|
||||
)
|
||||
origin_traits_descriptions = list("can speak Sinta'Unathi")
|
||||
|
||||
/singleton/origin_item/culture/klax/on_apply(mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
var/obj/item/organ/A = new /obj/item/organ/internal/augment/language/klax(H)
|
||||
var/obj/item/organ/external/affected = H.get_organ(A.parent_organ)
|
||||
A.replaced(H, affected)
|
||||
|
||||
/singleton/origin_item/culture/klax/on_remove(mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
var/obj/item/organ/internal/augment/language/klax/A = locate() in H.internal_organs
|
||||
if(istype(A))
|
||||
A.removed(H)
|
||||
qdel(A)
|
||||
|
||||
/singleton/origin_item/origin/zkaii
|
||||
name = "Zkaii Brood"
|
||||
|
||||
@@ -177,22 +177,6 @@
|
||||
sort_category = "Xenowear - Vaurca"
|
||||
flags = GEAR_HAS_NAME_SELECTION | GEAR_HAS_DESC_SELECTION | GEAR_HAS_COLOR_SELECTION | GEAR_HAS_ACCENT_COLOR_SELECTION
|
||||
|
||||
/datum/gear/augment/language_processor
|
||||
display_name = "language processor"
|
||||
description = "An augment that allows a vaurca to speak and understand a related language. These are only used by their respective Hives."
|
||||
path = /obj/item/organ/internal/augment/language/klax
|
||||
cost = 1
|
||||
sort_category = "Xenowear - Vaurca"
|
||||
whitelisted = list(SPECIES_VAURCA_WORKER, SPECIES_VAURCA_WARRIOR, SPECIES_VAURCA_BREEDER, SPECIES_VAURCA_BULWARK)
|
||||
flags = GEAR_NO_SELECTION
|
||||
|
||||
/datum/gear/augment/language_processor/New()
|
||||
..()
|
||||
var/list/language_processors = list()
|
||||
language_processors["K'laxan [LANGUAGE_UNATHI] language processor"] = /obj/item/organ/internal/augment/language/klax
|
||||
language_processors["C'thur [LANGUAGE_SKRELLIAN] language processor"] = /obj/item/organ/internal/augment/language/cthur
|
||||
gear_tweaks += new /datum/gear_tweak/path(language_processors)
|
||||
|
||||
/datum/gear/augment/auxiliary_processor
|
||||
display_name = "secondary language processor"
|
||||
description = "An augment that allows a vaurca to speak and understand a related language. These are only used by their respective groups, and act as an auxiliary to the hive's main language processor."
|
||||
|
||||
@@ -396,6 +396,10 @@
|
||||
if(H.bad_external_organs) H.bad_external_organs.Cut()
|
||||
if(H.bad_internal_organs) H.bad_internal_organs.Cut()
|
||||
|
||||
var/datum/component/armor/armor_component = H.GetComponent(/datum/component/armor)
|
||||
if(armor_component)
|
||||
armor_component.RemoveComponent()
|
||||
|
||||
H.organs = list()
|
||||
H.internal_organs = list()
|
||||
H.organs_by_name = list()
|
||||
|
||||
@@ -477,22 +477,27 @@
|
||||
/obj/item/organ/internal/augment/language/klax
|
||||
name = "K'laxan language processor"
|
||||
augment_languages = list(LANGUAGE_UNATHI)
|
||||
species_restricted = list(SPECIES_VAURCA_BREEDER, SPECIES_VAURCA_BULWARK, SPECIES_VAURCA_WARFORM, SPECIES_VAURCA_WARRIOR, SPECIES_VAURCA_WORKER)
|
||||
|
||||
/obj/item/organ/internal/augment/language/cthur
|
||||
name = "C'thur language processor"
|
||||
augment_languages = list(LANGUAGE_SKRELLIAN)
|
||||
species_restricted = list(SPECIES_VAURCA_BREEDER, SPECIES_VAURCA_BULWARK, SPECIES_VAURCA_WARFORM, SPECIES_VAURCA_WARRIOR, SPECIES_VAURCA_WORKER)
|
||||
|
||||
/obj/item/organ/internal/augment/language/mikuetz
|
||||
name = "Mi'kuetz language processor"
|
||||
augment_languages = list(LANGUAGE_AZAZIBA)
|
||||
species_restricted = list(SPECIES_VAURCA_BREEDER, SPECIES_VAURCA_BULWARK, SPECIES_VAURCA_WARFORM, SPECIES_VAURCA_WARRIOR, SPECIES_VAURCA_WORKER)
|
||||
|
||||
/obj/item/organ/internal/augment/language/zino
|
||||
name = "Zino language processor"
|
||||
augment_languages = list(LANGUAGE_GUTTER)
|
||||
species_restricted = list(SPECIES_VAURCA_BREEDER, SPECIES_VAURCA_BULWARK, SPECIES_VAURCA_WARFORM, SPECIES_VAURCA_WARRIOR, SPECIES_VAURCA_WORKER)
|
||||
|
||||
/obj/item/organ/internal/augment/language/eridani
|
||||
name = "Eridani language processor"
|
||||
augment_languages = list(LANGUAGE_TRADEBAND)
|
||||
species_restricted = list(SPECIES_VAURCA_BREEDER, SPECIES_VAURCA_BULWARK, SPECIES_VAURCA_WARFORM, SPECIES_VAURCA_WARRIOR, SPECIES_VAURCA_WORKER)
|
||||
|
||||
/obj/item/organ/internal/augment/language/zeng
|
||||
name = "Zeng-Hu Nral'malic language processor"
|
||||
|
||||
Reference in New Issue
Block a user