mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Fixes traits not getting applied properly.
This commit is contained in:
@@ -487,7 +487,7 @@ var/global/list/remainless_species = list(SPECIES_PROMETHEAN,
|
|||||||
hair_accesories_list[path] = instance
|
hair_accesories_list[path] = instance
|
||||||
|
|
||||||
// Custom species traits
|
// Custom species traits
|
||||||
paths = typesof(/datum/trait) - /datum/trait
|
paths = typesof(/datum/trait) - /datum/trait - /datum/trait/negative - /datum/trait/neutral - /datum/trait/positive
|
||||||
for(var/path in paths)
|
for(var/path in paths)
|
||||||
var/datum/trait/instance = new path()
|
var/datum/trait/instance = new path()
|
||||||
if(!instance.name)
|
if(!instance.name)
|
||||||
|
|||||||
@@ -243,7 +243,7 @@
|
|||||||
H.custom_exclaim = dna.custom_exclaim
|
H.custom_exclaim = dna.custom_exclaim
|
||||||
H.species.blood_color = dna.blood_color
|
H.species.blood_color = dna.blood_color
|
||||||
var/datum/species/S = H.species
|
var/datum/species/S = H.species
|
||||||
S.produceCopy(dna.species_traits,src)
|
S.produceCopy(dna.species_traits, H, dna.base_species)
|
||||||
// VOREStation Edit End
|
// VOREStation Edit End
|
||||||
|
|
||||||
H.force_update_organs() //VOREStation Add - Gotta do this too
|
H.force_update_organs() //VOREStation Add - Gotta do this too
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
nif.nifsofts = nifsofts
|
nif.nifsofts = nifsofts
|
||||||
else
|
else
|
||||||
..()
|
..()
|
||||||
/datum/species/proc/produceCopy(var/list/traits,var/mob/living/carbon/human/H)
|
/datum/species/proc/produceCopy(var/list/traits, var/mob/living/carbon/human/H, var/custom_base)
|
||||||
//If species allows custom base, and custom base is set, apply it, otherwise use default.
|
//If species allows custom base, and custom base is set, apply it, otherwise use default.
|
||||||
ASSERT(src)
|
ASSERT(src)
|
||||||
ASSERT(istype(H))
|
ASSERT(istype(H))
|
||||||
@@ -81,7 +81,11 @@
|
|||||||
//Makes thorough copy of species datum.
|
//Makes thorough copy of species datum.
|
||||||
for(var/i in vars)
|
for(var/i in vars)
|
||||||
if(S.vars[i] != vars[i] && !islist(vars[i])) //If vars are same, no point in copying.
|
if(S.vars[i] != vars[i] && !islist(vars[i])) //If vars are same, no point in copying.
|
||||||
if(whitelist && !(i in whitelist) && i in blacklist) //If whitelist is provided, only vars in the list will be copied.
|
if(i in blacklist)
|
||||||
|
continue
|
||||||
|
if(whitelist)//If whitelist is provided, only vars in the list will be copied.
|
||||||
|
if(i in whitelist)
|
||||||
|
S.vars[i] = vars[i]
|
||||||
continue
|
continue
|
||||||
S.vars[i] = vars[i]
|
S.vars[i] = vars[i]
|
||||||
|
|
||||||
|
|||||||
@@ -48,9 +48,19 @@
|
|||||||
/datum/species/custom/get_race_key()
|
/datum/species/custom/get_race_key()
|
||||||
var/datum/species/real = GLOB.all_species[base_species]
|
var/datum/species/real = GLOB.all_species[base_species]
|
||||||
return real.race_key
|
return real.race_key
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
/datum/species/custom/produceCopy(var/list/traits,var/mob/living/carbon/human/H,var/custom_base)
|
/datum/species/custom/produceCopy(var/list/traits,var/mob/living/carbon/human/H,var/custom_base)
|
||||||
. = ..(traits, H)
|
. = ..(traits, H)
|
||||||
|
||||||| parent of 0ff4f543b8... Merge pull request #10145 from Verkister/traitfixies
|
||||||
|
|
||||||
|
/datum/species/custom/produceCopy(var/list/traits,var/mob/living/carbon/human/H,var/custom_base)
|
||||||
|
. = ..(traits, H)
|
||||||
|
=======
|
||||||
|
|
||||||
|
/datum/species/custom/produceCopy(var/list/traits, var/mob/living/carbon/human/H, var/custom_base)
|
||||||
|
. = ..(traits, H, custom_base)
|
||||||
|
>>>>>>> 0ff4f543b8... Merge pull request #10145 from Verkister/traitfixies
|
||||||
if(selects_bodytype && custom_base)
|
if(selects_bodytype && custom_base)
|
||||||
var/datum/species/S = GLOB.all_species[custom_base]
|
var/datum/species/S = GLOB.all_species[custom_base]
|
||||||
S.copy_variables(., copy_vars)
|
S.copy_variables(., copy_vars)
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#define ORGANICS 1
|
#define ORGANICS 1
|
||||||
#define SYNTHETICS 2
|
#define SYNTHETICS 2
|
||||||
|
|
||||||
|
/datum/trait/neutral
|
||||||
|
|
||||||
/datum/trait/neutral/metabolism_up
|
/datum/trait/neutral/metabolism_up
|
||||||
name = "Fast Metabolism"
|
name = "Fast Metabolism"
|
||||||
desc = "You process ingested and injected reagents faster, but get hungry faster (Teshari speed)."
|
desc = "You process ingested and injected reagents faster, but get hungry faster (Teshari speed)."
|
||||||
|
|||||||
Reference in New Issue
Block a user