Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1da3443
Reworked research
Watermelon914 Aug 10, 2026
b1aa358
Fixes a bunch of bugs
Watermelon914 Aug 10, 2026
736e078
Fixed inject blood speeds
Watermelon914 Aug 10, 2026
f06cb7b
Addresses comments
Watermelon914 Aug 10, 2026
33d36aa
Fixes deletion causing organ timers to hold refs
Watermelon914 Aug 10, 2026
088f1d2
Fixes missing_icons failing on an abstract type
Watermelon914 Aug 10, 2026
05b01f7
Actually commits the fix
Watermelon914 Aug 10, 2026
4460b1c
Fixed xenomorphs having half HP on evo
Watermelon914 Aug 10, 2026
22a55d8
Adds 2 drone hearts to research containment at the start of the round
Watermelon914 Aug 10, 2026
9e57f6e
Adds the missing reagents to the basic/advanced chem producers
Watermelon914 Aug 10, 2026
8bc7740
Nerfs the plasmas so that they can't be easily used as stimulants
Watermelon914 Aug 10, 2026
249dd7c
Fixed xeno chems not being treated as special during reports
Watermelon914 Aug 10, 2026
0018ce4
Reduces additional chemical volume down to 60 per chem
Watermelon914 Aug 10, 2026
2dc1df7
Brings it up to 120u per chem
Watermelon914 Aug 10, 2026
fbbb29b
Makes production capacity of resin glands equal to 2x their productio…
Watermelon914 Aug 10, 2026
3e9d1b5
Replaces vibration-absorbing with xeno-recognizing
Watermelon914 Aug 10, 2026
64bf145
Fixed a bug with the organ regen timer
Watermelon914 Aug 10, 2026
1fbdd31
Fixed compilation error + xenos suffering from crit again when their …
Watermelon914 Aug 10, 2026
e136fb5
Fixed rejuvenate not working on xenos, instantly critting them.
Watermelon914 Aug 10, 2026
5e069dc
Lesser drones no longer have organs, fixed de-evolving without an org…
Watermelon914 Aug 10, 2026
6fbc3e6
Anti-neurotoxin now requires royal plasma, to prevent getting it imme…
Watermelon914 Aug 10, 2026
3f2aa39
Fixed chemical extractors printing out botany research
Watermelon914 Aug 10, 2026
b1b38c5
Fixed chem producers not producing chems if they had more than 1 chem…
Watermelon914 Aug 10, 2026
42c46ca
Locks the reagents for the simple and advanced xenobio contracts so t…
Watermelon914 Aug 11, 2026
ae37ca0
Removed abstract type designation
Watermelon914 Aug 12, 2026
66c033d
Organs can only be planted in research containment
Watermelon914 Aug 13, 2026
e31cd5d
Resolve conflict
Watermelon914 Aug 13, 2026
2ed69be
Makes WRS mutually exclusive with nervestim and musclestim
Watermelon914 Aug 13, 2026
1394543
Removes plasmas from xeno blood since it can be obtained from organs now
Watermelon914 Aug 13, 2026
6b746a1
Fixed buying stuff on debt
Watermelon914 Aug 13, 2026
654a271
Adds PLASMA_PHEROMONE back to the drone tree castes so that it's actu…
Watermelon914 Aug 13, 2026
a03fed5
Resolve merge conflict
Watermelon914 Aug 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 39 additions & 10 deletions code/__DEFINES/chemistry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,20 @@
#define CHEM_CLASS_UNCOMMON 3
/// Chemicals that are either can't be made or require rare or expandable components.
#define CHEM_CLASS_RARE 4

// xenomorph-related chems, obtained from xenobotany
/// Common chemicals obtained from all xeno types
#define CHEM_CLASS_XENO_BASIC 5
/// Uncommon chemicals obtained from strong-variant specific castes
#define CHEM_CLASS_XENO_SPECIALIZED 6
/// Rare chemicals obtained from royal-type castes
#define CHEM_CLASS_XENO_ROYAL 7

/// Chemicals that can't be made
#define CHEM_CLASS_SPECIAL 5
#define CHEM_CLASS_SPECIAL 8
/// Randomly generated chemicals
#define CHEM_CLASS_ULTRA 6
/// Rare chemicals ONLY acquired via hydroponics, Those are mostly useless but very important for hard difficulty on contracts.
#define CHEM_CLASS_HYDRO 7
#define CHEM_CLASS_ULTRA 9


