From dd6cb2ab048b497b69835fa1db5b446654ed6fdb Mon Sep 17 00:00:00 2001 From: EgorDinamit Date: Thu, 25 Jan 2024 21:55:32 +0300 Subject: [PATCH] Fluff engraver memory nanochip --- code/game/machinery/mind_engraver.dm | 5 +- .../items/devices/mind_engraver_chip.dm | 108 ++++++++++++++++++ 2 files changed, 112 insertions(+), 1 deletion(-) diff --git a/code/game/machinery/mind_engraver.dm b/code/game/machinery/mind_engraver.dm index b8a9a867e9..89c63367ca 100644 --- a/code/game/machinery/mind_engraver.dm +++ b/code/game/machinery/mind_engraver.dm @@ -89,7 +89,10 @@ return ..() /obj/machinery/mind_engraver/AltClick(mob/user) - RemoveChip(user) + if(CanDefaultInteract(user)) + RemoveChip(user) + return + return ..() /obj/machinery/mind_engraver/relaymove(mob/user) . = ..() diff --git a/code/game/objects/items/devices/mind_engraver_chip.dm b/code/game/objects/items/devices/mind_engraver_chip.dm index e8fb8aa473..ce04c645a4 100644 --- a/code/game/objects/items/devices/mind_engraver_chip.dm +++ b/code/game/objects/items/devices/mind_engraver_chip.dm @@ -183,3 +183,111 @@ /datum/engraver_data/language/adherent languages = list(LANGUAGE_ADHERENT) + +/* Fluff */ +/datum/engraver_data/memory + chip_type = "Memory Imprint" + var/function_text = "UNKNOWN" + +/datum/engraver_data/memory/PrintFunction() + if(!function_text) + return SPAN_DANGER("MISSING SKILL DATA") + return "[function_text]
" + +// Presets +/datum/engraver_data/memory/dominion_info_one + function_text = "Imprints basic information about Terran Dominion, as of year 244, III e." + // List of text that will be sent to the user some time after applying the nanochip + var/list/after_thoughts = list( + "Soldier" = list( + "You feel like it might be good idea to join the Terran Navy...", + "You think that Dominion's army could use a soldier like you...", + "There's definitely a need for people like you in the Terran military!", + "Why are you not in the Dominion's army...? You are missing out on so much...", + "You could be a Lieutenant by now, and then aristocratic status is just a step away...", + "The Terran Dominion needs you in its military... You are a great soldier!", + ), + "Governor" = list( + "You feel like Terran Dominion could use someone like you for their government apparatus...", + "You think it'd be really nice if you were governing some planet out there...", + "Maybe your skills would be incredibly useful if put to some use..?", + "You start to wonder how high planet governor's salary is...", + "The Terran Dominion definitely needs you as one of their governors... You are an excellent strategist and leader!", + ), + "Scientist" = list( + "You feel like you are a wonderful scientist...", + "You wonder if Dominion's Ministry of Scientific Progress is where you belong...", + "Terran Dominion rewards their scientist handsomely, doesn't it?", + "Your mind is full of useful knowldge and ideas, the Dominion would certainly need you...", + "Your place is with other great minds in the Terran Dominion... You are an absolute genius!", + ), + "Doctor" = list( + "You feel like you could save a lot more lives as a doctor in the Dominion's military...", + "Terran Dominion has better medical equipment than the ones you are used to...", + "How great would it be if you were a combat medic? Or a field surgeon for the Terran navy?", + "You are an absolute master with surgical tools and medical equipment, after all...", + "The Terran Dominion would not say \"no\" to a great doctor like you, you are the best one out there!", + ), + // Lmao, + "Useless" = list( + "You try to think of how useful you'd be for the Terran Dominion...", + "You feel like you are just not fit for society...", + "Maybe you could be a... something...?", + "Now you just feel like the most useless person in universe...", + "You think it's a great idea to donate your brain to the Ministry of Scientific Progress...", + "Maybe becoming a cyborg will make you more useful...", + ), + ) + +/datum/engraver_data/memory/dominion_info_one/ApplyEffect(mob/living/target) + if(!..()) + return FALSE + + var/list/dat = list() + + dat += "

Terran Dominion - Basic Information


" + dat += "This covers information about Terran Dominion as of year 244 of third era.
" + dat += "The following memories are all a part of the educational program initiated by the Ministry of Scientific Progress.
" + dat += "No other alterations will be present.

" + dat += "
" + dat += "Primary Language: English
" + dat += "Capital City: \[DATA EXPUNGED\] located on Earth, Sol system
" + dat += "Current Ruler: Emperor Jang Seo-joon" + dat += "
" + dat += "Terran Dominion is the official government of human species (homo-sapiens and its subtypes), \ + currently in control of over a hundred populated star systems and around 500 operational \ + space stations and motherships.
" + dat += "Terran Dominion is governed by the Emperor, which is appointed by the previous ruler as they see fit. \ + Members of aristocracy fill in the positions of authority, such as sector administrators, \ + ministers, advisors and military generals.
" + dat += "You, our dear citizen, is capable of joining the ranks of aristocracy by proving yourself to be a \ + valuable asset to the Dominion. Current data recommends that you seek employment in the following \ + fields if you are interested:
" + dat += "- Military;
" + dat += "- Planet Governor;
" + dat += "- Research & Development;
" + + var/datum/browser/popup = new(target, "mind_engraver_chip_[type]", "New Memory", 360, 500) + popup.set_content(JOINTEXT(dat)) + popup.open() + + to_chat(target, SPAN_WARNING("Your mind is flooded with batches of new information. You feel like you always knew it...")) + // SIDE EFFECTS! You now want to serve the Terran Dominion! Kinda... + var/chosen_type = "Useless" + // Trying to be as on-point as possible + if(target.get_skill_value(SKILL_HAULING) >= SKILL_EXPERIENCED || target.get_skill_value(SKILL_COMBAT) >= SKILL_TRAINED || target.get_skill_value(SKILL_WEAPONS) >= SKILL_TRAINED) + chosen_type = "Soldier" + else if(target.get_skill_value(SKILL_PILOT) >= SKILL_EXPERIENCED || target.get_skill_value(SKILL_BUREAUCRACY) >= SKILL_EXPERIENCED || target.get_skill_value(SKILL_FINANCE) >= SKILL_EXPERIENCED) + chosen_type = "Governor" + else if(target.get_skill_value(SKILL_SCIENCE) >= SKILL_EXPERIENCED || target.get_skill_value(SKILL_CHEMISTRY) >= SKILL_TRAINED || target.get_skill_value(SKILL_DEVICES) >= SKILL_EXPERIENCED) + chosen_type = "Scientist" + else if(target.get_skill_value(SKILL_MEDICAL) >= SKILL_TRAINED && target.get_skill_value(SKILL_ANATOMY) >= SKILL_TRAINED) + chosen_type = "Doctor" + + if(chosen_type in after_thoughts) + var/list/chosen_list = after_thoughts[chosen_type] + var/message_delay = rand(30 SECONDS, 80 SECONDS) + for(var/i = 1 to length(chosen_list)) + addtimer(CALLBACK(GLOBAL_PROC, /proc/to_chat, target, SPAN_SUBTLE(chosen_list[i])), (rand(90 SECONDS, 300 SECONDS) + (i * message_delay))) + + return TRUE