mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-17 17:16:50 +01:00
* Allow monkey-like species to craft * Add signal for mobs entering vents * Implement basic uplifted antag datum & nest * Make phrasing nicer * Allow primitive species to vary & add time requirements * Add spawning functionality to nest * Make primitives unable to be humanised a little less violently * Fix linter complaints * Fix typo which made the linter mad * Add objectives and antag teams * Make nests consider other nests for spawn limit * Add greeting text * Add guaranteed early spawns * Allow deconstruction of nests & recovery of scrap * Allow uplifted mobs to ventcrawl with small items * Clarify nest spawning conditions on examine * Tweak NPC numbers & AI * Add obtain objective and give an extra objective * Give thanks to the linter * Change team objective & make the alert nicer * Make event only spawn monkeys by default * Add examine text explaining deconstruction * Allow ghosts to see nest materials * Handle stacks properly in nest deconstruction * Add on-demand ghost spawn to reduce roll spam * Add nest crafting * Allow lesser mobs to use medical stacks I don't believe this should affect anything else, as every other mob capable of holding these items is an advanced tool user. * Add hint about crafting on examine * Ensure only nest monkeys retaliate to nest damage * Add uplifted primitive nests to the spawners menu
56 lines
1.5 KiB
Plaintext
56 lines
1.5 KiB
Plaintext
// (Re-)Apply mutations.
|
|
// TODO: Turn into a /mob proc, change inj to a bitflag for various forms of differing behavior.
|
|
// M: Mob to mess with
|
|
// flags: See below, bitfield.
|
|
/proc/domutcheck(mob/living/M, flags = 0)
|
|
if(HAS_TRAIT(M, TRAIT_GENELESS))
|
|
return
|
|
|
|
for(var/mutation_type in GLOB.dna_mutations)
|
|
var/datum/mutation/mutation = GLOB.dna_mutations[mutation_type]
|
|
if(!M || !M.dna)
|
|
return
|
|
if(!mutation.block)
|
|
continue
|
|
|
|
domutation(mutation, M, flags)
|
|
|
|
// Use this to force a mut check on a single mutation!
|
|
/proc/singlemutcheck(mob/living/M, block, flags = 0)
|
|
if(!M)
|
|
return
|
|
if(HAS_TRAIT(M, TRAIT_GENELESS))
|
|
return
|
|
if(block < 0)
|
|
return
|
|
|
|
var/datum/mutation/mutation = GLOB.assigned_mutation_blocks[block]
|
|
domutation(mutation, M, flags)
|
|
|
|
/proc/domutation(datum/mutation/mutation, mob/living/M, flags = 0)
|
|
if(!mutation || !istype(mutation))
|
|
return FALSE
|
|
|
|
// Current state
|
|
var/mutation_active = M.dna.GetSEState(mutation.block)
|
|
|
|
// Sanity checks, don't skip.
|
|
if(mutation_active && !mutation.can_activate(M, flags))
|
|
//testing("[M] - Failed to activate [gene.name] (can_activate fail).")
|
|
return FALSE
|
|
|
|
// Prior state
|
|
var/mutation_prior_status = (mutation.type in M.active_mutations)
|
|
var/changed = mutation_active != mutation_prior_status
|
|
|
|
// If gene state has changed:
|
|
if(changed)
|
|
// Gene active (or ALWAYS ACTIVATE)
|
|
if(mutation_active)
|
|
//testing("[gene.name] activated!")
|
|
mutation.activate(M)
|
|
// If Gene is NOT active:
|
|
else
|
|
//testing("[gene.name] deactivated!")
|
|
mutation.deactivate(M)
|