//chem_effect_flags, used to quickly check if the mob has a chem that provides a special effect
#define CHEM_EFFECT_RESIST_FRACTURE (1<<0)
Expand All @@ -107,16 +115,29 @@
/// potential replacement for CHEM_REACTION_CALM. makes the reaction go slower. no longer will stuff mix instantly.
#define CHEM_REACTION_ENDOTHERMIC (1<<5)

//Blood plasma
//BLOOD PLASMA

// Basic
#define PLASMA_PURPLE "purpleplasma"
#define PLASMA_PHEROMONE "pheromoneplasma"
#define PLASMA_CHITIN "chitinplasma"
#define PLASMA_CATECHOLAMINE "catecholamineplasma"
#define PLASMA_NUTRIENT "nutrientplasma"
#define PLASMA_EGG "eggplasma"
#define PLASMA_NEUROTOXIN "neurotoxinplasma"

// Specialized
#define PLASMA_NUTRIENT "nutrientplasma"
#define PLASMA_REINFORCED_CHITIN "reinforcedchitinplasma"
#define PLASMA_ADRENALINE "adrenalplasma"
#define PLASMA_ACIDIC "acidicplasma"

// Royal
#define PLASMA_ROYAL "royalplasma"

// Special
#define PLASMA_EGG "eggplasma"
#define PLASMA_PHEROMONE "pheromoneplasma"



// Flags for Reagent

/// Used to restrict recipes in the generator from employing all reagents of this type
Expand Down Expand Up @@ -223,6 +244,11 @@
#define PROPERTY_HYPERGENETIC "hypergenetic"
#define PROPERTY_OPTIMIZED "optimizing"
#define PROPERTY_REGULATING "regulating"
//Beyond legendary, only unlockable by processing a xenomorph queen organ
//Essentially requires a corrupted xenomorph queen because the only way to produce the chemicals needed is by grinding a queen heart.
#define PROPERTY_WEED_RESISTANT "weed-resistant"
#define PROPERTY_SCREECH_RESISTANT "vibration-stabilizing"
#define PROPERTY_RENEGADING "renegading"
//Admin Only Properties
#define PROPERTY_ORGAN_HEALING "organ-healing"
#define PROPERTY_CROSSMETABOLIZING "cross-metabolizing"
Expand Down Expand Up @@ -253,7 +279,8 @@

///Legendary properties, no PROPERTY_TYPE_ANOMALOUS, only normal ones.
#define PROPERTY_LEGENDARY_LIST list(PROPERTY_HYPERGENETIC, PROPERTY_BOOSTING, PROPERTY_REGULATING, PROPERTY_OPTIMIZED)

///Xenomorphic properties
#define PROPERTY_XENOMORPHIC_LIST list(PROPERTY_WEED_RESISTANT, PROPERTY_SCREECH_RESISTANT, PROPERTY_RENEGADING)

//Property rarity

Expand All @@ -267,8 +294,10 @@
#define PROPERTY_RARE 3
/// can strictly only be made through random generated property combinations, hints are found groundside.
#define PROPERTY_LEGENDARY 4
/// can be made by processing a queen organ, extremely difficult to produce
#define PROPERTY_XENOMORPHIC 5
/// can only be spawned through admin powers
#define PROPERTY_ADMIN 5
#define PROPERTY_ADMIN 6

//Property category
#define PROPERTY_TYPE_ALL 0
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/dcs/signals/atom/mob/living/signals_xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,5 @@

/// From /mob/living/carbon/xenomorph/larva/proc/chest_burst
#define COMSIG_XENO_BURSTED "xeno_burst"

#define COMSIG_XENO_ORGAN_REMOVED "xeno_organ_removed"
3 changes: 3 additions & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,9 @@
#define BLOOD_VOLUME_BAD 224
#define BLOOD_VOLUME_SURVIVE 122

//Blood level for a dead xenomorph
#define BLOOD_VOLUME_DEAD_XENO 60


//diseases
#define SPECIAL -1
Expand Down
6 changes: 6 additions & 0 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,10 @@
#define TRAIT_SPEC(spec_type) "t_spec_[spec_type]"
/// If the mob won't drop items held in face slot when downed
#define TRAIT_IRON_TEETH "t_iron_teeth"
/// Mob is resistant to xenomorph weeds
#define TRAIT_WEED_RESISTANT "weed_resistant"
/// Mob is resistant to queen screeches
#define TRAIT_SCREECH_RESISTANT "screech_resistant"

