Skip to content

Commit

Permalink
Research xenomorph "dissections" (#6188)
Browse files Browse the repository at this point in the history
# About the pull request

This PR is a part of a larger research "rework"(which is already half
coded too. this is atomized) if you want to read the research document
more detailed, go to discord thread in contrib projects.

On init, each xeno is given a heart. When xenomorph dies, those with
surgery skills can operate it to take it out, this is however a
dangerous process, which can lead to acid blood spraying everywhere and
burning the surgeon severely, hazmat suits advised.

to start, begin by cutting the carapace on the head with a saw, then
open it with a retractor, Use the pict(or any suitable item) to cut the
organ connections, and hemostat(or hands) to take it out.

Currently, there's only one use for it: the Xenomorphic analyzer. When
inserted, you can recycle the organ for "biomass" points. these points
vary for each xeno, runner giving 500, or queen giving ~7k

WIth biomass points you can print "upgrades " to autodoc, or sleeper, or
simply research credits.
upgrade for autodoc comes in four variants, Internal bleeding repair,
broken bone repair, organ repair and larva removal.

sleeper gives better chemicals and ~triples dialysis speed.

credits give two points per X biomass(currently 2k)


now, onto technical part.

I made surgery work on xenos with little adjustments. its not *too*
goofy from the first look and actually pretty nice. Cant guarantee nice
code though.

datumized the upgrades hopefullyish-goodish with purposeish

This is wip, most of it is ready but I need to do

- [x] Put in the sprites for the analyzer, provided by zenith
- [x] actually map in the board( yes research will need to call MT to
construct the machine)
- [x] clean the code of debug messages
- [x] add more upgrades. its very bare.(but which exactly)
- [x] clean up tgui and make it better now that I know quite a bit more
about it.(aka add dropdown menu)
- [x] fix any shitcode pointed out and hope for the best
- [x] readd burn damage. removed because of testing purposes (actuall
braindead me)

The main features, are, however, done, and it works.(besides the "xeno
specific" upgrades e.g. spitter organ giving anti acid points, but I
think its kinda meh)
# Explain why it's good for the game

research is a stim producing factory. bad bad. fix now, this design is
very human.
with this pr It will still be stim producing factory, but with later
rework we will fix it trust me bro, for now this will stir up the
gameplay of it and ease the merge process(in two years btw)

This will, absolutely, will need some adjustments to pricing and other
balance changes to not tilt the scales of research credits too much or
not to make some things too good:tm:
# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl: Kivts, SubjectD9341, Zenith.
add: Xenomorph Harvesting Surgery. Allows research to operate dead
xenomorphs to take out their organ.
add: The Xenomorph analyzer, uses organs extracted from dead xenomorphs,
which when processed gives points to spend on physical upgrades.
add: a number of machinery upgrades for autodoc, sleeper, and other
upgrades or bonuses research can decide to spend their points on
del: passive generation increase of research credits is removed
/:cl:

---------

Co-authored-by: Zonespace <[email protected]>
Co-authored-by: harryob <[email protected]>
Co-authored-by: Drathek <[email protected]>
  • Loading branch information
4 people authored Jun 9, 2024
1 parent e530701 commit 6791699
Show file tree
Hide file tree
Showing 49 changed files with 1,362 additions and 259 deletions.
25 changes: 25 additions & 0 deletions code/__DEFINES/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,36 @@
#define ASSEMBLY_UNLOCKED 1
#define ASSEMBLY_LOCKED 2

// RESEARCH UPGRADES DEFINES //

// Matrix CAS Upgrades
#define MATRIX_DEFAULT 0
#define MATRIX_NVG 1
#define MATRIX_WIDE 2

#define RESEARCH_UPGRADE_EXCLUDE_BUY -2
#define RESEARCH_UPGRADE_CATEGORY -1 //lord forgive me
#define RESEARCH_UPGRADE_TIER_1 1
#define RESEARCH_UPGRADE_TIER_2 2
#define RESEARCH_UPGRADE_TIER_3 3
#define RESEARCH_UPGRADE_TIER_4 4
#define RESEARCH_UPGRADE_TIER_5 5
//Value define

#define ITEM_MACHINERY_UPGRADE "Machinery" //*must* be same as category name.
#define ITEM_ACCESSORY_UPGRADE "Items"
#define ITEM_ARMOR_UPGRADE "Armor"

//injector plate stuff
#define EMERGENCY_PLATE_OD_PROTECTION_OFF 0
#define EMERGENCY_PLATE_OD_PROTECTION_STRICT 1
#define EMERGENCY_PLATE_OD_PROTECTION_DYNAMIC 2
#define EMERGENCY_PLATE_OD_WARNING 1
#define EMERGENCY_PLATE_ADJUSTED_WARNING 2


// RESEARCH UPGRADES DEFINES END

// Statistics defines
#define STATISTIC_XENO "xeno"
#define STATISTIC_HUMAN "human"
Expand Down
171 changes: 171 additions & 0 deletions code/datums/research_upgrade_datum.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
/datum/research_upgrades
///unique to every upgrade. not the name of the item. name of the upgrade
var/name = "Upgrade."
///name of upgrades, not items. Items are at research_upgrades.dm somewhere in item folder.
var/desc = "something is broken. yippee!!"
///which behavior should this type follow. Should this be completely excluded from the buy menu? should it be one of the dropdown options? This is also what gets passed to the initizialize of an item, this can be any number *but* it cannot be -1 or -2, as it messes with the buy menu.
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
/// actual path to the item.(upgrade)
var/item_reference
///In which tab the upgrade should be.
var/upgrade_type
///Clearance requirment to buy this upgrade. 5x is level 6. Why is it not that way? no one knows.
var/clearance_req = 5
///The change of price for item per purchase, recommended for mass producing stuff or limited upgrade.
var/change_purchase = 0
///the minimum price which we cant go any cheaper usually dont need to set this if change price is 0 or positive
var/minimum_price = 0
///the maximum price which we cant go any more expensive, usually dont need to set this if change price is 0 or negative
var/maximum_price = INFINITY

/datum/research_upgrades/machinery
name = "Machinery"
behavior = RESEARCH_UPGRADE_CATEGORY // one on the dropdown choices you get

/datum/research_upgrades/machinery/autodoc
name = "AutoDoc Upgrade"
behavior = RESEARCH_UPGRADE_EXCLUDE_BUY
item_reference = /obj/item/research_upgrades/autodoc
upgrade_type = ITEM_MACHINERY_UPGRADE

/datum/research_upgrades/machinery/autodoc/internal_bleed
name = "AutoDoc Internal Bleeding Repair"
desc = "A data and instruction set for the AutoDoc, making it capable of rapidly fixing internal bleeding."
behavior = RESEARCH_UPGRADE_TIER_1
value_upgrade = 200
clearance_req = 1

/datum/research_upgrades/machinery/autodoc/broken_bone
name = "AutoDoc Bone Fracture Repair"
desc = "A data instruction set for the AutoDoc, making it capable of setting fractures and applying bonegel."
behavior = RESEARCH_UPGRADE_TIER_2
value_upgrade = 2000
clearance_req = 3

/datum/research_upgrades/machinery/autodoc/organ_damage
name = "AutoDoc Broken Organ Repair"
desc = "A data and instruction set for the AutoDoc, making it capable of fixing organ damage."
behavior = RESEARCH_UPGRADE_TIER_3
value_upgrade = 1500
clearance_req = 2

/datum/research_upgrades/machinery/autodoc/larva_removal
name = "AutoDoc Embryo Removal"
desc = "Data and instruction set for AutoDoc making it mildly proficient in removing parasites left by unknown organism."
behavior = RESEARCH_UPGRADE_TIER_4
value_upgrade = 4000
clearance_req = 6


/datum/research_upgrades/machinery/sleeper
name = "Sleeper Upgrade"
desc = "Research upgrade for Sleeper system, technology on this disk is used on a sleeper to allow wider spectrum of chemicals to be administered, as well as upgrading dialysis software."
behavior = RESEARCH_UPGRADE_TIER_1
value_upgrade = 500
item_reference = /obj/item/research_upgrades/sleeper
upgrade_type = ITEM_MACHINERY_UPGRADE
clearance_req = 1

/datum/research_upgrades/item
name = "Items"
behavior = RESEARCH_UPGRADE_CATEGORY

/datum/research_upgrades/item/research_credits
name = "Research Credits"
desc = "Sell the data acquired to the nearest Weyland-Yutani Science division team for 8 or 9 points."
value_upgrade = 2000
item_reference = /obj/item/research_upgrades/credits
behavior = RESEARCH_UPGRADE_TIER_1
upgrade_type = ITEM_ACCESSORY_UPGRADE
change_purchase = 500
maximum_price = 5000
clearance_req = 5

/datum/research_upgrades/item/laser_scalpel
name = "Laser Scalpel"
desc = "An advanced, robust version of the normal scalpel, allowing it to pierce through thick skin and chitin alike with extreme ease."
value_upgrade = 3000
item_reference = /obj/item/tool/surgery/scalpel/laser/advanced
behavior = RESEARCH_UPGRADE_TIER_1
upgrade_type = ITEM_ACCESSORY_UPGRADE
clearance_req = 3

/datum/research_upgrades/item/incision_management
name = "Incision Management System"
desc = "A true extension of the surgeon's body, this marvel instantly and completely prepares an incision, allowing for the immediate commencement of therapeutic steps."
value_upgrade = 3000
item_reference = /obj/item/tool/surgery/scalpel/manager
behavior = RESEARCH_UPGRADE_TIER_1
upgrade_type = ITEM_ACCESSORY_UPGRADE
clearance_req = 4
/datum/research_upgrades/item/nanosplints
name = "Reinforced Fiber Splints"
desc = "A set of splints made from durable carbon fiber sheets reinforced with flexible titanium lattice, comes in a stack of five."
value_upgrade = 800
clearance_req = 3
change_purchase = -200
minimum_price = 200
item_reference = /obj/item/stack/medical/splint/nano/research
behavior = RESEARCH_UPGRADE_TIER_5 //adjust this to change amount of nanosplints in a stack, cant be higher than five, go change max_amount in the nanosplint itself, then change it.
upgrade_type = ITEM_ACCESSORY_UPGRADE

/datum/research_upgrades/armor
name = "Armor"
behavior = RESEARCH_UPGRADE_CATEGORY

/datum/research_upgrades/armor/translator
name = "Universal Translator Plate"
desc = "A uniform-attachable plate capable of translating any unknown language heard by the wearer."
value_upgrade = 2000
behavior = RESEARCH_UPGRADE_TIER_1
clearance_req = 6
upgrade_type = ITEM_ARMOR_UPGRADE
item_reference = /obj/item/clothing/accessory/health/research_plate/translator


/datum/research_upgrades/armor/coagulator
name = "Active Blood Coagulator Plate"
desc = "A uniform-attachable plate capable of coagulating any bleeding wounds the user possesses."
value_upgrade = 1200
behavior = RESEARCH_UPGRADE_TIER_1
clearance_req = 2
change_purchase = -200
minimum_price = 200
upgrade_type = ITEM_ARMOR_UPGRADE
item_reference = /obj/item/clothing/accessory/health/research_plate/coagulator

/datum/research_upgrades/armor/emergency_injector
name = "Medical Emergency Injector"
desc = "A medical plate with two buttons on the sides and a hefty chemical tank. Attached to a uniform and on a simultaneous press, it injects an emergency dose of medical chemicals much larger than a normal emergency autoinjector. Single time use and is recycled in biomass printer. Features overdose protection."
value_upgrade = 250
clearance_req = 1
behavior = RESEARCH_UPGRADE_TIER_1
change_purchase = -100
minimum_price = 100
upgrade_type = ITEM_ARMOR_UPGRADE
item_reference = /obj/item/clothing/accessory/health/research_plate/emergency_injector

/datum/research_upgrades/armor/ceramic
name = "Ceramic Armor Plate"
desc = "A strong trauma plate, able to protect the user from a large amount of bullets. Completely useless against sharp objects."
value_upgrade = 500
clearance_req = 4
behavior = RESEARCH_UPGRADE_TIER_1
upgrade_type = ITEM_ARMOR_UPGRADE
change_purchase = -50
minimum_price = 200
item_reference = /obj/item/clothing/accessory/health/ceramic_plate

/datum/research_upgrades/armor/preservation
name = "Death Preservation Plate"
desc = "preservation plate which activates once the user is dead, uses variety of different substances and sensors to slow down the decay and increase the time before the user is permanently dead, due to small tank of preservatives, it needs to be replaced on each death. Extends time to permadeath by around four minutes."
value_upgrade = 500
clearance_req = 4
behavior = RESEARCH_UPGRADE_TIER_1
upgrade_type = ITEM_ARMOR_UPGRADE
change_purchase = -100
minimum_price = 100
item_reference = /obj/item/clothing/accessory/health/research_plate/anti_decay

7 changes: 6 additions & 1 deletion code/game/machinery/computer/research.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@
var/obj/item/paper/research_report/CR = P.convert_to_chem_report()
GLOB.chemical_data.save_document(CR, response, CR.name)
return
//biomass credits rewards
if(istype(B, /obj/item/research_upgrades/credits))
var/obj/item/research_upgrades/credits/cred = B
GLOB.chemical_data.update_credits(cred.credit_value)
visible_message(SPAN_NOTICE("[user] inserts [cred] in [src], collecting [cred.credit_value] points from sales."))
qdel(cred)
//Clearance Updating
if(!istype(B, /obj/item/card/id))
return
Expand Down Expand Up @@ -162,7 +168,6 @@
visible_message(SPAN_NOTICE("Clearance access increased to level [GLOB.chemical_data.clearance_level] for [cost] credits."))
msg_admin_niche("[key_name(user)] traded research credits to upgrade the clearance to level [GLOB.chemical_data.clearance_level].")
if(max_clearance < GLOB.chemical_data.clearance_level)
GLOB.chemical_data.update_income(1) //Bonus income and a paper for buying clearance instead of swiping it up
switch(GLOB.chemical_data.clearance_level)
if(2)
new /obj/item/paper/research_notes/unique/tier_two/(photocopier.loc)
Expand Down
Loading

0 comments on commit 6791699

Please sign in to comment.