Skip to content

Commit

Permalink
TGS Test Merge (#6188)
Browse files Browse the repository at this point in the history
  • Loading branch information
cm13-github committed May 25, 2024
2 parents d92d278 + 1905827 commit e941b09
Show file tree
Hide file tree
Showing 49 changed files with 1,349 additions and 257 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
174 changes: 174 additions & 0 deletions code/datums/research_upgrade_datum.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
/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 = 1000
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 = 3000
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 = 2500
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 = 7000
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 = 1000
item_reference = /obj/item/research_upgrades/sleeper
upgrade_type = ITEM_MACHINERY_UPGRADE
clearance_req = 2

/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 two or three points."
value_upgrade = 800
item_reference = /obj/item/research_upgrades/credits
behavior = RESEARCH_UPGRADE_TIER_1
upgrade_type = ITEM_ACCESSORY_UPGRADE
change_purchase = 100
maximum_price = 4000
clearance_req = 4

/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 = 5
/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 = 5
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 with hefty chemical tank. Attached to uniform and on simultanious press injects 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 e941b09

Please sign in to comment.