// -- ability traits --
/// Xenos with this trait cannot have plasma transferred to them
Expand Down Expand Up @@ -552,3 +556,5 @@ GLOBAL_LIST(trait_name_map)
#define TURF_Z_TRANSPARENT_TRAIT "turf_z_transparent"
/// traits from wall hiding
#define WALL_HIDING_TRAIT "wallhiding"
/// traits from reagents
#define REAGENT_TRAIT "reagent"
35 changes: 35 additions & 0 deletions code/__DEFINES/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -806,3 +806,38 @@
#define FACEHUGGER_JUMP_RANGE 1 // dont really want them to hug you immediately as you break down a corner or a door when a carrier stacks them on a tile
#define EGG_JUMP_RANGE 2 // This is for egg huggers, they are supposed to be scary and leap at people yes.
#define CARRIER_HUGGER_THROW_RANGE 6

// xeno organ flags

// these organs are automatically assigned

/// Organ is capable of generating plasma
#define XENO_ORGAN_PLASMA (1<<0)
/// Organ was taken from a living xenomorph
#define XENO_ORGAN_FRESH (1<<1)

// these need to be manually added

/// Organ is capable of generating acid (sentinel evo tree)
#define XENO_ORGAN_ACID (1<<2)
/// Organ belongs to a support-type caste (drone evo tree)
#define XENO_ORGAN_SUPPORT (1<<3)
/// Organ belongs to a brute caste (defender evo tree)
#define XENO_ORGAN_HARDENED (1<<4)
/// Organ belongs to a fast caste (runner evo tree)
#define XENO_ORGAN_TACHYCARDIA (1<<4)

/// Organ belongs to a fragile caste (boiler)
/// Obtaining it is very difficult and essentially
/// requires a corrupted hive that evolves a boiler
#define XENO_ORGAN_FRAGILE (1<<5)

/// Organ taken from a low-tier caste
#define XENO_ORGAN_WEAK (1<<6)
/// Organ taken from a high-tier caste
#define XENO_ORGAN_STRONG (1<<7)
/// Organ taken from a royal-tier caste
#define XENO_ORGAN_ROYAL (1<<8)

Comment thread
Watermelon914 marked this conversation as resolved.
/// Determines how fast xeno botany chems produce.
#define XENO_BOTANY_RATE 10 SECONDS
2 changes: 1 addition & 1 deletion code/_globalvars/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ GLOBAL_LIST_INIT_TYPED(combining_properties, /list, list( PROPERTY_DEFIBRILLATIN
PROPERTY_BONEMENDING = list(PROPERTY_CRYSTALLIZATION, PROPERTY_NUTRITIOUS)))

//List of all id's from classed /datum/reagent datums indexed by class or tier. Used by chemistry generator and chem spawners.
GLOBAL_LIST_INIT_TYPED(chemical_gen_classes_list, /list, list("C" = list(),"C1" = list(),"C2" = list(),"C3" = list(),"C4" = list(),"C5" = list(),"C6" = list(),"T1" = list(),"T2" = list(),"T3" = list(),"T4" = list(), "H1" = list(), "tau", list()))
GLOBAL_LIST_INIT_TYPED(chemical_gen_classes_list, /list, list("C" = list(),"C1" = list(),"C2" = list(),"C3" = list(),"C4" = list(),"C5" = list(),"C6" = list(),"T1" = list(),"T2" = list(),"T3" = list(),"T4" = list(), "X1" = list(), "X2" = list(), "X3" = list(), "tau", list()))
//properties generated in chemicals, helps to make sure the same property doesn't show up 10 times
GLOBAL_LIST_INIT_TYPED(generated_properties, /list, list("positive" = list(), "negative" = list(), "neutral" = list()))

Expand Down
10 changes: 0 additions & 10 deletions code/_onclick/item_attack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,6 @@
return ATTACKBY_HINT_UPDATE_NEXT_MOVE

