mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Polaris sync
This commit is contained in:
@@ -29,7 +29,7 @@ Procs for targeting
|
||||
set_light(traitdat.traits[TRAIT_XENO_GLOW_RANGE], traitdat.traits[TRAIT_XENO_GLOW_STRENGTH], traitdat.traits[TRAIT_XENO_BIO_COLOR])
|
||||
else
|
||||
set_light(0, 0, "#000000") //Should kill any light that shouldn't be there.
|
||||
|
||||
|
||||
hostile = traitdat.traits[TRAIT_XENO_HOSTILE]
|
||||
|
||||
speed = traitdat.traits[TRAIT_XENO_SPEED]
|
||||
@@ -144,6 +144,7 @@ Procs for targeting
|
||||
|
||||
// redirect the projectile
|
||||
P.redirect(new_x, new_y, curloc, src)
|
||||
P.reflected = 1
|
||||
|
||||
return -1
|
||||
|
||||
|
||||
@@ -16,35 +16,35 @@ Also includes Life and New
|
||||
attack_sound = null
|
||||
friendly = "touches"
|
||||
environment_smash = 0
|
||||
|
||||
|
||||
var/datum/xeno/traits/traitdat //Trait datum.
|
||||
|
||||
|
||||
var/internal_vol = 1000 //Internal volume for ingesting/injected reagents
|
||||
|
||||
|
||||
var/obj/temp_chem_holder //Used in handle_reagents()
|
||||
|
||||
|
||||
var/mutable = NOMUT //Flag for mutation.
|
||||
var/nameVar = "Blah"
|
||||
var/instability = 0
|
||||
var/mut_instability = 0
|
||||
var/stasis = 0
|
||||
var/mut_level = 0 //How mutated a specimen is. Irrelevant while mutable = NOMUT.
|
||||
var/mut_max = 100000
|
||||
var/colored = 1
|
||||
var/maleable = MIN_MALEABLE //How easy is it to manipulate traitdat.traits after it's alive.
|
||||
var/stability = 0 //Used in gene manipulation
|
||||
|
||||
|
||||
//Traits that might not be maleable.
|
||||
var/list/chemreact = list()
|
||||
var/hunger_factor = 10
|
||||
var/chromatic = 0
|
||||
var/starve_damage = 0
|
||||
|
||||
|
||||
//Used for speech learning
|
||||
var/list/speech_buffer = list()
|
||||
|
||||
|
||||
var/list/default_chems = list()
|
||||
|
||||
|
||||
|
||||
//Life additions
|
||||
/mob/living/simple_animal/xeno/Life()
|
||||
if(stasis)
|
||||
@@ -52,16 +52,16 @@ Also includes Life and New
|
||||
if(stasis < 0)
|
||||
stasis = 0
|
||||
return 0
|
||||
|
||||
|
||||
..()
|
||||
if(!(stat == DEAD))
|
||||
handle_reagents()
|
||||
if((mut_level >= mut_max) && !(mutable & NOMUT))
|
||||
Mutate()
|
||||
mut_level -= mut_max
|
||||
|
||||
|
||||
ProcessSpeechBuffer()
|
||||
|
||||
|
||||
//Have to feed the xenos somehow.
|
||||
if(nutrition < 0)
|
||||
nutrition = 0
|
||||
@@ -71,15 +71,15 @@ Also includes Life and New
|
||||
else
|
||||
if(traitdat.traits[TRAIT_XENO_EATS])
|
||||
health = starve_damage
|
||||
|
||||
|
||||
return 1 //Everything worked okay.
|
||||
|
||||
|
||||
/mob/living/simple_animal/xeno/New()
|
||||
|
||||
traitdat = new()
|
||||
|
||||
|
||||
ProcessTraits()
|
||||
|
||||
|
||||
..()
|
||||
if(colored)
|
||||
color = traitdat.get_trait(TRAIT_XENO_COLOR)
|
||||
@@ -89,12 +89,12 @@ Also includes Life and New
|
||||
nutrition = 350
|
||||
for(var/R in default_chems)
|
||||
traitdat.chems[R] = default_chems[R]
|
||||
|
||||
|
||||
traitdat.source = name
|
||||
|
||||
|
||||
if(!health)
|
||||
stat = DEAD
|
||||
|
||||
|
||||
/mob/living/simple_animal/xeno/Destroy()
|
||||
traitdat.Destroy() //Let's clean up after ourselves.
|
||||
traitdat = null
|
||||
|
||||
Reference in New Issue
Block a user