From 45ac02fcac82beca25f30fa951b64e3b7a28145a Mon Sep 17 00:00:00 2001 From: datlo Date: Wed, 12 Dec 2018 21:35:13 +0000 Subject: [PATCH] Adds toxin research --- code/game/machinery/doppler_array.dm | 20 ++++ .../research/designs/bluespace_designs.dm | 10 ++ .../research/designs/equipment_designs.dm | 10 ++ code/modules/research/designs/misc_designs.dm | 92 ++++++++++++++++++- code/modules/research/research.dm | 7 ++ nano/templates/doppler_array.tmpl | 2 + 6 files changed, 140 insertions(+), 1 deletion(-) diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm index f06f7ac1b37..1eb7df1e6d4 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -9,6 +9,9 @@ var/list/doppler_arrays = list() anchored = 1 atom_say_verb = "states coldly" var/list/logged_explosions = list() + var/explosion_target + var/datum/tech/toxins/toxins_tech + var/max_toxins_tech = 7 /datum/explosion_log var/logged_time @@ -26,6 +29,8 @@ var/list/doppler_arrays = list() /obj/machinery/doppler_array/New() ..() doppler_arrays += src + explosion_target = rand(8, 20) + toxins_tech = new /datum/tech/toxins(src) /obj/machinery/doppler_array/Destroy() doppler_arrays -= src @@ -46,6 +51,10 @@ var/list/doppler_arrays = list() power_change() to_chat(user, "You unfasten [src].") playsound(loc, I.usesound, 50, 1) + if(istype(I, /obj/item/disk/tech_disk)) + var/obj/item/disk/tech_disk/disk = I + disk.load_tech(toxins_tech) + to_chat(user, "You swipe the disk into [src].") else return ..() @@ -142,6 +151,15 @@ var/list/doppler_arrays = list() messages += "Theoretical: Epicenter radius: [orig_dev_range]. Outer radius: [orig_heavy_range]. Shockwave radius: [orig_light_range]." logged_explosions.Insert(1, new /datum/explosion_log(station_time_timestamp(), "[x0],[y0]", "[devastation_range], [heavy_impact_range], [light_impact_range]", capped ? "[orig_dev_range], [orig_heavy_range], [orig_light_range]" : "n/a")) //Newer logs appear first messages += "Event successfully logged in internal database." + var/miss_by = abs(explosion_target - orig_light_range) + var/tmp_tech = max_toxins_tech - miss_by + if(!miss_by) + messages += "Explosion size matches target." + else + messages += "Target ([explosion_target]) missed by : [miss_by]" + if(tmp_tech > toxins_tech) + toxins_tech.level = tmp_tech + messages += "Toxins technology level upgraded to [toxins_tech.level]. Swipe a technology disk to save data." for(var/message in messages) atom_say(message) @@ -174,6 +192,8 @@ var/list/doppler_arrays = list() "actual_size_message" = E.actual_size_message, "theoretical_size_message" = E.theoretical_size_message, "unique_datum_id" = E.UID())) + data["explosion_target"] = explosion_target + data["toxins_tech"] = toxins_tech.level data["explosion_data"] = explosion_data data["printing"] = active_timers return data diff --git a/code/modules/research/designs/bluespace_designs.dm b/code/modules/research/designs/bluespace_designs.dm index 029936e1f3a..9a44b10d40c 100644 --- a/code/modules/research/designs/bluespace_designs.dm +++ b/code/modules/research/designs/bluespace_designs.dm @@ -80,3 +80,13 @@ materials = list(MAT_METAL = 150, MAT_GLASS = 100) build_path = /obj/item/radio/beacon category = list("Bluespace") + +/datum/design/rpd + name = "Bluespace Rapid Pipe Dispenser (BRPD)" + desc = "Similar to the Rapid Pipe Dispenser, lets you rapidly dispense pipes. Now at long range!" + req_tech = list("bluespace" = 3, "toxins" = 6) + id = "brpd" + build_type = PROTOLATHE + materials = list(MAT_METAL = 75000, MAT_GLASS = 37500, MAT_SILVER = 3000) + build_path = /obj/item/rpd/bluespace + category = list("Bluespace") \ No newline at end of file diff --git a/code/modules/research/designs/equipment_designs.dm b/code/modules/research/designs/equipment_designs.dm index 38dc2f19f7b..6740d7b4ffa 100644 --- a/code/modules/research/designs/equipment_designs.dm +++ b/code/modules/research/designs/equipment_designs.dm @@ -101,6 +101,16 @@ build_path = /obj/item/bikehorn/airhorn category = list("Equipment") +/datum/design/breath_mask + name = "Breath mask" + desc = "A close-fitting mask that can be connected to an air supply." + id = "breathmask" + req_tech = list("toxins" = 3) + build_type = PROTOLATHE + materials = list(MAT_METAL = 300, MAT_GLASS = 200) + build_path = /obj/item/clothing/mask/breath + category = list("Equipment") + /datum/design/welding_mask name = "Welding Gas Mask" desc = "A gas mask with built in welding goggles and face shield. Looks like a skull, clearly designed by a nerd." diff --git a/code/modules/research/designs/misc_designs.dm b/code/modules/research/designs/misc_designs.dm index bbaae598fdb..e8d091df673 100644 --- a/code/modules/research/designs/misc_designs.dm +++ b/code/modules/research/designs/misc_designs.dm @@ -80,7 +80,7 @@ materials = list(MAT_METAL=500, MAT_GLASS=50) build_path = /obj/item/clothing/mask/muzzle/safety/shock category = list("Miscellaneous") - + /datum/design/data_disk name = "Genetics Data Disk" desc = "Disk that allows you to store genetic data." @@ -90,3 +90,93 @@ materials = list(MAT_METAL=300, MAT_GLASS=100) build_path = /obj/item/disk/data category = list("Miscellaneous") + +/datum/design/emergency_oxygen + name = "Emergency Oxygen Tank" + desc = "Used for emergencies. Contains very little oxygen." + id = "emergencyoxygen" + req_tech = list("toxins" = 3) + build_type = PROTOLATHE + materials = list(MAT_METAL=500, MAT_GLASS=100) + build_path = /obj/item/tank/emergency_oxygen + category = list("Miscellaneous") + +/datum/design/extended_oxygen + name = "Extended Emergency Oxygen Tank" + desc = "Used for emergencies. Contains a decent amount of oxygen." + id = "extendedoxygen" + req_tech = list("toxins" = 4) + build_type = PROTOLATHE + materials = list(MAT_METAL=800, MAT_GLASS=100) + build_path = /obj/item/tank/emergency_oxygen/engi + category = list("Miscellaneous") + +/datum/design/double_oxygen + name = "Double Emergency Oxygen Tank" + desc = "Used for emergencies. Contains a good amount of oxygen." + id = "doubleoxygen" + req_tech = list("toxins" = 5) + build_type = PROTOLATHE + materials = list(MAT_METAL=1500, MAT_GLASS=200) + build_path = /obj/item/tank/emergency_oxygen/double + category = list("Miscellaneous") + +/datum/design/oxygen_tank + name = "Oxygen Tank" + desc = "A large oxygen tank." + id = "oxygentank" + req_tech = list("toxins" = 5) + build_type = PROTOLATHE + materials = list(MAT_METAL=3000, MAT_GLASS=500) + build_path = /obj/item/tank/oxygen + category = list("Miscellaneous") + +/datum/design/emergency_nitrogen + name = "Emergency Nitrogen Tank" + desc = "Used for vox-related emergencies. Contains very little nitrogen." + id = "emergencynitrogen" + req_tech = list("toxins" = 4) + build_type = PROTOLATHE + materials = list(MAT_METAL=500, MAT_GLASS=100) + build_path = /obj/item/tank/emergency_oxygen/nitrogen + category = list("Miscellaneous") + +/datum/design/nitrogen_tank + name = "Nitrogen Tank" + desc = "A large nitrogen tank." + id = "nitrogentank" + req_tech = list("toxins" = 5) + build_type = PROTOLATHE + materials = list(MAT_METAL=3000, MAT_GLASS=500) + build_path = /obj/item/tank/nitrogen + category = list("Miscellaneous") + +/datum/design/vox_tank + name = "Vox Specialized Nitrogen Tank" + desc = "A high-tech nitrogen tank designed specifically for Vox." + id = "voxtank" + req_tech = list("toxins" = 6) + build_type = PROTOLATHE + materials = list(MAT_METAL=2500, MAT_GLASS=500) + build_path = /obj/item/tank/emergency_oxygen/vox + category = list("Miscellaneous") + +/datum/design/emergency_plasma + name = "Emergency Plasma Tank" + desc = "Used for plasmaman-related emergencies. Contains very little plasma." + id = "emergencyplasma" + req_tech = list("toxins" = 5, "plasmatech" = 2) + build_type = PROTOLATHE + materials = list(MAT_METAL=500, MAT_GLASS=100, MAT_PLASMA = 50) + build_path = /obj/item/tank/emergency_oxygen/plasma + category = list("Miscellaneous") + +/datum/design/plasma_tank + name = "Plasma Tank" + desc = "A tank of plasma." + id = "plasmatank" + req_tech = list("toxins" = 5, "plasmatech" = 3) + build_type = PROTOLATHE + materials = list(MAT_METAL=3000, MAT_GLASS=200, MAT_PLASMA = 500) + build_path = /obj/item/tank/plasma + category = list("Miscellaneous") \ No newline at end of file diff --git a/code/modules/research/research.dm b/code/modules/research/research.dm index 27497fcac9a..32f5ab879cd 100644 --- a/code/modules/research/research.dm +++ b/code/modules/research/research.dm @@ -271,6 +271,13 @@ research holder datum. id = "programming" max_level = 7 +/datum/tech/toxins //not meant to be raised by deconstruction, do not give objects toxins as an origin_tech + name = "Toxins Research" + desc = "Research into plasma based explosive devices. Upgrade through testing explosives in the toxins lab." + id = "toxins" + max_level = 7 + rare = 2 + /datum/tech/syndicate name = "Illegal Technologies Research" desc = "The study of technologies that violate standard Nanotrasen regulations." diff --git a/nano/templates/doppler_array.tmpl b/nano/templates/doppler_array.tmpl index d3bb40744b2..5747cd847a2 100644 --- a/nano/templates/doppler_array.tmpl +++ b/nano/templates/doppler_array.tmpl @@ -1,3 +1,5 @@ +

Shift's target : {{:data.explosion_target}}

+

Current Technology Level : {{:data.toxins_tech}}

Logged explosions:

{{if data.explosion_data == 0}}

No explosions logged this shift.