/mob/living/attackby(obj/item/I, mob/user)
/* Commented surgery code, proof of concept. Would need to tweak human attackby to prevent duplication; mob/living don't have separate limb objects.
if((user.mob_flags & SURGERY_MODE_ON) && user.a_intent & (INTENT_HELP|INTENT_DISARM))
safety = TRUE
var/datum/surgery/current_surgery = active_surgeries[user.zone_selected]
if(current_surgery)
if(current_surgery.attempt_next_step(user, I))
return TRUE
else if(initiate_surgery_moment(I, src, null, user))
return TRUE
*/
if(HAS_TRAIT(user, TRAIT_HAULED))
return
if(istype(I) && ismob(user))
Expand Down
4 changes: 4 additions & 0 deletions code/controllers/subsystem/processing/xeno_botany.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
PROCESSING_SUBSYSTEM_DEF(xeno_botany)
name = "Xenomorph Botany"
flags = SS_NO_INIT
wait = XENO_BOTANY_RATE
35 changes: 33 additions & 2 deletions code/datums/research_upgrade_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
var/behavior = RESEARCH_UPGRADE_EXCLUDE_BUY // should this be on the list?
/// the price of the upgrade, refer to this: 500 is a runner, 8k is queen. T3 is usually 3k, woyer is 2k.
var/value_upgrade = 1000
/// how much royal biomatter is needed to purchase this
var/royal_value_upgrade = 0
///In which tab the upgrade should be.
var/upgrade_type
///Path to the item, upgrade, if any.
Expand Down Expand Up @@ -95,8 +97,8 @@
clearance_req = 1

/datum/research_upgrades/machinery/autoharvest
name = "Auto-Harvest Botany Upgrade"
desc = "Research upgrade for hydroponics system, technology on this disk automatically shakes the plant once it is ready to be harvested."
name = "Chemical Extractor"
desc = "A chemical extractor that can be used to extract chemicals from a specified vessel. Sends them to the tagged chemical network. These ones are configured for research."
behavior = RESEARCH_UPGRADE_ITEM
value_upgrade = 250
item_reference = /obj/item/research_upgrades/autoharvest
Expand All @@ -107,6 +109,34 @@
name = "Items"
behavior = RESEARCH_UPGRADE_CATEGORY

/datum/research_upgrades/item/biological_decoding
name = "Xenobiological Decoding"
desc = "Decode the foreign and unknown xenobiological biomatter to acquire an exotic"
clearance_req = 6
value_upgrade = 5000
change_purchase = 5000
royal_value_upgrade = 1
behavior = RESEARCH_UPGRADE_ITEM
upgrade_type = ITEM_ACCESSORY_UPGRADE

/datum/research_upgrades/item/biological_decoding/on_purchase(turf/machine_loc)
var/datum/reagent/generated/endgame_chem = new /datum/reagent/generated
endgame_chem.id = "tau-[length(GLOB.chemical_gen_classes_list["tau"])]"
endgame_chem.generate_name()
endgame_chem.gen_tier = 4
endgame_chem.add_property(pick(PROPERTY_XENOMORPHIC_LIST), 0)
endgame_chem.generate_stats()
endgame_chem.credit_reward = 10
endgame_chem.reagent_recipe_hint = pick(GLOB.chemical_gen_classes_list["X3"])

GLOB.chemical_gen_classes_list["tau"] += endgame_chem.id
GLOB.chemical_reagents_list[endgame_chem.id] = endgame_chem
var/datum/chemical_reaction/generated/generated = endgame_chem.generate_assoc_recipe(null, list(endgame_chem.reagent_recipe_hint))
generated.locked_reagents = list(endgame_chem.reagent_recipe_hint)

new /obj/item/paper/research_notes(machine_loc, GLOB.chemical_reagents_list[endgame_chem.id], "synthesis", TRUE)


/datum/research_upgrades/item/research_credits
name = "Research Contract Reroll"
desc = "Sell the data acquired to the nearest Weyland-Yutani Science division team to request new contract chemicals."
Expand Down Expand Up @@ -229,3 +259,4 @@
change_purchase = -100
minimum_price = 100
item_reference = /obj/item/clothing/accessory/health/research_plate/anti_decay

134 changes: 134 additions & 0 deletions code/modules/cm_aliens/structures/research/producer.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
/obj/effect/alien/resin/chem_producer
name = "resin gland"
icon = 'icons/mob/xenos/fruits.dmi'
desc = "A weird-looking pulsating node that produces chemicals"
density = FALSE
opacity = FALSE
anchored = TRUE
health = 50
layer = RESIN_STRUCTURE_LAYER
plane = FLOOR_PLANE

// Production stats
/// Which chem does this produce?
var/producing_chems = list()
/// How much is produced every XENO_BOTANY_RATE?
var/production_amt = 5

/obj/effect/alien/resin/chem_producer/Initialize(mapload, mob/builder)
. = ..()
create_reagents(100)
START_PROCESSING(SSxeno_botany, src)

/obj/effect/alien/resin/chem_producer/process(delta_time)
var/turf/current_turf = get_turf(src)
if(!current_turf.weeds)
return

var/max_per_reagent = reagents.maximum_volume / length(producing_chems)
for(var/chem in producing_chems)
var/reagent_amt = reagents.get_reagent_amount(chem)
// Conservative, so that reagents don't end up overflowing and having weird floating point values
// because they all didn't fit into the volume
if(reagent_amt + production_amt > max_per_reagent)
continue
reagents.add_reagent(chem, production_amt, safety = TRUE)


/obj/effect/alin/resin/chem_producer/Destroy(force)
STOP_PROCESSING(SSxeno_botany, src)
return ..()

/obj/effect/alien/resin/chem_producer/basic
name = "basic gland"
desc = "A weird-looking pulsating node that produces all basic xenobiology reagents, at slower speeds."
icon = 'icons/mob/xenos/effects.dmi'
icon_state = "static_costnode"

producing_chems = list(PLASMA_PURPLE, PLASMA_CATECHOLAMINE, PLASMA_CHITIN)
production_amt = 1

/obj/effect/alien/resin/chem_producer/advanced
name = "advanced gland"
desc = "A weird-looking pulsating node that produces all advanced xenobiology reagents, at slower speeds."
icon = 'icons/mob/xenos/effects.dmi'
icon_state = "static_constructnode"

producing_chems = list(PLASMA_REINFORCED_CHITIN, PLASMA_ADRENALINE, PLASMA_ACIDIC)
production_amt = 1

/obj/effect/alien/resin/chem_producer/plasma
name = "plasma gland"
desc = "A weird-looking pulsating node that produces purple plasma"
icon_state = "fruit_plasma_immature"

producing_chems = list(PLASMA_PURPLE)
production_amt = 10

/obj/effect/alien/resin/chem_producer/nutrient
name = "nutrient gland"
desc = "A weird-looking pulsating node that produces nutrient plasma"
icon_state = "fruit_plasma"

producing_chems = list(PLASMA_NUTRIENT)
production_amt = 10

/obj/effect/alien/resin/chem_producer/chitin
name = "chitin gland"
desc = "A weird-looking pulsating node that produces chitin"
icon_state = "fruit_spore_immature"

producing_chems = list(PLASMA_CHITIN)
production_amt = 10

/obj/effect/alien/resin/chem_producer/reinforced_chitin
name = "reinforced chitin gland"
desc = "A weird-looking pulsating node that produces reinforced chitin plasma"
icon_state = "fruit_spore"

producing_chems = list(PLASMA_REINFORCED_CHITIN)
production_amt = 10

/obj/effect/alien/resin/chem_producer/neurotoxin
name = "neurotoxin gland"
desc = "A weird-looking pulsating node that produces neurotoxin plasma"
icon_state = "fruit_greater_immature"

producing_chems = list(PLASMA_NEUROTOXIN)
production_amt = 10

/obj/effect/alien/resin/chem_producer/acid
name = "acid gland"
desc = "A weird-looking pulsating node that produces acidic plasma"
icon_state = "fruit_greater"

producing_chems = list(PLASMA_ACIDIC)
production_amt = 10

/obj/effect/alien/resin/chem_producer/catecholamine
name = "catecholamine gland"
desc = "A weird-looking pulsating node that produces catecholamine plasma"
icon_state = "fruit_speed_immature"

producing_chems = list(PLASMA_CATECHOLAMINE)
production_amt = 10

/obj/effect/alien/resin/chem_producer/adrenal
name = "adrenal gland"
desc = "A weird-looking pulsating node that produces adrenal plasma"
icon_state = "fruit_speed"

producing_chems = list(PLASMA_ADRENALINE)
production_amt = 10

/obj/effect/alien/resin/chem_producer/royal
name = "royal gland"
desc = "A weird-looking pulsating node that produces royal plasma"
icon = 'icons/mob/xenos/structures64x64.dmi'
icon_state = "collector_gather"
plane = GAME_PLANE
pixel_x = -16
pixel_y = -16

producing_chems = list(PLASMA_ROYAL)
production_amt = 5
Loading
Loading