From e771c6230acb6280194d637125e6efd908479d25 Mon Sep 17 00:00:00 2001 From: kiVts <48099872+kiVts@users.noreply.github.com> Date: Thu, 18 Jan 2024 15:46:01 -0500 Subject: [PATCH 01/82] jesus christ forgive me for this shitcode --- code/_onclick/item_attack.dm | 17 ++- .../living/carbon/xenomorph/XenoAttacks.dm | 4 +- .../mob/living/carbon/xenomorph/Xenomorph.dm | 5 + code/modules/surgery/surgery_initiator.dm | 57 ++++++-- code/modules/surgery/surgery_procedure.dm | 11 +- code/modules/surgery/xeno.dm | 129 ++++++++++++++++++ colonialmarines.dme | 1 + 7 files changed, 206 insertions(+), 18 deletions(-) create mode 100644 code/modules/surgery/xeno.dm diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index c6052da33199..41829bd8d648 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -66,10 +66,25 @@ if(!(user in viewers(M, null))) showname = "." + if(isxeno(M) && M.stat == DEAD) + var/datum/surgery/current_surgery = M.active_surgeries[user.zone_selected] + if(current_surgery) + to_chat(user, "we are here000000") + if(current_surgery.attempt_next_step(user, src)) + to_chat(user, "we are here 2oh") + return FALSE //Cancel attack. + to_chat(user, "we are here 2uh") + else + to_chat(user, "we are here 2") + if(initiate_surgery_moment(src, M, "head" , user)) + to_chat(user, "got true") + return FALSE + to_chat(user, "got false") + if (user.a_intent == INTENT_HELP && ((user.client?.prefs && user.client?.prefs?.toggle_prefs & TOGGLE_HELP_INTENT_SAFETY) || (user.mob_flags & SURGERY_MODE_ON))) playsound(loc, 'sound/effects/pop.ogg', 25, 1) user.visible_message(SPAN_NOTICE("[M] has been poked with [src][showname]"),\ - SPAN_NOTICE("You poke [M == user ? "yourself":M] with [src]."), null, 4) + SPAN_NOTICE("You poke [M == user ? "yourself":M] with [src].LORD"), null, 4) return FALSE diff --git a/code/modules/mob/living/carbon/xenomorph/XenoAttacks.dm b/code/modules/mob/living/carbon/xenomorph/XenoAttacks.dm index 6361ff595b10..911c4af56309 100644 --- a/code/modules/mob/living/carbon/xenomorph/XenoAttacks.dm +++ b/code/modules/mob/living/carbon/xenomorph/XenoAttacks.dm @@ -49,10 +49,10 @@ backpack.open(M) return if(stat == DEAD) - M.visible_message(SPAN_WARNING("\The [M] pokes \the [src], but nothing happens."), \ + M.visible_message(SPAN_WARNING("\The [M] pokes \the [src], but nothing happens.DED"), \ SPAN_WARNING("You poke \the [src], but nothing happens."), null, 5, CHAT_TYPE_FLUFF_ACTION) else - M.visible_message(SPAN_WARNING("\The [M] pokes \the [src]."), \ + M.visible_message(SPAN_WARNING("\The [M] pokes \the [src].WA"), \ SPAN_WARNING("You poke \the [src]."), null, 5, CHAT_TYPE_FLUFF_ACTION) if(INTENT_GRAB) diff --git a/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm b/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm index cc0c12bd1cc8..73da4f0afbe7 100644 --- a/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm +++ b/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm @@ -256,6 +256,9 @@ var/life_daze_reduction = -1.5 var/life_slow_reduction = -1.5 + //Research organ harvesting. + var/organ_removed = FALSE + ////////////////////////////////////////////////////////////////// // @@ -690,6 +693,8 @@ if(iff_tag) . += SPAN_NOTICE("It has an IFF tag sticking out of its carapace.") + if(organ_removed) + . += "It seems to have its organ removed." /mob/living/carbon/xenomorph/Destroy() GLOB.living_xeno_list -= src diff --git a/code/modules/surgery/surgery_initiator.dm b/code/modules/surgery/surgery_initiator.dm index 08b4dbdfed60..9e3315e8940e 100644 --- a/code/modules/surgery/surgery_initiator.dm +++ b/code/modules/surgery/surgery_initiator.dm @@ -6,8 +6,9 @@ /proc/initiate_surgery_moment(obj/item/tool, mob/living/carbon/target, obj/limb/affecting, mob/living/user) if(!tool && !(affecting.status & LIMB_UNCALIBRATED_PROSTHETIC)) + to_chat(user, SPAN_WARNING("You can't perform surgery hggggggggggggggere!")) return FALSE - + to_chat(user, tool) var/target_zone = user.zone_selected var/list/available_surgeries = list() var/list/valid_steps = list() //Steps that could be performed, if we had the right tool. @@ -20,51 +21,74 @@ if(!istype(T) || !T.supports_surgery) if(tool.flags_item & CAN_DIG_SHRAPNEL) //Both shrapnel removal and prosthetic repair shouldn't be affected by being on the dropship. tool.dig_out_shrapnel_check(target, user) + to_chat(user, SPAN_WARNING("You can't peasdasdrform surgery here!")) return TRUE //Otherwise you get 'poked' by the knife. if(HAS_TRAIT(tool, TRAIT_TOOL_BLOWTORCH) && affecting) + to_chat(user, SPAN_WARNING("You can't perform saaaaaaaaaaaaaaaasurgery here!")) return FALSE if(!(tool.type in SURGERY_TOOLS_NO_INIT_MSG)) to_chat(user, SPAN_WARNING("You can't perform surgery under these bad conditions!")) + to_chat(user, SPAN_WARNING("You can't perform suggggggggggrgery here!")) return FALSE if(user.action_busy) //already doing an action + to_chat(user, SPAN_WARNING("You can't perform surgerasdasdasdasdasdy here!")) return FALSE for(var/datum/surgery/surgeryloop as anything in GLOB.surgeries_by_zone_and_depth[target_zone][target.incision_depths[target_zone]]) //Skill check. if((target.mob_flags & EASY_SURGERY) ? !skillcheck(user, SKILL_SURGERY, SKILL_SURGERY_NOVICE) : !skillcheck(user, SKILL_SURGERY, surgeryloop.required_surgery_skill)) + to_chat(user, SPAN_WARNING("You can't perform surgery heraaaaaaaaaaaaaaaaaaaaaaaae!")) continue + to_chat(user, surgeryloop) //Lying and self-surgery checks. if(surgeryloop.lying_required && !target.lying) + to_chat(user, "lying check failed as [surgeryloop]") continue if(!surgeryloop.self_operable && target == user) + to_chat(user, "selfop fail [surgeryloop]") continue - + to_chat(user, "starting lspecies [surgeryloop]") //Species check. if(!is_type_in_typecache(target, GLOB.surgical_patient_types["[surgeryloop]"])) + to_chat(user, "mobcheck failed [surgeryloop]") continue - + to_chat(user, "starting limbcheck [surgeryloop]") //Limb checks. + to_chat(user,"0") if(affecting) + to_chat(user,"1") if(surgeryloop.requires_bodypart) + to_chat(user,"2") if(affecting.status & LIMB_DESTROYED) + to_chat(user,"3") + to_chat(user, "m [surgeryloop] asdadas") continue else - if(!(affecting.status & LIMB_DESTROYED)) - continue - if(affecting.parent && affecting.parent.status & LIMB_DESTROYED) - continue + if(ishuman(target)) + to_chat(user,"4") + if(!(affecting.status & LIMB_DESTROYED) && ishuman(target)) + to_chat(user, "ma [surgeryloop]") + continue + to_chat(user,"5") + if(affecting.parent && affecting.parent.status & LIMB_DESTROYED && ishuman(target)) + to_chat(user, "mk failed [surgeryloop]") + continue + to_chat(user,"6") if(surgeryloop.requires_bodypart_type && !(affecting.status & surgeryloop.requires_bodypart_type)) + to_chat(user, "mobcheck failed [surgeryloop]") continue else if(surgeryloop.requires_bodypart) //mob with no limb in surgery zone when we need a limb + to_chat(user, "FUCK FUCK FUCK") continue - + to_chat(user,"8") + to_chat(user, "Limbcheck passed for [surgeryloop]") //Surgery-specific requirements. if(!surgeryloop.can_start(user, target, affecting, tool)) + to_chat(user, "this kekw") continue - //Tool checks. var/datum/surgery_step/current_step = GLOB.surgery_step_list[surgeryloop.steps[1]] @@ -74,14 +98,17 @@ var/datum/surgery_step/next_step = GLOB.surgery_step_list[surgeryloop.steps[2]] if(!next_step.tool_check(user, tool, surgeryloop)) valid_steps += next_step + to_chat(user, "Limbr [surgeryloop]") continue else + to_chat(user, "Limbcheck for [surgeryloop]") continue - + to_chat(user, "m AAAAAAAAA[surgeryloop]") available_surgeries[surgeryloop.name] = surgeryloop //Add it to the list. - + to_chat(user, "m [available_surgeries]") if(!length(available_surgeries)) if(!tool) + to_chat(user, "Limbcheck passaaaaasFFFFFFFFFFssssssed for") return FALSE if(target.incision_depths[target_zone] == SURGERY_DEPTH_SURFACE ? is_surgery_init_tool(tool) : is_surgery_tool(tool)) @@ -91,13 +118,15 @@ return FALSE if(!length(valid_steps)) + to_chat(user, "Limbcheck passaaaaasssssssed for") var/limbname = affecting?.status & LIMB_DESTROYED ? "the stump of [target]'s [affecting.display_name]" : "[target]'s [parse_zone(target_zone)]" if(target.incision_depths[target_zone] != SURGERY_DEPTH_SURFACE) to_chat(user, SPAN_WARNING("You don't know of any operations you could perform in the [target.incision_depths[target_zone]] incision on [limbname].")) else to_chat(user, SPAN_WARNING("You don't know of any operations you could begin on [limbname].")) + to_chat(user, SPAN_WARNING("You can't perform surgery rfrfrfrfrfrfrfrhere!")) return FALSE - + to_chat(user, "mSTARTING surgeryloop]") var/hint_msg for(var/datum/surgery_step/current_step as anything in valid_steps) if(hint_msg) @@ -108,12 +137,14 @@ else hint_msg = "You can't [current_step.desc] with \the [tool]" to_chat(user, SPAN_WARNING("[hint_msg].")) + to_chat(user, SPAN_WARNING("You cana1231231231232131222aasdd't perform surgery here!")) return FALSE var/datum/surgery/surgeryinstance if(length(available_surgeries) == 1) surgeryinstance = available_surgeries[available_surgeries[1]] else + to_chat(user, "mama [available_surgeries[1]]") surgeryinstance = available_surgeries[tgui_input_list(user, "Begin which procedure?", "Surgery", sortList(available_surgeries))] //we check that the surgery is still doable after the input() wait. if(!surgeryinstance || QDELETED(user) || user.is_mob_incapacitated() || !user.Adjacent(target) || tool != user.get_active_hand() || target_zone != user.zone_selected) @@ -146,7 +177,7 @@ return TRUE if(!surgeryinstance.can_start(user, target, affecting, tool)) return TRUE - + to_chat(user, "Limbcheck pass2222aaaaasssssssed for") var/datum/surgery/procedure = new surgeryinstance.type(target, target_zone, affecting) #ifdef DEBUG_SURGERY_INIT message_admins("[procedure.name] started.") diff --git a/code/modules/surgery/surgery_procedure.dm b/code/modules/surgery/surgery_procedure.dm index 1e11516a8079..64863a59fb06 100644 --- a/code/modules/surgery/surgery_procedure.dm +++ b/code/modules/surgery/surgery_procedure.dm @@ -69,10 +69,12 @@ ///Used on attackby and attackhand; TRUE means it stops the attack there, FALSE means it performs an item/open hand attack. CHECK OPENHAND ATTACK IS BLOCKED PROPERLY /datum/surgery/proc/attempt_next_step(mob/user, obj/item/tool, repeating) + to_chat(user, "-1") if(step_in_progress) if(!user.action_busy) //Otherwise, assume it's the same person. to_chat(user, SPAN_WARNING("Someone is already performing surgery on [target]'s [affected_limb.display_name]!")) return FALSE + return TRUE //So that you don't poke them with a tool you're already using. if(user.action_busy) @@ -88,12 +90,13 @@ to_chat(user, SPAN_WARNING("You need to set [target] down before you can operate on \him!")) else to_chat(user, SPAN_WARNING("You can't operate on [target], \he is being carried by [target.pulledby]!")) + to_chat(user, "we are here 222") return FALSE if(lying_required && !target.lying) to_chat(user, SPAN_WARNING("[user == target ? "You need" : "[target] needs"] to be lying down for this operation!")) return FALSE - + to_chat(user, "we are here") if(user == target) if(!self_operable) to_chat(user, SPAN_WARNING("You can't perform this operation on yourself!")) @@ -102,14 +105,16 @@ to_chat(user, SPAN_WARNING("You can't perform surgery on the same \ [user.zone_selected == "r_hand"||user.zone_selected == "l_hand" ? "hand":"arm"] you're using!")) return FALSE - + to_chat(user, "2") var/datum/surgery_step/current_step = GLOB.surgery_step_list[steps[status]] if(current_step) + to_chat(user, "we are hersteasae") if(current_step.attempt_step(user, target, user.zone_selected, tool, src, repeating)) //First, try this step. return TRUE var/datum/surgery_step/next_step if(current_step.skip_step_criteria(user, target, user.zone_selected, tool, src) && status < length(steps)) //If that doesn't work but the step is optional and not the last in the list, try the next step. next_step = GLOB.surgery_step_list[steps[status + 1]] + to_chat(user, "we are her12312312312313131231kkakkake") if(next_step.attempt_step(user, target, user.zone_selected, tool, src, skipped = TRUE)) return TRUE if(tool && is_surgery_tool(tool)) //Just because you used the wrong tool doesn't mean you meant to whack the patient with it... @@ -117,6 +122,8 @@ to_chat(user, SPAN_WARNING("You can't [current_step.desc] with \the [tool], or [next_step.desc].")) else to_chat(user, SPAN_WARNING("You can't [current_step.desc] with \the [tool].")) + to_chat(user, "we are here 22") return FALSE //...but you might be wanting to use it on them anyway. If on help intent, the help-intent safety will apply for this attack. + to_chat(user, "we are here 2") return FALSE diff --git a/code/modules/surgery/xeno.dm b/code/modules/surgery/xeno.dm new file mode 100644 index 000000000000..eeb4bac701fe --- /dev/null +++ b/code/modules/surgery/xeno.dm @@ -0,0 +1,129 @@ + +//Research stuff to extract stuff from xenomorphs for goodies. In other words, to extract usefull material that could be used to upgrade marines and etc. doesnt add anything of kind + +/datum/surgery/xenomorph + name = "Experimental Harvesting Surgery" + invasiveness = list(SURGERY_DEPTH_SURFACE) + required_surgery_skill = SKILL_SURGERY_NOVICE + possible_locs = list("head") + target_mobtypes = list(/mob/living/carbon/xenomorph) + steps = list( + /datum/surgery_step/xenomorph/cut_exoskeleton, + /datum/surgery_step/xenomorph/open_exoskeleton, + ///datum/surgery_step/xenomorph/severe_connections + ) + lying_required = FALSE + requires_bodypart_type = NONE + requires_bodypart = FALSE + +/datum/surgery/xenomorph/can_start(mob/user, mob/living/carbon/xenomorph/patient, obj/limb/L, obj/item/tool) + if(patient.stat == DEAD && !patient.organ_removed) + return TRUE + return FALSE + +/datum/surgery_step/xenomorph/cut_exoskeleton + name = "Cut Exoskeleton Carapace" + desc = "Cut the carapace open." + tools = SURGERY_TOOLS_SEVER_BONE + time = 4 SECONDS + preop_sound = 'sound/handling/clothingrustle1.ogg' + success_sound = 'sound/handling/bandage.ogg' + failure_sound = 'sound/surgery/organ2.ogg' + +/datum/surgery_step/xenomorph/cut_exoskeleton/preop(mob/living/carbon/human/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) + if(tool_type == /obj/item/tool/surgery/circular_saw) + user.affected_message(target, + SPAN_NOTICE("You start to cut [target.caste_type] carapace apart using \the [tool], carefully, with barely any acid."), + SPAN_NOTICE("[user] starts to cut Your carapace apart using \the [tool], carefully, with barely any acid."), + SPAN_NOTICE("[user] starts to cut [target.caste_type] carapace. \the [tool], carefully, with barely any acid.")) + if(user.head && !(user.head.flags_inventory & COVEREYES)) + var/datum/internal_organ/eyes/user_eye = user.internal_organs_by_name["eyes"] + user_eye.take_damage(rand(1,2), FALSE) + to_chat(user, SPAN_DANGER("Some acid gets into your eyes!")) + else + user.affected_message(target, + SPAN_NOTICE("You start to [pick("smash", "crack", "break")] [target.caste_type] carapace apart using \the [tool], Recklessly, with acid splashing on you!"), + SPAN_NOTICE("[user] starts to [pick("smash", "crack", "break")] Your carapace apart using \the [tool], Recklessly, with acid splashing on you!"), + SPAN_NOTICE("[user] starts to [pick("smash", "crack", "break")] [target.caste_type] carapace with \the [tool], Recklessly, with acid splashing him!")) + if(user.head && !(user.head.flags_inventory & COVEREYES)) + var/datum/internal_organ/eyes/user_eye = user.internal_organs_by_name["eyes"] + user_eye.take_damage(rand(3,5), FALSE) + to_chat(user, SPAN_DANGER("Lots of acid gets into your eyes!")) + user.emote("pain") + user.apply_damage(rand(10,25),BURN) + +/datum/surgery_step/xenomorph/cut_exoskeleton/success(mob/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) + if(tool_type == /obj/item/tool/surgery/circular_saw) + user.affected_message(target, + SPAN_NOTICE("You succesfully cut through [target.caste_type] carapace apart using \the [tool]."), + SPAN_NOTICE("[user] Succesfully cuts through Your carapace. \the [tool]."), + SPAN_NOTICE("[user] Succesfully cuts [target.caste_type] carapace. \the [tool].")) + else + user.affected_message(target, + SPAN_NOTICE("You succesfully destroy [target.caste_type] carapace into bits and pieces apart using \the [tool]."), + SPAN_NOTICE("[user] succesfully destroys Your carapace into bits and pieces apart using \the [tool]."),, + SPAN_NOTICE("[user] Succesfully destroys [target.caste_type] carapace into bits and pieces apart using \the [tool].")) + +/datum/surgery_step/xenomorph/cut_exoskeleton/failure(mob/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) + if(tool_type == /obj/item/tool/surgery/circular_saw) + user.affected_message(target, + SPAN_WARNING("Your hand slips, failing to cut [target.caste_type] carapace apart using \the [tool]!"), + SPAN_WARNING("[user] hand slips, failing to cut Your carapace apart using \the [tool]!"), + SPAN_WARNING("[user] hand slips, failing to cut [target.caste_type] carapace using \the [tool]!")) + else + user.affected_message(target, + SPAN_WARNING("Your hand slips, failing to destroy [target.caste_type] carapace into bits and pieces apart using \the [tool]."), + SPAN_WARNING("[user] hand slips, failing to destroy Your carapace into bits and pieces using \the [tool]."), + SPAN_WARNING("[user] hand slips, failing to destroy [target.caste_type] carapace into bits and pieces using \the [tool].")) + +/datum/surgery_step/xenomorph/open_exoskeleton + name = "Pry exoskeleton open" + desc = "Open the exoskeleton in the opening." + tools = SURGERY_TOOLS_PRY_ENCASED + time = 3 SECONDS + preop_sound = 'sound/surgery/retractor1.ogg' + success_sound = 'sound/surgery/retractor2.ogg' + failure_sound = 'sound/surgery/organ1.ogg' + +/datum/surgery_step/xenomorph/open_exoskeleton/preop(mob/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) + user.affected_message(target, + SPAN_NOTICE("You start to pry [target.caste_type] carapace open using \the [tool], slowly"), + SPAN_NOTICE("[user] starts to pry Your carapace open with \the [tool] very carefully"), + SPAN_NOTICE("[user] starts to pry [target.caste_type] carapace open with \the [tool] very carefully")) + +/datum/surgery_step/xenomorph/open_exoskeleton/success(mob/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) + if(tool_type == /obj/item/tool/surgery/retractor) + user.affected_message(target, + SPAN_NOTICE("You hold [target.caste_type] carapace and exoskeleton open using \the [tool], exposing [target.caste_type] vital organs"), + SPAN_NOTICE("[user] Holds Your carapace and exoskeleton open with \the [tool], exposing [target.caste_type] vital organs "), + SPAN_NOTICE("[user] Holds [target.caste_type] carapace and exoskeleton open with \the [tool], exposing [target.caste_type] vital organs ")) + else + user.affected_message(target, + SPAN_NOTICE("You Hold [target.caste_type] carapace open using \the [tool] like a medieval doctor, exposing [target.caste_type] vital organs"), + SPAN_NOTICE("[user] starts to open Your carapace with \the [tool] very carefully"), + SPAN_NOTICE("[user] starts to open [target.caste_type] carapace with \the [tool] very carefully")) + +/datum/surgery_step/xenomorph/open_exoskeleton/failure(mob/living/carbon/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) + user.affected_message(target, + SPAN_WARNING("Your hand slips, letting go of [target.caste_type] carapace and exoskeleton, slaming it back into place and splashing acid everywhere!"), + SPAN_WARNING("[user] hand slips, letting go of [target.caste_type] carapace and exoskeleton, slaming it back into place and splashing acid everywhere!"), + SPAN_WARNING("[user] hand slips, letting go of [target.caste_type] carapace and exoskeleton, slaming it back into place and splashing acid everywhere!")) + user.apply_damage(rand(5, 15), BURN) +/* +/datum/surgery_step/xenomorph/severe_connections + name = "Severe organ connections" + desc = "Detach tubes and connections from organ." + tools = list( + /obj/item/tool/surgery/scalpel = SURGERY_TOOL_MULT_IDEAL, + /obj/item/tool/surgery/scalpel/pict_system = SURGERY_TOOL_MULT_IDEAL, + /obj/item/attachable/bayonet = SURGERY_TOOL_MULT_SUBSTITUTE, + /obj/item/tool/kitchen/knife = SURGERY_TOOL_MULT_SUBSTITUTE, + /obj/item/shard = SURGERY_TOOL_MULT_AWFUL, + ) //shamelessly taken from embryo code + time = 5 SECONDS + preop_sound = 'sound/surgery/scalpel1.ogg' + success_sound = 'sound/surgery/scalpel2.ogg' + failure_sound = 'sound/surgery/organ2.ogg' + +/datum/surgery_step/xenomorph/remove_organ +*/ diff --git a/colonialmarines.dme b/colonialmarines.dme index 43a250b7b091..e6aff3abae6a 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -2203,6 +2203,7 @@ #include "code\modules\surgery\surgery_steps.dm" #include "code\modules\surgery\surgery_toggle.dm" #include "code\modules\surgery\tendwounds.dm" +#include "code\modules\surgery\xeno.dm" #include "code\modules\teleporters\teleporter.dm" #include "code\modules\teleporters\teleporter_admin_verbs.dm" #include "code\modules\teleporters\teleporter_console.dm" From 0234eb1e92279cdcfb41e19dfc186431b168fe79 Mon Sep 17 00:00:00 2001 From: kiVts <48099872+kiVts@users.noreply.github.com> Date: Thu, 18 Jan 2024 15:54:31 -0500 Subject: [PATCH 02/82] Revert "jesus christ forgive me for this shitcode" This reverts commit e771c6230acb6280194d637125e6efd908479d25. --- code/_onclick/item_attack.dm | 17 +-- .../living/carbon/xenomorph/XenoAttacks.dm | 4 +- .../mob/living/carbon/xenomorph/Xenomorph.dm | 5 - code/modules/surgery/surgery_initiator.dm | 57 ++------ code/modules/surgery/surgery_procedure.dm | 11 +- code/modules/surgery/xeno.dm | 129 ------------------ colonialmarines.dme | 1 - 7 files changed, 18 insertions(+), 206 deletions(-) delete mode 100644 code/modules/surgery/xeno.dm diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 41829bd8d648..c6052da33199 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -66,25 +66,10 @@ if(!(user in viewers(M, null))) showname = "." - if(isxeno(M) && M.stat == DEAD) - var/datum/surgery/current_surgery = M.active_surgeries[user.zone_selected] - if(current_surgery) - to_chat(user, "we are here000000") - if(current_surgery.attempt_next_step(user, src)) - to_chat(user, "we are here 2oh") - return FALSE //Cancel attack. - to_chat(user, "we are here 2uh") - else - to_chat(user, "we are here 2") - if(initiate_surgery_moment(src, M, "head" , user)) - to_chat(user, "got true") - return FALSE - to_chat(user, "got false") - if (user.a_intent == INTENT_HELP && ((user.client?.prefs && user.client?.prefs?.toggle_prefs & TOGGLE_HELP_INTENT_SAFETY) || (user.mob_flags & SURGERY_MODE_ON))) playsound(loc, 'sound/effects/pop.ogg', 25, 1) user.visible_message(SPAN_NOTICE("[M] has been poked with [src][showname]"),\ - SPAN_NOTICE("You poke [M == user ? "yourself":M] with [src].LORD"), null, 4) + SPAN_NOTICE("You poke [M == user ? "yourself":M] with [src]."), null, 4) return FALSE diff --git a/code/modules/mob/living/carbon/xenomorph/XenoAttacks.dm b/code/modules/mob/living/carbon/xenomorph/XenoAttacks.dm index 911c4af56309..6361ff595b10 100644 --- a/code/modules/mob/living/carbon/xenomorph/XenoAttacks.dm +++ b/code/modules/mob/living/carbon/xenomorph/XenoAttacks.dm @@ -49,10 +49,10 @@ backpack.open(M) return if(stat == DEAD) - M.visible_message(SPAN_WARNING("\The [M] pokes \the [src], but nothing happens.DED"), \ + M.visible_message(SPAN_WARNING("\The [M] pokes \the [src], but nothing happens."), \ SPAN_WARNING("You poke \the [src], but nothing happens."), null, 5, CHAT_TYPE_FLUFF_ACTION) else - M.visible_message(SPAN_WARNING("\The [M] pokes \the [src].WA"), \ + M.visible_message(SPAN_WARNING("\The [M] pokes \the [src]."), \ SPAN_WARNING("You poke \the [src]."), null, 5, CHAT_TYPE_FLUFF_ACTION) if(INTENT_GRAB) diff --git a/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm b/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm index 73da4f0afbe7..cc0c12bd1cc8 100644 --- a/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm +++ b/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm @@ -256,9 +256,6 @@ var/life_daze_reduction = -1.5 var/life_slow_reduction = -1.5 - //Research organ harvesting. - var/organ_removed = FALSE - ////////////////////////////////////////////////////////////////// // @@ -693,8 +690,6 @@ if(iff_tag) . += SPAN_NOTICE("It has an IFF tag sticking out of its carapace.") - if(organ_removed) - . += "It seems to have its organ removed." /mob/living/carbon/xenomorph/Destroy() GLOB.living_xeno_list -= src diff --git a/code/modules/surgery/surgery_initiator.dm b/code/modules/surgery/surgery_initiator.dm index 9e3315e8940e..08b4dbdfed60 100644 --- a/code/modules/surgery/surgery_initiator.dm +++ b/code/modules/surgery/surgery_initiator.dm @@ -6,9 +6,8 @@ /proc/initiate_surgery_moment(obj/item/tool, mob/living/carbon/target, obj/limb/affecting, mob/living/user) if(!tool && !(affecting.status & LIMB_UNCALIBRATED_PROSTHETIC)) - to_chat(user, SPAN_WARNING("You can't perform surgery hggggggggggggggere!")) return FALSE - to_chat(user, tool) + var/target_zone = user.zone_selected var/list/available_surgeries = list() var/list/valid_steps = list() //Steps that could be performed, if we had the right tool. @@ -21,74 +20,51 @@ if(!istype(T) || !T.supports_surgery) if(tool.flags_item & CAN_DIG_SHRAPNEL) //Both shrapnel removal and prosthetic repair shouldn't be affected by being on the dropship. tool.dig_out_shrapnel_check(target, user) - to_chat(user, SPAN_WARNING("You can't peasdasdrform surgery here!")) return TRUE //Otherwise you get 'poked' by the knife. if(HAS_TRAIT(tool, TRAIT_TOOL_BLOWTORCH) && affecting) - to_chat(user, SPAN_WARNING("You can't perform saaaaaaaaaaaaaaaasurgery here!")) return FALSE if(!(tool.type in SURGERY_TOOLS_NO_INIT_MSG)) to_chat(user, SPAN_WARNING("You can't perform surgery under these bad conditions!")) - to_chat(user, SPAN_WARNING("You can't perform suggggggggggrgery here!")) return FALSE if(user.action_busy) //already doing an action - to_chat(user, SPAN_WARNING("You can't perform surgerasdasdasdasdasdy here!")) return FALSE for(var/datum/surgery/surgeryloop as anything in GLOB.surgeries_by_zone_and_depth[target_zone][target.incision_depths[target_zone]]) //Skill check. if((target.mob_flags & EASY_SURGERY) ? !skillcheck(user, SKILL_SURGERY, SKILL_SURGERY_NOVICE) : !skillcheck(user, SKILL_SURGERY, surgeryloop.required_surgery_skill)) - to_chat(user, SPAN_WARNING("You can't perform surgery heraaaaaaaaaaaaaaaaaaaaaaaae!")) continue - to_chat(user, surgeryloop) //Lying and self-surgery checks. if(surgeryloop.lying_required && !target.lying) - to_chat(user, "lying check failed as [surgeryloop]") continue if(!surgeryloop.self_operable && target == user) - to_chat(user, "selfop fail [surgeryloop]") continue - to_chat(user, "starting lspecies [surgeryloop]") + //Species check. if(!is_type_in_typecache(target, GLOB.surgical_patient_types["[surgeryloop]"])) - to_chat(user, "mobcheck failed [surgeryloop]") continue - to_chat(user, "starting limbcheck [surgeryloop]") + //Limb checks. - to_chat(user,"0") if(affecting) - to_chat(user,"1") if(surgeryloop.requires_bodypart) - to_chat(user,"2") if(affecting.status & LIMB_DESTROYED) - to_chat(user,"3") - to_chat(user, "m [surgeryloop] asdadas") continue else - if(ishuman(target)) - to_chat(user,"4") - if(!(affecting.status & LIMB_DESTROYED) && ishuman(target)) - to_chat(user, "ma [surgeryloop]") - continue - to_chat(user,"5") - if(affecting.parent && affecting.parent.status & LIMB_DESTROYED && ishuman(target)) - to_chat(user, "mk failed [surgeryloop]") - continue - to_chat(user,"6") + if(!(affecting.status & LIMB_DESTROYED)) + continue + if(affecting.parent && affecting.parent.status & LIMB_DESTROYED) + continue if(surgeryloop.requires_bodypart_type && !(affecting.status & surgeryloop.requires_bodypart_type)) - to_chat(user, "mobcheck failed [surgeryloop]") continue else if(surgeryloop.requires_bodypart) //mob with no limb in surgery zone when we need a limb - to_chat(user, "FUCK FUCK FUCK") continue - to_chat(user,"8") - to_chat(user, "Limbcheck passed for [surgeryloop]") + //Surgery-specific requirements. if(!surgeryloop.can_start(user, target, affecting, tool)) - to_chat(user, "this kekw") continue + //Tool checks. var/datum/surgery_step/current_step = GLOB.surgery_step_list[surgeryloop.steps[1]] @@ -98,17 +74,14 @@ var/datum/surgery_step/next_step = GLOB.surgery_step_list[surgeryloop.steps[2]] if(!next_step.tool_check(user, tool, surgeryloop)) valid_steps += next_step - to_chat(user, "Limbr [surgeryloop]") continue else - to_chat(user, "Limbcheck for [surgeryloop]") continue - to_chat(user, "m AAAAAAAAA[surgeryloop]") + available_surgeries[surgeryloop.name] = surgeryloop //Add it to the list. - to_chat(user, "m [available_surgeries]") + if(!length(available_surgeries)) if(!tool) - to_chat(user, "Limbcheck passaaaaasFFFFFFFFFFssssssed for") return FALSE if(target.incision_depths[target_zone] == SURGERY_DEPTH_SURFACE ? is_surgery_init_tool(tool) : is_surgery_tool(tool)) @@ -118,15 +91,13 @@ return FALSE if(!length(valid_steps)) - to_chat(user, "Limbcheck passaaaaasssssssed for") var/limbname = affecting?.status & LIMB_DESTROYED ? "the stump of [target]'s [affecting.display_name]" : "[target]'s [parse_zone(target_zone)]" if(target.incision_depths[target_zone] != SURGERY_DEPTH_SURFACE) to_chat(user, SPAN_WARNING("You don't know of any operations you could perform in the [target.incision_depths[target_zone]] incision on [limbname].")) else to_chat(user, SPAN_WARNING("You don't know of any operations you could begin on [limbname].")) - to_chat(user, SPAN_WARNING("You can't perform surgery rfrfrfrfrfrfrfrhere!")) return FALSE - to_chat(user, "mSTARTING surgeryloop]") + var/hint_msg for(var/datum/surgery_step/current_step as anything in valid_steps) if(hint_msg) @@ -137,14 +108,12 @@ else hint_msg = "You can't [current_step.desc] with \the [tool]" to_chat(user, SPAN_WARNING("[hint_msg].")) - to_chat(user, SPAN_WARNING("You cana1231231231232131222aasdd't perform surgery here!")) return FALSE var/datum/surgery/surgeryinstance if(length(available_surgeries) == 1) surgeryinstance = available_surgeries[available_surgeries[1]] else - to_chat(user, "mama [available_surgeries[1]]") surgeryinstance = available_surgeries[tgui_input_list(user, "Begin which procedure?", "Surgery", sortList(available_surgeries))] //we check that the surgery is still doable after the input() wait. if(!surgeryinstance || QDELETED(user) || user.is_mob_incapacitated() || !user.Adjacent(target) || tool != user.get_active_hand() || target_zone != user.zone_selected) @@ -177,7 +146,7 @@ return TRUE if(!surgeryinstance.can_start(user, target, affecting, tool)) return TRUE - to_chat(user, "Limbcheck pass2222aaaaasssssssed for") + var/datum/surgery/procedure = new surgeryinstance.type(target, target_zone, affecting) #ifdef DEBUG_SURGERY_INIT message_admins("[procedure.name] started.") diff --git a/code/modules/surgery/surgery_procedure.dm b/code/modules/surgery/surgery_procedure.dm index 64863a59fb06..1e11516a8079 100644 --- a/code/modules/surgery/surgery_procedure.dm +++ b/code/modules/surgery/surgery_procedure.dm @@ -69,12 +69,10 @@ ///Used on attackby and attackhand; TRUE means it stops the attack there, FALSE means it performs an item/open hand attack. CHECK OPENHAND ATTACK IS BLOCKED PROPERLY /datum/surgery/proc/attempt_next_step(mob/user, obj/item/tool, repeating) - to_chat(user, "-1") if(step_in_progress) if(!user.action_busy) //Otherwise, assume it's the same person. to_chat(user, SPAN_WARNING("Someone is already performing surgery on [target]'s [affected_limb.display_name]!")) return FALSE - return TRUE //So that you don't poke them with a tool you're already using. if(user.action_busy) @@ -90,13 +88,12 @@ to_chat(user, SPAN_WARNING("You need to set [target] down before you can operate on \him!")) else to_chat(user, SPAN_WARNING("You can't operate on [target], \he is being carried by [target.pulledby]!")) - to_chat(user, "we are here 222") return FALSE if(lying_required && !target.lying) to_chat(user, SPAN_WARNING("[user == target ? "You need" : "[target] needs"] to be lying down for this operation!")) return FALSE - to_chat(user, "we are here") + if(user == target) if(!self_operable) to_chat(user, SPAN_WARNING("You can't perform this operation on yourself!")) @@ -105,16 +102,14 @@ to_chat(user, SPAN_WARNING("You can't perform surgery on the same \ [user.zone_selected == "r_hand"||user.zone_selected == "l_hand" ? "hand":"arm"] you're using!")) return FALSE - to_chat(user, "2") + var/datum/surgery_step/current_step = GLOB.surgery_step_list[steps[status]] if(current_step) - to_chat(user, "we are hersteasae") if(current_step.attempt_step(user, target, user.zone_selected, tool, src, repeating)) //First, try this step. return TRUE var/datum/surgery_step/next_step if(current_step.skip_step_criteria(user, target, user.zone_selected, tool, src) && status < length(steps)) //If that doesn't work but the step is optional and not the last in the list, try the next step. next_step = GLOB.surgery_step_list[steps[status + 1]] - to_chat(user, "we are her12312312312313131231kkakkake") if(next_step.attempt_step(user, target, user.zone_selected, tool, src, skipped = TRUE)) return TRUE if(tool && is_surgery_tool(tool)) //Just because you used the wrong tool doesn't mean you meant to whack the patient with it... @@ -122,8 +117,6 @@ to_chat(user, SPAN_WARNING("You can't [current_step.desc] with \the [tool], or [next_step.desc].")) else to_chat(user, SPAN_WARNING("You can't [current_step.desc] with \the [tool].")) - to_chat(user, "we are here 22") return FALSE //...but you might be wanting to use it on them anyway. If on help intent, the help-intent safety will apply for this attack. - to_chat(user, "we are here 2") return FALSE diff --git a/code/modules/surgery/xeno.dm b/code/modules/surgery/xeno.dm deleted file mode 100644 index eeb4bac701fe..000000000000 --- a/code/modules/surgery/xeno.dm +++ /dev/null @@ -1,129 +0,0 @@ - -//Research stuff to extract stuff from xenomorphs for goodies. In other words, to extract usefull material that could be used to upgrade marines and etc. doesnt add anything of kind - -/datum/surgery/xenomorph - name = "Experimental Harvesting Surgery" - invasiveness = list(SURGERY_DEPTH_SURFACE) - required_surgery_skill = SKILL_SURGERY_NOVICE - possible_locs = list("head") - target_mobtypes = list(/mob/living/carbon/xenomorph) - steps = list( - /datum/surgery_step/xenomorph/cut_exoskeleton, - /datum/surgery_step/xenomorph/open_exoskeleton, - ///datum/surgery_step/xenomorph/severe_connections - ) - lying_required = FALSE - requires_bodypart_type = NONE - requires_bodypart = FALSE - -/datum/surgery/xenomorph/can_start(mob/user, mob/living/carbon/xenomorph/patient, obj/limb/L, obj/item/tool) - if(patient.stat == DEAD && !patient.organ_removed) - return TRUE - return FALSE - -/datum/surgery_step/xenomorph/cut_exoskeleton - name = "Cut Exoskeleton Carapace" - desc = "Cut the carapace open." - tools = SURGERY_TOOLS_SEVER_BONE - time = 4 SECONDS - preop_sound = 'sound/handling/clothingrustle1.ogg' - success_sound = 'sound/handling/bandage.ogg' - failure_sound = 'sound/surgery/organ2.ogg' - -/datum/surgery_step/xenomorph/cut_exoskeleton/preop(mob/living/carbon/human/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) - if(tool_type == /obj/item/tool/surgery/circular_saw) - user.affected_message(target, - SPAN_NOTICE("You start to cut [target.caste_type] carapace apart using \the [tool], carefully, with barely any acid."), - SPAN_NOTICE("[user] starts to cut Your carapace apart using \the [tool], carefully, with barely any acid."), - SPAN_NOTICE("[user] starts to cut [target.caste_type] carapace. \the [tool], carefully, with barely any acid.")) - if(user.head && !(user.head.flags_inventory & COVEREYES)) - var/datum/internal_organ/eyes/user_eye = user.internal_organs_by_name["eyes"] - user_eye.take_damage(rand(1,2), FALSE) - to_chat(user, SPAN_DANGER("Some acid gets into your eyes!")) - else - user.affected_message(target, - SPAN_NOTICE("You start to [pick("smash", "crack", "break")] [target.caste_type] carapace apart using \the [tool], Recklessly, with acid splashing on you!"), - SPAN_NOTICE("[user] starts to [pick("smash", "crack", "break")] Your carapace apart using \the [tool], Recklessly, with acid splashing on you!"), - SPAN_NOTICE("[user] starts to [pick("smash", "crack", "break")] [target.caste_type] carapace with \the [tool], Recklessly, with acid splashing him!")) - if(user.head && !(user.head.flags_inventory & COVEREYES)) - var/datum/internal_organ/eyes/user_eye = user.internal_organs_by_name["eyes"] - user_eye.take_damage(rand(3,5), FALSE) - to_chat(user, SPAN_DANGER("Lots of acid gets into your eyes!")) - user.emote("pain") - user.apply_damage(rand(10,25),BURN) - -/datum/surgery_step/xenomorph/cut_exoskeleton/success(mob/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) - if(tool_type == /obj/item/tool/surgery/circular_saw) - user.affected_message(target, - SPAN_NOTICE("You succesfully cut through [target.caste_type] carapace apart using \the [tool]."), - SPAN_NOTICE("[user] Succesfully cuts through Your carapace. \the [tool]."), - SPAN_NOTICE("[user] Succesfully cuts [target.caste_type] carapace. \the [tool].")) - else - user.affected_message(target, - SPAN_NOTICE("You succesfully destroy [target.caste_type] carapace into bits and pieces apart using \the [tool]."), - SPAN_NOTICE("[user] succesfully destroys Your carapace into bits and pieces apart using \the [tool]."),, - SPAN_NOTICE("[user] Succesfully destroys [target.caste_type] carapace into bits and pieces apart using \the [tool].")) - -/datum/surgery_step/xenomorph/cut_exoskeleton/failure(mob/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) - if(tool_type == /obj/item/tool/surgery/circular_saw) - user.affected_message(target, - SPAN_WARNING("Your hand slips, failing to cut [target.caste_type] carapace apart using \the [tool]!"), - SPAN_WARNING("[user] hand slips, failing to cut Your carapace apart using \the [tool]!"), - SPAN_WARNING("[user] hand slips, failing to cut [target.caste_type] carapace using \the [tool]!")) - else - user.affected_message(target, - SPAN_WARNING("Your hand slips, failing to destroy [target.caste_type] carapace into bits and pieces apart using \the [tool]."), - SPAN_WARNING("[user] hand slips, failing to destroy Your carapace into bits and pieces using \the [tool]."), - SPAN_WARNING("[user] hand slips, failing to destroy [target.caste_type] carapace into bits and pieces using \the [tool].")) - -/datum/surgery_step/xenomorph/open_exoskeleton - name = "Pry exoskeleton open" - desc = "Open the exoskeleton in the opening." - tools = SURGERY_TOOLS_PRY_ENCASED - time = 3 SECONDS - preop_sound = 'sound/surgery/retractor1.ogg' - success_sound = 'sound/surgery/retractor2.ogg' - failure_sound = 'sound/surgery/organ1.ogg' - -/datum/surgery_step/xenomorph/open_exoskeleton/preop(mob/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) - user.affected_message(target, - SPAN_NOTICE("You start to pry [target.caste_type] carapace open using \the [tool], slowly"), - SPAN_NOTICE("[user] starts to pry Your carapace open with \the [tool] very carefully"), - SPAN_NOTICE("[user] starts to pry [target.caste_type] carapace open with \the [tool] very carefully")) - -/datum/surgery_step/xenomorph/open_exoskeleton/success(mob/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) - if(tool_type == /obj/item/tool/surgery/retractor) - user.affected_message(target, - SPAN_NOTICE("You hold [target.caste_type] carapace and exoskeleton open using \the [tool], exposing [target.caste_type] vital organs"), - SPAN_NOTICE("[user] Holds Your carapace and exoskeleton open with \the [tool], exposing [target.caste_type] vital organs "), - SPAN_NOTICE("[user] Holds [target.caste_type] carapace and exoskeleton open with \the [tool], exposing [target.caste_type] vital organs ")) - else - user.affected_message(target, - SPAN_NOTICE("You Hold [target.caste_type] carapace open using \the [tool] like a medieval doctor, exposing [target.caste_type] vital organs"), - SPAN_NOTICE("[user] starts to open Your carapace with \the [tool] very carefully"), - SPAN_NOTICE("[user] starts to open [target.caste_type] carapace with \the [tool] very carefully")) - -/datum/surgery_step/xenomorph/open_exoskeleton/failure(mob/living/carbon/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) - user.affected_message(target, - SPAN_WARNING("Your hand slips, letting go of [target.caste_type] carapace and exoskeleton, slaming it back into place and splashing acid everywhere!"), - SPAN_WARNING("[user] hand slips, letting go of [target.caste_type] carapace and exoskeleton, slaming it back into place and splashing acid everywhere!"), - SPAN_WARNING("[user] hand slips, letting go of [target.caste_type] carapace and exoskeleton, slaming it back into place and splashing acid everywhere!")) - user.apply_damage(rand(5, 15), BURN) -/* -/datum/surgery_step/xenomorph/severe_connections - name = "Severe organ connections" - desc = "Detach tubes and connections from organ." - tools = list( - /obj/item/tool/surgery/scalpel = SURGERY_TOOL_MULT_IDEAL, - /obj/item/tool/surgery/scalpel/pict_system = SURGERY_TOOL_MULT_IDEAL, - /obj/item/attachable/bayonet = SURGERY_TOOL_MULT_SUBSTITUTE, - /obj/item/tool/kitchen/knife = SURGERY_TOOL_MULT_SUBSTITUTE, - /obj/item/shard = SURGERY_TOOL_MULT_AWFUL, - ) //shamelessly taken from embryo code - time = 5 SECONDS - preop_sound = 'sound/surgery/scalpel1.ogg' - success_sound = 'sound/surgery/scalpel2.ogg' - failure_sound = 'sound/surgery/organ2.ogg' - -/datum/surgery_step/xenomorph/remove_organ -*/ diff --git a/colonialmarines.dme b/colonialmarines.dme index e6aff3abae6a..43a250b7b091 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -2203,7 +2203,6 @@ #include "code\modules\surgery\surgery_steps.dm" #include "code\modules\surgery\surgery_toggle.dm" #include "code\modules\surgery\tendwounds.dm" -#include "code\modules\surgery\xeno.dm" #include "code\modules\teleporters\teleporter.dm" #include "code\modules\teleporters\teleporter_admin_verbs.dm" #include "code\modules\teleporters\teleporter_console.dm" From b181704cebdfb53b2936a87c473cc3e571754b88 Mon Sep 17 00:00:00 2001 From: kiVts <48099872+kiVts@users.noreply.github.com> Date: Thu, 18 Jan 2024 16:01:41 -0500 Subject: [PATCH 03/82] Revert "Revert "jesus christ forgive me for this shitcode"" This reverts commit 0234eb1e92279cdcfb41e19dfc186431b168fe79. --- code/_onclick/item_attack.dm | 17 ++- .../living/carbon/xenomorph/XenoAttacks.dm | 4 +- .../mob/living/carbon/xenomorph/Xenomorph.dm | 6 + code/modules/surgery/surgery_initiator.dm | 56 ++++++-- code/modules/surgery/surgery_procedure.dm | 11 +- code/modules/surgery/xeno.dm | 129 ++++++++++++++++++ colonialmarines.dme | 1 + 7 files changed, 206 insertions(+), 18 deletions(-) create mode 100644 code/modules/surgery/xeno.dm diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 8d77920a59cc..4d77a7113048 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -68,10 +68,25 @@ if(!(user in viewers(M, null))) showname = "." + if(isxeno(M) && M.stat == DEAD) + var/datum/surgery/current_surgery = M.active_surgeries[user.zone_selected] + if(current_surgery) + to_chat(user, "we are here000000") + if(current_surgery.attempt_next_step(user, src)) + to_chat(user, "we are here 2oh") + return FALSE //Cancel attack. + to_chat(user, "we are here 2uh") + else + to_chat(user, "we are here 2") + if(initiate_surgery_moment(src, M, "head" , user)) + to_chat(user, "got true") + return FALSE + to_chat(user, "got false") + if (user.a_intent == INTENT_HELP && ((user.client?.prefs && user.client?.prefs?.toggle_prefs & TOGGLE_HELP_INTENT_SAFETY) || (user.mob_flags & SURGERY_MODE_ON))) playsound(loc, 'sound/effects/pop.ogg', 25, 1) user.visible_message(SPAN_NOTICE("[M] has been poked with [src][showname]"),\ - SPAN_NOTICE("You poke [M == user ? "yourself":M] with [src]."), null, 4) + SPAN_NOTICE("You poke [M == user ? "yourself":M] with [src].LORD"), null, 4) return FALSE diff --git a/code/modules/mob/living/carbon/xenomorph/XenoAttacks.dm b/code/modules/mob/living/carbon/xenomorph/XenoAttacks.dm index 39866eb53798..ebd720cd1685 100644 --- a/code/modules/mob/living/carbon/xenomorph/XenoAttacks.dm +++ b/code/modules/mob/living/carbon/xenomorph/XenoAttacks.dm @@ -49,10 +49,10 @@ backpack.open(M) return if(stat == DEAD) - M.visible_message(SPAN_WARNING("\The [M] pokes \the [src], but nothing happens."), \ + M.visible_message(SPAN_WARNING("\The [M] pokes \the [src], but nothing happens.DED"), \ SPAN_WARNING("You poke \the [src], but nothing happens."), null, 5, CHAT_TYPE_FLUFF_ACTION) else - M.visible_message(SPAN_WARNING("\The [M] pokes \the [src]."), \ + M.visible_message(SPAN_WARNING("\The [M] pokes \the [src].WA"), \ SPAN_WARNING("You poke \the [src]."), null, 5, CHAT_TYPE_FLUFF_ACTION) if(INTENT_GRAB) diff --git a/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm b/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm index 3f83451a6386..209b35bd85a4 100644 --- a/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm +++ b/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm @@ -249,6 +249,9 @@ // Life reduction variables. var/life_slow_reduction = -1.5 + //Research organ harvesting. + var/organ_removed = FALSE + ////////////////////////////////////////////////////////////////// // @@ -263,6 +266,7 @@ // an easily modularizable way. So, here you go. // ////////////////////////////////////////////////////////////////// + var/tunnel = FALSE /// for check on lurker invisibility var/stealth = FALSE @@ -666,6 +670,8 @@ if(iff_tag) . += SPAN_NOTICE("It has an IFF tag sticking out of its carapace.") + if(organ_removed) + . += "It seems to have its organ removed." /mob/living/carbon/xenomorph/Destroy() GLOB.living_xeno_list -= src diff --git a/code/modules/surgery/surgery_initiator.dm b/code/modules/surgery/surgery_initiator.dm index 706b28d0e94e..46118e140b96 100644 --- a/code/modules/surgery/surgery_initiator.dm +++ b/code/modules/surgery/surgery_initiator.dm @@ -6,8 +6,9 @@ /proc/initiate_surgery_moment(obj/item/tool, mob/living/carbon/target, obj/limb/affecting, mob/living/user) if(!tool && !(affecting.status & LIMB_UNCALIBRATED_PROSTHETIC)) + to_chat(user, SPAN_WARNING("You can't perform surgery hggggggggggggggere!")) return FALSE - + to_chat(user, tool) var/target_zone = user.zone_selected var/list/available_surgeries = list() var/list/valid_steps = list() //Steps that could be performed, if we had the right tool. @@ -20,11 +21,14 @@ if(!istype(T) || !T.supports_surgery) if(tool.flags_item & CAN_DIG_SHRAPNEL) //Both shrapnel removal and prosthetic repair shouldn't be affected by being on the dropship. tool.dig_out_shrapnel_check(target, user) + to_chat(user, SPAN_WARNING("You can't peasdasdrform surgery here!")) return TRUE //Otherwise you get 'poked' by the knife. if(HAS_TRAIT(tool, TRAIT_TOOL_BLOWTORCH) && affecting) + to_chat(user, SPAN_WARNING("You can't perform saaaaaaaaaaaaaaaasurgery here!")) return FALSE if(!(tool.type in SURGERY_TOOLS_NO_INIT_MSG)) to_chat(user, SPAN_WARNING("You can't perform surgery under these bad conditions!")) + to_chat(user, SPAN_WARNING("You can't perform suggggggggggrgery here!")) return FALSE var/obj/limb/surgery_limb = target.get_limb(target_zone) @@ -35,43 +39,62 @@ return if(user.action_busy) //already doing an action + to_chat(user, SPAN_WARNING("You can't perform surgerasdasdasdasdasdy here!")) return FALSE for(var/datum/surgery/surgeryloop as anything in GLOB.surgeries_by_zone_and_depth[target_zone][target.incision_depths[target_zone]]) //Skill check. if((target.mob_flags & EASY_SURGERY) ? !skillcheck(user, SKILL_SURGERY, SKILL_SURGERY_NOVICE) : !skillcheck(user, SKILL_SURGERY, surgeryloop.required_surgery_skill)) + to_chat(user, SPAN_WARNING("You can't perform surgery heraaaaaaaaaaaaaaaaaaaaaaaae!")) continue + to_chat(user, surgeryloop) //Lying and self-surgery checks. if(surgeryloop.lying_required && target.body_position != LYING_DOWN) continue if(!surgeryloop.self_operable && target == user) + to_chat(user, "selfop fail [surgeryloop]") continue - + to_chat(user, "starting lspecies [surgeryloop]") //Species check. if(!is_type_in_typecache(target, GLOB.surgical_patient_types["[surgeryloop]"])) + to_chat(user, "mobcheck failed [surgeryloop]") continue - + to_chat(user, "starting limbcheck [surgeryloop]") //Limb checks. + to_chat(user,"0") if(affecting) + to_chat(user,"1") if(surgeryloop.requires_bodypart) + to_chat(user,"2") if(affecting.status & LIMB_DESTROYED) + to_chat(user,"3") + to_chat(user, "m [surgeryloop] asdadas") continue else - if(!(affecting.status & LIMB_DESTROYED)) - continue - if(affecting.parent && affecting.parent.status & LIMB_DESTROYED) - continue + if(ishuman(target)) + to_chat(user,"4") + if(!(affecting.status & LIMB_DESTROYED) && ishuman(target)) + to_chat(user, "ma [surgeryloop]") + continue + to_chat(user,"5") + if(affecting.parent && affecting.parent.status & LIMB_DESTROYED && ishuman(target)) + to_chat(user, "mk failed [surgeryloop]") + continue + to_chat(user,"6") if(surgeryloop.requires_bodypart_type && !(affecting.status & surgeryloop.requires_bodypart_type)) + to_chat(user, "mobcheck failed [surgeryloop]") continue else if(surgeryloop.requires_bodypart) //mob with no limb in surgery zone when we need a limb + to_chat(user, "FUCK FUCK FUCK") continue - + to_chat(user,"8") + to_chat(user, "Limbcheck passed for [surgeryloop]") //Surgery-specific requirements. if(!surgeryloop.can_start(user, target, affecting, tool)) + to_chat(user, "this kekw") continue - //Tool checks. var/datum/surgery_step/current_step = GLOB.surgery_step_list[surgeryloop.steps[1]] @@ -81,14 +104,17 @@ var/datum/surgery_step/next_step = GLOB.surgery_step_list[surgeryloop.steps[2]] if(!next_step.tool_check(user, tool, surgeryloop)) valid_steps += next_step + to_chat(user, "Limbr [surgeryloop]") continue else + to_chat(user, "Limbcheck for [surgeryloop]") continue - + to_chat(user, "m AAAAAAAAA[surgeryloop]") available_surgeries[surgeryloop.name] = surgeryloop //Add it to the list. - + to_chat(user, "m [available_surgeries]") if(!length(available_surgeries)) if(!tool) + to_chat(user, "Limbcheck passaaaaasFFFFFFFFFFssssssed for") return FALSE if(target.incision_depths[target_zone] == SURGERY_DEPTH_SURFACE ? is_surgery_init_tool(tool) : is_surgery_tool(tool)) @@ -98,13 +124,15 @@ return FALSE if(!length(valid_steps)) + to_chat(user, "Limbcheck passaaaaasssssssed for") var/limbname = affecting?.status & LIMB_DESTROYED ? "the stump of [target]'s [affecting.display_name]" : "[target]'s [parse_zone(target_zone)]" if(target.incision_depths[target_zone] != SURGERY_DEPTH_SURFACE) to_chat(user, SPAN_WARNING("You don't know of any operations you could perform in the [target.incision_depths[target_zone]] incision on [limbname].")) else to_chat(user, SPAN_WARNING("You don't know of any operations you could begin on [limbname].")) + to_chat(user, SPAN_WARNING("You can't perform surgery rfrfrfrfrfrfrfrhere!")) return FALSE - + to_chat(user, "mSTARTING surgeryloop]") var/hint_msg for(var/datum/surgery_step/current_step as anything in valid_steps) if(hint_msg) @@ -115,12 +143,14 @@ else hint_msg = "You can't [current_step.desc] with \the [tool]" to_chat(user, SPAN_WARNING("[hint_msg].")) + to_chat(user, SPAN_WARNING("You cana1231231231232131222aasdd't perform surgery here!")) return FALSE var/datum/surgery/surgeryinstance if(length(available_surgeries) == 1) surgeryinstance = available_surgeries[available_surgeries[1]] else + to_chat(user, "mama [available_surgeries[1]]") surgeryinstance = available_surgeries[tgui_input_list(user, "Begin which procedure?", "Surgery", sortList(available_surgeries))] //we check that the surgery is still doable after the input() wait. if(!surgeryinstance || QDELETED(user) || user.is_mob_incapacitated() || !user.Adjacent(target) || tool != user.get_active_hand() || target_zone != user.zone_selected) @@ -159,7 +189,7 @@ return TRUE if(!surgeryinstance.can_start(user, target, affecting, tool)) return TRUE - + to_chat(user, "Limbcheck pass2222aaaaasssssssed for") var/datum/surgery/procedure = new surgeryinstance.type(target, target_zone, affecting) #ifdef DEBUG_SURGERY_INIT message_admins("[procedure.name] started.") diff --git a/code/modules/surgery/surgery_procedure.dm b/code/modules/surgery/surgery_procedure.dm index 8620c557eb4b..f34371c21f02 100644 --- a/code/modules/surgery/surgery_procedure.dm +++ b/code/modules/surgery/surgery_procedure.dm @@ -69,10 +69,12 @@ ///Used on attackby and attackhand; TRUE means it stops the attack there, FALSE means it performs an item/open hand attack. CHECK OPENHAND ATTACK IS BLOCKED PROPERLY /datum/surgery/proc/attempt_next_step(mob/user, obj/item/tool, repeating) + to_chat(user, "-1") if(step_in_progress) if(!user.action_busy) //Otherwise, assume it's the same person. to_chat(user, SPAN_WARNING("Someone is already performing surgery on [target]'s [affected_limb.display_name]!")) return FALSE + return TRUE //So that you don't poke them with a tool you're already using. if(user.action_busy) @@ -88,12 +90,13 @@ to_chat(user, SPAN_WARNING("You need to set [target] down before you can operate on \him!")) else to_chat(user, SPAN_WARNING("You can't operate on [target], \he is being carried by [target.pulledby]!")) + to_chat(user, "we are here 222") return FALSE if(lying_required && target.body_position != LYING_DOWN) to_chat(user, SPAN_WARNING("[user == target ? "You need" : "[target] needs"] to be lying down for this operation!")) return FALSE - + to_chat(user, "we are here") if(user == target) if(!self_operable) to_chat(user, SPAN_WARNING("You can't perform this operation on yourself!")) @@ -102,14 +105,16 @@ to_chat(user, SPAN_WARNING("You can't perform surgery on the same \ [user.zone_selected == "r_hand"||user.zone_selected == "l_hand" ? "hand":"arm"] you're using!")) return FALSE - + to_chat(user, "2") var/datum/surgery_step/current_step = GLOB.surgery_step_list[steps[status]] if(current_step) + to_chat(user, "we are hersteasae") if(current_step.attempt_step(user, target, user.zone_selected, tool, src, repeating)) //First, try this step. return TRUE var/datum/surgery_step/next_step if(current_step.skip_step_criteria(user, target, user.zone_selected, tool, src) && status < length(steps)) //If that doesn't work but the step is optional and not the last in the list, try the next step. next_step = GLOB.surgery_step_list[steps[status + 1]] + to_chat(user, "we are her12312312312313131231kkakkake") if(next_step.attempt_step(user, target, user.zone_selected, tool, src, skipped = TRUE)) return TRUE if(tool && is_surgery_tool(tool)) //Just because you used the wrong tool doesn't mean you meant to whack the patient with it... @@ -117,6 +122,8 @@ to_chat(user, SPAN_WARNING("You can't [current_step.desc] with \the [tool], or [next_step.desc].")) else to_chat(user, SPAN_WARNING("You can't [current_step.desc] with \the [tool].")) + to_chat(user, "we are here 22") return FALSE //...but you might be wanting to use it on them anyway. If on help intent, the help-intent safety will apply for this attack. + to_chat(user, "we are here 2") return FALSE diff --git a/code/modules/surgery/xeno.dm b/code/modules/surgery/xeno.dm new file mode 100644 index 000000000000..eeb4bac701fe --- /dev/null +++ b/code/modules/surgery/xeno.dm @@ -0,0 +1,129 @@ + +//Research stuff to extract stuff from xenomorphs for goodies. In other words, to extract usefull material that could be used to upgrade marines and etc. doesnt add anything of kind + +/datum/surgery/xenomorph + name = "Experimental Harvesting Surgery" + invasiveness = list(SURGERY_DEPTH_SURFACE) + required_surgery_skill = SKILL_SURGERY_NOVICE + possible_locs = list("head") + target_mobtypes = list(/mob/living/carbon/xenomorph) + steps = list( + /datum/surgery_step/xenomorph/cut_exoskeleton, + /datum/surgery_step/xenomorph/open_exoskeleton, + ///datum/surgery_step/xenomorph/severe_connections + ) + lying_required = FALSE + requires_bodypart_type = NONE + requires_bodypart = FALSE + +/datum/surgery/xenomorph/can_start(mob/user, mob/living/carbon/xenomorph/patient, obj/limb/L, obj/item/tool) + if(patient.stat == DEAD && !patient.organ_removed) + return TRUE + return FALSE + +/datum/surgery_step/xenomorph/cut_exoskeleton + name = "Cut Exoskeleton Carapace" + desc = "Cut the carapace open." + tools = SURGERY_TOOLS_SEVER_BONE + time = 4 SECONDS + preop_sound = 'sound/handling/clothingrustle1.ogg' + success_sound = 'sound/handling/bandage.ogg' + failure_sound = 'sound/surgery/organ2.ogg' + +/datum/surgery_step/xenomorph/cut_exoskeleton/preop(mob/living/carbon/human/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) + if(tool_type == /obj/item/tool/surgery/circular_saw) + user.affected_message(target, + SPAN_NOTICE("You start to cut [target.caste_type] carapace apart using \the [tool], carefully, with barely any acid."), + SPAN_NOTICE("[user] starts to cut Your carapace apart using \the [tool], carefully, with barely any acid."), + SPAN_NOTICE("[user] starts to cut [target.caste_type] carapace. \the [tool], carefully, with barely any acid.")) + if(user.head && !(user.head.flags_inventory & COVEREYES)) + var/datum/internal_organ/eyes/user_eye = user.internal_organs_by_name["eyes"] + user_eye.take_damage(rand(1,2), FALSE) + to_chat(user, SPAN_DANGER("Some acid gets into your eyes!")) + else + user.affected_message(target, + SPAN_NOTICE("You start to [pick("smash", "crack", "break")] [target.caste_type] carapace apart using \the [tool], Recklessly, with acid splashing on you!"), + SPAN_NOTICE("[user] starts to [pick("smash", "crack", "break")] Your carapace apart using \the [tool], Recklessly, with acid splashing on you!"), + SPAN_NOTICE("[user] starts to [pick("smash", "crack", "break")] [target.caste_type] carapace with \the [tool], Recklessly, with acid splashing him!")) + if(user.head && !(user.head.flags_inventory & COVEREYES)) + var/datum/internal_organ/eyes/user_eye = user.internal_organs_by_name["eyes"] + user_eye.take_damage(rand(3,5), FALSE) + to_chat(user, SPAN_DANGER("Lots of acid gets into your eyes!")) + user.emote("pain") + user.apply_damage(rand(10,25),BURN) + +/datum/surgery_step/xenomorph/cut_exoskeleton/success(mob/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) + if(tool_type == /obj/item/tool/surgery/circular_saw) + user.affected_message(target, + SPAN_NOTICE("You succesfully cut through [target.caste_type] carapace apart using \the [tool]."), + SPAN_NOTICE("[user] Succesfully cuts through Your carapace. \the [tool]."), + SPAN_NOTICE("[user] Succesfully cuts [target.caste_type] carapace. \the [tool].")) + else + user.affected_message(target, + SPAN_NOTICE("You succesfully destroy [target.caste_type] carapace into bits and pieces apart using \the [tool]."), + SPAN_NOTICE("[user] succesfully destroys Your carapace into bits and pieces apart using \the [tool]."),, + SPAN_NOTICE("[user] Succesfully destroys [target.caste_type] carapace into bits and pieces apart using \the [tool].")) + +/datum/surgery_step/xenomorph/cut_exoskeleton/failure(mob/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) + if(tool_type == /obj/item/tool/surgery/circular_saw) + user.affected_message(target, + SPAN_WARNING("Your hand slips, failing to cut [target.caste_type] carapace apart using \the [tool]!"), + SPAN_WARNING("[user] hand slips, failing to cut Your carapace apart using \the [tool]!"), + SPAN_WARNING("[user] hand slips, failing to cut [target.caste_type] carapace using \the [tool]!")) + else + user.affected_message(target, + SPAN_WARNING("Your hand slips, failing to destroy [target.caste_type] carapace into bits and pieces apart using \the [tool]."), + SPAN_WARNING("[user] hand slips, failing to destroy Your carapace into bits and pieces using \the [tool]."), + SPAN_WARNING("[user] hand slips, failing to destroy [target.caste_type] carapace into bits and pieces using \the [tool].")) + +/datum/surgery_step/xenomorph/open_exoskeleton + name = "Pry exoskeleton open" + desc = "Open the exoskeleton in the opening." + tools = SURGERY_TOOLS_PRY_ENCASED + time = 3 SECONDS + preop_sound = 'sound/surgery/retractor1.ogg' + success_sound = 'sound/surgery/retractor2.ogg' + failure_sound = 'sound/surgery/organ1.ogg' + +/datum/surgery_step/xenomorph/open_exoskeleton/preop(mob/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) + user.affected_message(target, + SPAN_NOTICE("You start to pry [target.caste_type] carapace open using \the [tool], slowly"), + SPAN_NOTICE("[user] starts to pry Your carapace open with \the [tool] very carefully"), + SPAN_NOTICE("[user] starts to pry [target.caste_type] carapace open with \the [tool] very carefully")) + +/datum/surgery_step/xenomorph/open_exoskeleton/success(mob/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) + if(tool_type == /obj/item/tool/surgery/retractor) + user.affected_message(target, + SPAN_NOTICE("You hold [target.caste_type] carapace and exoskeleton open using \the [tool], exposing [target.caste_type] vital organs"), + SPAN_NOTICE("[user] Holds Your carapace and exoskeleton open with \the [tool], exposing [target.caste_type] vital organs "), + SPAN_NOTICE("[user] Holds [target.caste_type] carapace and exoskeleton open with \the [tool], exposing [target.caste_type] vital organs ")) + else + user.affected_message(target, + SPAN_NOTICE("You Hold [target.caste_type] carapace open using \the [tool] like a medieval doctor, exposing [target.caste_type] vital organs"), + SPAN_NOTICE("[user] starts to open Your carapace with \the [tool] very carefully"), + SPAN_NOTICE("[user] starts to open [target.caste_type] carapace with \the [tool] very carefully")) + +/datum/surgery_step/xenomorph/open_exoskeleton/failure(mob/living/carbon/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) + user.affected_message(target, + SPAN_WARNING("Your hand slips, letting go of [target.caste_type] carapace and exoskeleton, slaming it back into place and splashing acid everywhere!"), + SPAN_WARNING("[user] hand slips, letting go of [target.caste_type] carapace and exoskeleton, slaming it back into place and splashing acid everywhere!"), + SPAN_WARNING("[user] hand slips, letting go of [target.caste_type] carapace and exoskeleton, slaming it back into place and splashing acid everywhere!")) + user.apply_damage(rand(5, 15), BURN) +/* +/datum/surgery_step/xenomorph/severe_connections + name = "Severe organ connections" + desc = "Detach tubes and connections from organ." + tools = list( + /obj/item/tool/surgery/scalpel = SURGERY_TOOL_MULT_IDEAL, + /obj/item/tool/surgery/scalpel/pict_system = SURGERY_TOOL_MULT_IDEAL, + /obj/item/attachable/bayonet = SURGERY_TOOL_MULT_SUBSTITUTE, + /obj/item/tool/kitchen/knife = SURGERY_TOOL_MULT_SUBSTITUTE, + /obj/item/shard = SURGERY_TOOL_MULT_AWFUL, + ) //shamelessly taken from embryo code + time = 5 SECONDS + preop_sound = 'sound/surgery/scalpel1.ogg' + success_sound = 'sound/surgery/scalpel2.ogg' + failure_sound = 'sound/surgery/organ2.ogg' + +/datum/surgery_step/xenomorph/remove_organ +*/ diff --git a/colonialmarines.dme b/colonialmarines.dme index 4df1bd2afb54..6fda30edf4cf 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -2296,6 +2296,7 @@ #include "code\modules\surgery\surgery_steps.dm" #include "code\modules\surgery\surgery_toggle.dm" #include "code\modules\surgery\tendwounds.dm" +#include "code\modules\surgery\xeno.dm" #include "code\modules\teleporters\teleporter.dm" #include "code\modules\teleporters\teleporter_admin_verbs.dm" #include "code\modules\teleporters\teleporter_console.dm" From 557815375c98eca6c35eb1f1990e4cd92f787678 Mon Sep 17 00:00:00 2001 From: kiVts <48099872+kiVts@users.noreply.github.com> Date: Fri, 19 Jan 2024 07:26:45 -0500 Subject: [PATCH 04/82] AH --- code/_onclick/item_attack.dm | 15 --- .../mob/living/carbon/xenomorph/Xenomorph.dm | 1 + .../living/carbon/xenomorph/damage_procs.dm | 8 ++ code/modules/organs/organ_objects.dm | 7 ++ code/modules/surgery/surgery_initiator.dm | 44 ++------ code/modules/surgery/surgery_procedure.dm | 8 -- code/modules/surgery/xeno.dm | 104 +++++++++++++++--- 7 files changed, 113 insertions(+), 74 deletions(-) diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 4d77a7113048..80e97758669e 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -68,21 +68,6 @@ if(!(user in viewers(M, null))) showname = "." - if(isxeno(M) && M.stat == DEAD) - var/datum/surgery/current_surgery = M.active_surgeries[user.zone_selected] - if(current_surgery) - to_chat(user, "we are here000000") - if(current_surgery.attempt_next_step(user, src)) - to_chat(user, "we are here 2oh") - return FALSE //Cancel attack. - to_chat(user, "we are here 2uh") - else - to_chat(user, "we are here 2") - if(initiate_surgery_moment(src, M, "head" , user)) - to_chat(user, "got true") - return FALSE - to_chat(user, "got false") - if (user.a_intent == INTENT_HELP && ((user.client?.prefs && user.client?.prefs?.toggle_prefs & TOGGLE_HELP_INTENT_SAFETY) || (user.mob_flags & SURGERY_MODE_ON))) playsound(loc, 'sound/effects/pop.ogg', 25, 1) user.visible_message(SPAN_NOTICE("[M] has been poked with [src][showname]"),\ diff --git a/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm b/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm index 209b35bd85a4..5c991dae7dfd 100644 --- a/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm +++ b/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm @@ -395,6 +395,7 @@ mutators.xeno = src + //Set caste stuff if(caste_type && GLOB.xeno_datum_list[caste_type]) caste = GLOB.xeno_datum_list[caste_type] diff --git a/code/modules/mob/living/carbon/xenomorph/damage_procs.dm b/code/modules/mob/living/carbon/xenomorph/damage_procs.dm index 624c9df25f3e..9fada5e1f8ea 100644 --- a/code/modules/mob/living/carbon/xenomorph/damage_procs.dm +++ b/code/modules/mob/living/carbon/xenomorph/damage_procs.dm @@ -16,6 +16,14 @@ return programmer.visible_message(SPAN_NOTICE("[programmer] reprograms \the [src]'s IFF tag."), SPAN_NOTICE("You reprogram \the [src]'s IFF tag."), max_distance = 3) return + if(stat == DEAD) + var/datum/surgery/current_surgery = active_surgeries[user.zone_selected] + if(current_surgery) + if(current_surgery.attempt_next_step(user, item)) + return + else + if(initiate_surgery_moment(item, src, "head" , user)) + return if(item.type in SURGERY_TOOLS_PINCH) if(!iff_tag) to_chat(user, SPAN_WARNING("\The [src] doesn't have an IFF tag to remove.")) diff --git a/code/modules/organs/organ_objects.dm b/code/modules/organs/organ_objects.dm index d011933e4b2e..7f558f82562b 100644 --- a/code/modules/organs/organ_objects.dm +++ b/code/modules/organs/organ_objects.dm @@ -114,6 +114,13 @@ organ_tag = "liver" organ_type = /datum/internal_organ/liver +/obj/item/organ/heart/xeno + name = "Acidic Heart" + desc = "Acidic heart removed from a xenomorph. It spews droplets of acid every so often. Definetly not human heart." + icon_state = "heart-on" + organ_tag = "heart" + black_market_value = 60 + //These are here so they can be printed out via the fabricator. /obj/item/organ/heart/prosthetic name = "circulatory pump" diff --git a/code/modules/surgery/surgery_initiator.dm b/code/modules/surgery/surgery_initiator.dm index 46118e140b96..642411df76c0 100644 --- a/code/modules/surgery/surgery_initiator.dm +++ b/code/modules/surgery/surgery_initiator.dm @@ -6,7 +6,7 @@ /proc/initiate_surgery_moment(obj/item/tool, mob/living/carbon/target, obj/limb/affecting, mob/living/user) if(!tool && !(affecting.status & LIMB_UNCALIBRATED_PROSTHETIC)) - to_chat(user, SPAN_WARNING("You can't perform surgery hggggggggggggggere!")) + to_chat(user, SPAN_WARNING("You can't perform surgery here!")) return FALSE to_chat(user, tool) var/target_zone = user.zone_selected @@ -21,14 +21,14 @@ if(!istype(T) || !T.supports_surgery) if(tool.flags_item & CAN_DIG_SHRAPNEL) //Both shrapnel removal and prosthetic repair shouldn't be affected by being on the dropship. tool.dig_out_shrapnel_check(target, user) - to_chat(user, SPAN_WARNING("You can't peasdasdrform surgery here!")) + to_chat(user, SPAN_WARNING("You can't perform surgery here!")) return TRUE //Otherwise you get 'poked' by the knife. if(HAS_TRAIT(tool, TRAIT_TOOL_BLOWTORCH) && affecting) - to_chat(user, SPAN_WARNING("You can't perform saaaaaaaaaaaaaaaasurgery here!")) + to_chat(user, SPAN_WARNING("You can't perform surgery here!")) return FALSE if(!(tool.type in SURGERY_TOOLS_NO_INIT_MSG)) to_chat(user, SPAN_WARNING("You can't perform surgery under these bad conditions!")) - to_chat(user, SPAN_WARNING("You can't perform suggggggggggrgery here!")) + to_chat(user, SPAN_WARNING("You can't perform surgery here!")) return FALSE var/obj/limb/surgery_limb = target.get_limb(target_zone) @@ -39,13 +39,13 @@ return if(user.action_busy) //already doing an action - to_chat(user, SPAN_WARNING("You can't perform surgerasdasdasdasdasdy here!")) + to_chat(user, SPAN_WARNING("You can't perform surgery here!")) return FALSE for(var/datum/surgery/surgeryloop as anything in GLOB.surgeries_by_zone_and_depth[target_zone][target.incision_depths[target_zone]]) //Skill check. if((target.mob_flags & EASY_SURGERY) ? !skillcheck(user, SKILL_SURGERY, SKILL_SURGERY_NOVICE) : !skillcheck(user, SKILL_SURGERY, surgeryloop.required_surgery_skill)) - to_chat(user, SPAN_WARNING("You can't perform surgery heraaaaaaaaaaaaaaaaaaaaaaaae!")) + to_chat(user, SPAN_WARNING("You can't perform surgery here!")) continue to_chat(user, surgeryloop) @@ -53,46 +53,27 @@ if(surgeryloop.lying_required && target.body_position != LYING_DOWN) continue if(!surgeryloop.self_operable && target == user) - to_chat(user, "selfop fail [surgeryloop]") continue - to_chat(user, "starting lspecies [surgeryloop]") //Species check. if(!is_type_in_typecache(target, GLOB.surgical_patient_types["[surgeryloop]"])) - to_chat(user, "mobcheck failed [surgeryloop]") continue - to_chat(user, "starting limbcheck [surgeryloop]") //Limb checks. - to_chat(user,"0") if(affecting) - to_chat(user,"1") if(surgeryloop.requires_bodypart) - to_chat(user,"2") if(affecting.status & LIMB_DESTROYED) - to_chat(user,"3") - to_chat(user, "m [surgeryloop] asdadas") continue else if(ishuman(target)) - to_chat(user,"4") if(!(affecting.status & LIMB_DESTROYED) && ishuman(target)) - to_chat(user, "ma [surgeryloop]") continue - to_chat(user,"5") if(affecting.parent && affecting.parent.status & LIMB_DESTROYED && ishuman(target)) - to_chat(user, "mk failed [surgeryloop]") continue - to_chat(user,"6") if(surgeryloop.requires_bodypart_type && !(affecting.status & surgeryloop.requires_bodypart_type)) - to_chat(user, "mobcheck failed [surgeryloop]") continue else if(surgeryloop.requires_bodypart) //mob with no limb in surgery zone when we need a limb - to_chat(user, "FUCK FUCK FUCK") continue - to_chat(user,"8") - to_chat(user, "Limbcheck passed for [surgeryloop]") //Surgery-specific requirements. if(!surgeryloop.can_start(user, target, affecting, tool)) - to_chat(user, "this kekw") continue //Tool checks. @@ -104,17 +85,12 @@ var/datum/surgery_step/next_step = GLOB.surgery_step_list[surgeryloop.steps[2]] if(!next_step.tool_check(user, tool, surgeryloop)) valid_steps += next_step - to_chat(user, "Limbr [surgeryloop]") continue else - to_chat(user, "Limbcheck for [surgeryloop]") continue - to_chat(user, "m AAAAAAAAA[surgeryloop]") available_surgeries[surgeryloop.name] = surgeryloop //Add it to the list. - to_chat(user, "m [available_surgeries]") if(!length(available_surgeries)) if(!tool) - to_chat(user, "Limbcheck passaaaaasFFFFFFFFFFssssssed for") return FALSE if(target.incision_depths[target_zone] == SURGERY_DEPTH_SURFACE ? is_surgery_init_tool(tool) : is_surgery_tool(tool)) @@ -124,15 +100,13 @@ return FALSE if(!length(valid_steps)) - to_chat(user, "Limbcheck passaaaaasssssssed for") var/limbname = affecting?.status & LIMB_DESTROYED ? "the stump of [target]'s [affecting.display_name]" : "[target]'s [parse_zone(target_zone)]" if(target.incision_depths[target_zone] != SURGERY_DEPTH_SURFACE) to_chat(user, SPAN_WARNING("You don't know of any operations you could perform in the [target.incision_depths[target_zone]] incision on [limbname].")) else to_chat(user, SPAN_WARNING("You don't know of any operations you could begin on [limbname].")) - to_chat(user, SPAN_WARNING("You can't perform surgery rfrfrfrfrfrfrfrhere!")) + to_chat(user, SPAN_WARNING("You can't perform surgery here!")) return FALSE - to_chat(user, "mSTARTING surgeryloop]") var/hint_msg for(var/datum/surgery_step/current_step as anything in valid_steps) if(hint_msg) @@ -143,14 +117,13 @@ else hint_msg = "You can't [current_step.desc] with \the [tool]" to_chat(user, SPAN_WARNING("[hint_msg].")) - to_chat(user, SPAN_WARNING("You cana1231231231232131222aasdd't perform surgery here!")) + to_chat(user, SPAN_WARNING("You can't perform surgery here!")) return FALSE var/datum/surgery/surgeryinstance if(length(available_surgeries) == 1) surgeryinstance = available_surgeries[available_surgeries[1]] else - to_chat(user, "mama [available_surgeries[1]]") surgeryinstance = available_surgeries[tgui_input_list(user, "Begin which procedure?", "Surgery", sortList(available_surgeries))] //we check that the surgery is still doable after the input() wait. if(!surgeryinstance || QDELETED(user) || user.is_mob_incapacitated() || !user.Adjacent(target) || tool != user.get_active_hand() || target_zone != user.zone_selected) @@ -189,7 +162,6 @@ return TRUE if(!surgeryinstance.can_start(user, target, affecting, tool)) return TRUE - to_chat(user, "Limbcheck pass2222aaaaasssssssed for") var/datum/surgery/procedure = new surgeryinstance.type(target, target_zone, affecting) #ifdef DEBUG_SURGERY_INIT message_admins("[procedure.name] started.") diff --git a/code/modules/surgery/surgery_procedure.dm b/code/modules/surgery/surgery_procedure.dm index f34371c21f02..1ec72ae77673 100644 --- a/code/modules/surgery/surgery_procedure.dm +++ b/code/modules/surgery/surgery_procedure.dm @@ -69,7 +69,6 @@ ///Used on attackby and attackhand; TRUE means it stops the attack there, FALSE means it performs an item/open hand attack. CHECK OPENHAND ATTACK IS BLOCKED PROPERLY /datum/surgery/proc/attempt_next_step(mob/user, obj/item/tool, repeating) - to_chat(user, "-1") if(step_in_progress) if(!user.action_busy) //Otherwise, assume it's the same person. to_chat(user, SPAN_WARNING("Someone is already performing surgery on [target]'s [affected_limb.display_name]!")) @@ -90,13 +89,11 @@ to_chat(user, SPAN_WARNING("You need to set [target] down before you can operate on \him!")) else to_chat(user, SPAN_WARNING("You can't operate on [target], \he is being carried by [target.pulledby]!")) - to_chat(user, "we are here 222") return FALSE if(lying_required && target.body_position != LYING_DOWN) to_chat(user, SPAN_WARNING("[user == target ? "You need" : "[target] needs"] to be lying down for this operation!")) return FALSE - to_chat(user, "we are here") if(user == target) if(!self_operable) to_chat(user, SPAN_WARNING("You can't perform this operation on yourself!")) @@ -105,16 +102,13 @@ to_chat(user, SPAN_WARNING("You can't perform surgery on the same \ [user.zone_selected == "r_hand"||user.zone_selected == "l_hand" ? "hand":"arm"] you're using!")) return FALSE - to_chat(user, "2") var/datum/surgery_step/current_step = GLOB.surgery_step_list[steps[status]] if(current_step) - to_chat(user, "we are hersteasae") if(current_step.attempt_step(user, target, user.zone_selected, tool, src, repeating)) //First, try this step. return TRUE var/datum/surgery_step/next_step if(current_step.skip_step_criteria(user, target, user.zone_selected, tool, src) && status < length(steps)) //If that doesn't work but the step is optional and not the last in the list, try the next step. next_step = GLOB.surgery_step_list[steps[status + 1]] - to_chat(user, "we are her12312312312313131231kkakkake") if(next_step.attempt_step(user, target, user.zone_selected, tool, src, skipped = TRUE)) return TRUE if(tool && is_surgery_tool(tool)) //Just because you used the wrong tool doesn't mean you meant to whack the patient with it... @@ -122,8 +116,6 @@ to_chat(user, SPAN_WARNING("You can't [current_step.desc] with \the [tool], or [next_step.desc].")) else to_chat(user, SPAN_WARNING("You can't [current_step.desc] with \the [tool].")) - to_chat(user, "we are here 22") return FALSE //...but you might be wanting to use it on them anyway. If on help intent, the help-intent safety will apply for this attack. - to_chat(user, "we are here 2") return FALSE diff --git a/code/modules/surgery/xeno.dm b/code/modules/surgery/xeno.dm index eeb4bac701fe..f92703145ea2 100644 --- a/code/modules/surgery/xeno.dm +++ b/code/modules/surgery/xeno.dm @@ -10,7 +10,8 @@ steps = list( /datum/surgery_step/xenomorph/cut_exoskeleton, /datum/surgery_step/xenomorph/open_exoskeleton, - ///datum/surgery_step/xenomorph/severe_connections + /datum/surgery_step/xenomorph/severe_connections, + /datum/surgery_step/xenomorph/remove_organ ) lying_required = FALSE requires_bodypart_type = NONE @@ -36,10 +37,6 @@ SPAN_NOTICE("You start to cut [target.caste_type] carapace apart using \the [tool], carefully, with barely any acid."), SPAN_NOTICE("[user] starts to cut Your carapace apart using \the [tool], carefully, with barely any acid."), SPAN_NOTICE("[user] starts to cut [target.caste_type] carapace. \the [tool], carefully, with barely any acid.")) - if(user.head && !(user.head.flags_inventory & COVEREYES)) - var/datum/internal_organ/eyes/user_eye = user.internal_organs_by_name["eyes"] - user_eye.take_damage(rand(1,2), FALSE) - to_chat(user, SPAN_DANGER("Some acid gets into your eyes!")) else user.affected_message(target, SPAN_NOTICE("You start to [pick("smash", "crack", "break")] [target.caste_type] carapace apart using \the [tool], Recklessly, with acid splashing on you!"), @@ -48,11 +45,11 @@ if(user.head && !(user.head.flags_inventory & COVEREYES)) var/datum/internal_organ/eyes/user_eye = user.internal_organs_by_name["eyes"] user_eye.take_damage(rand(3,5), FALSE) - to_chat(user, SPAN_DANGER("Lots of acid gets into your eyes!")) + to_chat(user, SPAN_DANGER("Lots of acid gets into your eyes and on your skin!")) user.emote("pain") user.apply_damage(rand(10,25),BURN) -/datum/surgery_step/xenomorph/cut_exoskeleton/success(mob/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) +/datum/surgery_step/xenomorph/cut_exoskeleton/success(mob/living/carbon/human/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) if(tool_type == /obj/item/tool/surgery/circular_saw) user.affected_message(target, SPAN_NOTICE("You succesfully cut through [target.caste_type] carapace apart using \the [tool]."), @@ -64,7 +61,7 @@ SPAN_NOTICE("[user] succesfully destroys Your carapace into bits and pieces apart using \the [tool]."),, SPAN_NOTICE("[user] Succesfully destroys [target.caste_type] carapace into bits and pieces apart using \the [tool].")) -/datum/surgery_step/xenomorph/cut_exoskeleton/failure(mob/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) +/datum/surgery_step/xenomorph/cut_exoskeleton/failure(mob/living/carbon/human/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) if(tool_type == /obj/item/tool/surgery/circular_saw) user.affected_message(target, SPAN_WARNING("Your hand slips, failing to cut [target.caste_type] carapace apart using \the [tool]!"), @@ -80,18 +77,18 @@ name = "Pry exoskeleton open" desc = "Open the exoskeleton in the opening." tools = SURGERY_TOOLS_PRY_ENCASED - time = 3 SECONDS + time = 2 SECONDS preop_sound = 'sound/surgery/retractor1.ogg' success_sound = 'sound/surgery/retractor2.ogg' failure_sound = 'sound/surgery/organ1.ogg' -/datum/surgery_step/xenomorph/open_exoskeleton/preop(mob/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) +/datum/surgery_step/xenomorph/open_exoskeleton/preop(mob/living/carbon/human/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) user.affected_message(target, SPAN_NOTICE("You start to pry [target.caste_type] carapace open using \the [tool], slowly"), SPAN_NOTICE("[user] starts to pry Your carapace open with \the [tool] very carefully"), SPAN_NOTICE("[user] starts to pry [target.caste_type] carapace open with \the [tool] very carefully")) -/datum/surgery_step/xenomorph/open_exoskeleton/success(mob/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) +/datum/surgery_step/xenomorph/open_exoskeleton/success(mob/living/carbon/human/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) if(tool_type == /obj/item/tool/surgery/retractor) user.affected_message(target, SPAN_NOTICE("You hold [target.caste_type] carapace and exoskeleton open using \the [tool], exposing [target.caste_type] vital organs"), @@ -103,13 +100,13 @@ SPAN_NOTICE("[user] starts to open Your carapace with \the [tool] very carefully"), SPAN_NOTICE("[user] starts to open [target.caste_type] carapace with \the [tool] very carefully")) -/datum/surgery_step/xenomorph/open_exoskeleton/failure(mob/living/carbon/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) +/datum/surgery_step/xenomorph/open_exoskeleton/failure(mob/living/carbon/human/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) user.affected_message(target, SPAN_WARNING("Your hand slips, letting go of [target.caste_type] carapace and exoskeleton, slaming it back into place and splashing acid everywhere!"), SPAN_WARNING("[user] hand slips, letting go of [target.caste_type] carapace and exoskeleton, slaming it back into place and splashing acid everywhere!"), SPAN_WARNING("[user] hand slips, letting go of [target.caste_type] carapace and exoskeleton, slaming it back into place and splashing acid everywhere!")) user.apply_damage(rand(5, 15), BURN) -/* + /datum/surgery_step/xenomorph/severe_connections name = "Severe organ connections" desc = "Detach tubes and connections from organ." @@ -120,10 +117,87 @@ /obj/item/tool/kitchen/knife = SURGERY_TOOL_MULT_SUBSTITUTE, /obj/item/shard = SURGERY_TOOL_MULT_AWFUL, ) //shamelessly taken from embryo code - time = 5 SECONDS + time = 4 SECONDS preop_sound = 'sound/surgery/scalpel1.ogg' success_sound = 'sound/surgery/scalpel2.ogg' failure_sound = 'sound/surgery/organ2.ogg' +/datum/surgery_step/xenomorph/severe_connections/preop(mob/living/carbon/human/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) + user.affected_message(target, + SPAN_NOTICE("You start to severe [target.caste_type] organ links using \the [tool], with confidence"), + SPAN_NOTICE("[user] start to severe Your organ links using \the [tool], with confidence"), + SPAN_NOTICE("[user] starts to severe [target.caste_type] organ links using \the [tool], with confidence")) + +/datum/surgery_step/xenomorph/severe_connections/success(mob/living/carbon/human/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) + if(tool_type == /obj/item/tool/surgery/retractor) + user.affected_message(target, + SPAN_NOTICE("You severed [target.caste_type] connections and links to vital organs using \the [tool]"), + SPAN_NOTICE("[user] severed Your connections and links to vital organs using \the [tool]"), + SPAN_NOTICE("[user] severed [target.caste_type] connections and links to vital organs using \the [tool]")) + else + user.affected_message(target, + SPAN_NOTICE("You rip [target.caste_type] connections and links to vital organs apart using \the [tool]"), + SPAN_NOTICE("[user] rips Your connections and links to vital organs apart using \the [tool]"), + SPAN_NOTICE("[user] rips [target.caste_type] connections and links to vital organs apart using \the [tool]")) + +/datum/surgery_step/xenomorph/severe_connections/failure(mob/living/carbon/human/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) + user.affected_message(target, + SPAN_WARNING("Your hand slips, damaging one of [target.caste_type] [pick("arteries", "viens")], gushing acid blood everywhere!"), + SPAN_WARNING("[user] hand slips, damaging one of Your [pick("arteries", "viens")], gushing acid blood everywhere!"), + SPAN_WARNING("[user] hand slips, damaging one of [target.caste_type] [pick("arteries", "viens")], gushing acid blood everywhere!")) + user.apply_damage(rand(5, 15), BURN) + /datum/surgery_step/xenomorph/remove_organ -*/ + name = "Take out the organ" + desc = "Grab a hold of it and pull the organ out." + accept_hand = TRUE + tools = list( + /obj/item/tool/surgery/hemostat = 1.5, + /obj/item/tool/wirecutters = SURGERY_TOOL_MULT_SUBOPTIMAL, + /obj/item/tool/kitchen/utensil/fork = SURGERY_TOOL_MULT_SUBSTITUTE + )//shamelessly taken from embryo code + time = 6 SECONDS + preop_sound = 'sound/surgery/scalpel1.ogg' + success_sound = 'sound/surgery/scalpel2.ogg' + failure_sound = 'sound/surgery/organ2.ogg' + +/datum/surgery_step/xenomorph/remove_organ/preop(mob/living/carbon/human/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) + if(tool) + user.affected_message(target, + SPAN_NOTICE("You start to get a firm grip on the [target.caste_type] organ using \the [tool] "), + SPAN_NOTICE("[user] start to get a firm grip on your insides using \the [tool]"), + SPAN_NOTICE("[user] starts to get a firm grip on the [target.caste_type] organ using \the [tool] ")) + else + user.affected_message(target, + SPAN_NOTICE("You start to get a firm grip on the [target.caste_type] organ"), + SPAN_NOTICE("[user] start to get a firm grip on your insides"), + SPAN_NOTICE("[user] starts to get a firm grip on the [target.caste_type] organ")) + +/datum/surgery_step/xenomorph/remove_organ/success(mob/living/carbon/human/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) + if(tool) + user.affected_message(target, + SPAN_NOTICE("You pulled the [target.caste_type] organ out using \the [tool]"), + SPAN_NOTICE("[user] pulled Your organ out using \the [tool]"), + SPAN_NOTICE("[user] pulled the [target.caste_type] organ out using \the [tool]")) + else + user.affected_message(target, + SPAN_NOTICE("You burn your hands as you pulled the [target.caste_type] organ out!"), + SPAN_NOTICE("[user] burns their hands as they pulled Your insides out!"), + SPAN_NOTICE("[user] burns their hands as they pulled the [target.caste_type] organ out")) + user.emote("pain") + if(user.hand) + user.apply_damage(15, BURN, "l_hand") + else + user.apply_damage(15, BURN, "r_hand") + //spawn organ here, hm, maybe a good idea to give all benos organs on init instead of spawning it here out of thin air + target.organ_removed = TRUE + var/obj/item/organ/heart/xeno/organ = new() + organ.forceMove(target.loc) + +/datum/surgery_step/xenomorph/remove_organ/failure(mob/living/carbon/human/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) + if(tool) + user.affected_message(target, + SPAN_NOTICE("You fail to pull the [target.caste_type] organ out using \the [tool]"), + SPAN_NOTICE("[user] pulled Your organ out using \the [tool]"), + SPAN_NOTICE("[user] pulled the [target.caste_type] organ out using \the [tool]")) + From b9ffd6be131e8ba81e2707b603437944ad2dc333 Mon Sep 17 00:00:00 2001 From: kiVts <48099872+kiVts@users.noreply.github.com> Date: Fri, 19 Jan 2024 09:39:45 -0500 Subject: [PATCH 05/82] organ changes --- code/_onclick/item_attack.dm | 2 +- code/modules/mob/living/carbon/xenomorph/Xenomorph.dm | 4 ++++ code/modules/organs/organ_objects.dm | 1 + code/modules/surgery/xeno.dm | 3 +-- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 80e97758669e..8d77920a59cc 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -71,7 +71,7 @@ if (user.a_intent == INTENT_HELP && ((user.client?.prefs && user.client?.prefs?.toggle_prefs & TOGGLE_HELP_INTENT_SAFETY) || (user.mob_flags & SURGERY_MODE_ON))) playsound(loc, 'sound/effects/pop.ogg', 25, 1) user.visible_message(SPAN_NOTICE("[M] has been poked with [src][showname]"),\ - SPAN_NOTICE("You poke [M == user ? "yourself":M] with [src].LORD"), null, 4) + SPAN_NOTICE("You poke [M == user ? "yourself":M] with [src]."), null, 4) return FALSE diff --git a/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm b/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm index 5c991dae7dfd..2f31e2821100 100644 --- a/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm +++ b/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm @@ -349,6 +349,10 @@ else if(hivenumber) src.hivenumber = hivenumber + var/obj/item/organ/heart/xeno/organ = new() //give + organ.forceMove(src) + organ.research_value = tier + var/datum/hive_status/hive = GLOB.hive_datum[src.hivenumber] if(hive) diff --git a/code/modules/organs/organ_objects.dm b/code/modules/organs/organ_objects.dm index 7f558f82562b..18d59d71d28a 100644 --- a/code/modules/organs/organ_objects.dm +++ b/code/modules/organs/organ_objects.dm @@ -120,6 +120,7 @@ icon_state = "heart-on" organ_tag = "heart" black_market_value = 60 + var/research_value = 1 //depending on the size and tier //These are here so they can be printed out via the fabricator. /obj/item/organ/heart/prosthetic diff --git a/code/modules/surgery/xeno.dm b/code/modules/surgery/xeno.dm index f92703145ea2..82f9a899853e 100644 --- a/code/modules/surgery/xeno.dm +++ b/code/modules/surgery/xeno.dm @@ -189,9 +189,8 @@ user.apply_damage(15, BURN, "l_hand") else user.apply_damage(15, BURN, "r_hand") - //spawn organ here, hm, maybe a good idea to give all benos organs on init instead of spawning it here out of thin air target.organ_removed = TRUE - var/obj/item/organ/heart/xeno/organ = new() + var/obj/item/organ/heart/xeno/organ = locate() in target organ.forceMove(target.loc) /datum/surgery_step/xenomorph/remove_organ/failure(mob/living/carbon/human/user, mob/living/carbon/xenomorph/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) From 2d8a5adbf5c451e5fd4bb418519f3152f79ae3b5 Mon Sep 17 00:00:00 2001 From: kiVts <48099872+kiVts@users.noreply.github.com> Date: Fri, 19 Jan 2024 09:43:01 -0500 Subject: [PATCH 06/82] mroe shit removed --- code/modules/mob/living/carbon/xenomorph/XenoAttacks.dm | 4 ++-- code/modules/surgery/surgery_initiator.dm | 2 -- code/modules/surgery/xeno.dm | 8 ++++---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/XenoAttacks.dm b/code/modules/mob/living/carbon/xenomorph/XenoAttacks.dm index ebd720cd1685..39866eb53798 100644 --- a/code/modules/mob/living/carbon/xenomorph/XenoAttacks.dm +++ b/code/modules/mob/living/carbon/xenomorph/XenoAttacks.dm @@ -49,10 +49,10 @@ backpack.open(M) return if(stat == DEAD) - M.visible_message(SPAN_WARNING("\The [M] pokes \the [src], but nothing happens.DED"), \ + M.visible_message(SPAN_WARNING("\The [M] pokes \the [src], but nothing happens."), \ SPAN_WARNING("You poke \the [src], but nothing happens."), null, 5, CHAT_TYPE_FLUFF_ACTION) else - M.visible_message(SPAN_WARNING("\The [M] pokes \the [src].WA"), \ + M.visible_message(SPAN_WARNING("\The [M] pokes \the [src]."), \ SPAN_WARNING("You poke \the [src]."), null, 5, CHAT_TYPE_FLUFF_ACTION) if(INTENT_GRAB) diff --git a/code/modules/surgery/surgery_initiator.dm b/code/modules/surgery/surgery_initiator.dm index 642411df76c0..35c21c3ee3e2 100644 --- a/code/modules/surgery/surgery_initiator.dm +++ b/code/modules/surgery/surgery_initiator.dm @@ -105,7 +105,6 @@ to_chat(user, SPAN_WARNING("You don't know of any operations you could perform in the [target.incision_depths[target_zone]] incision on [limbname].")) else to_chat(user, SPAN_WARNING("You don't know of any operations you could begin on [limbname].")) - to_chat(user, SPAN_WARNING("You can't perform surgery here!")) return FALSE var/hint_msg for(var/datum/surgery_step/current_step as anything in valid_steps) @@ -117,7 +116,6 @@ else hint_msg = "You can't [current_step.desc] with \the [tool]" to_chat(user, SPAN_WARNING("[hint_msg].")) - to_chat(user, SPAN_WARNING("You can't perform surgery here!")) return FALSE var/datum/surgery/surgeryinstance diff --git a/code/modules/surgery/xeno.dm b/code/modules/surgery/xeno.dm index 82f9a899853e..cef98fd80358 100644 --- a/code/modules/surgery/xeno.dm +++ b/code/modules/surgery/xeno.dm @@ -24,7 +24,7 @@ /datum/surgery_step/xenomorph/cut_exoskeleton name = "Cut Exoskeleton Carapace" - desc = "Cut the carapace open." + desc = "cut the carapace open" tools = SURGERY_TOOLS_SEVER_BONE time = 4 SECONDS preop_sound = 'sound/handling/clothingrustle1.ogg' @@ -75,7 +75,7 @@ /datum/surgery_step/xenomorph/open_exoskeleton name = "Pry exoskeleton open" - desc = "Open the exoskeleton in the opening." + desc = "open the exoskeleton in the incision" tools = SURGERY_TOOLS_PRY_ENCASED time = 2 SECONDS preop_sound = 'sound/surgery/retractor1.ogg' @@ -109,7 +109,7 @@ /datum/surgery_step/xenomorph/severe_connections name = "Severe organ connections" - desc = "Detach tubes and connections from organ." + desc = "detach tubes and connections from organ" tools = list( /obj/item/tool/surgery/scalpel = SURGERY_TOOL_MULT_IDEAL, /obj/item/tool/surgery/scalpel/pict_system = SURGERY_TOOL_MULT_IDEAL, @@ -149,7 +149,7 @@ /datum/surgery_step/xenomorph/remove_organ name = "Take out the organ" - desc = "Grab a hold of it and pull the organ out." + desc = "grab a hold of it and pull the organ out" accept_hand = TRUE tools = list( /obj/item/tool/surgery/hemostat = 1.5, From 55d6ec0ba3753560ee34a8f36b68f08a416de495 Mon Sep 17 00:00:00 2001 From: kiVts <48099872+kiVts@users.noreply.github.com> Date: Fri, 19 Jan 2024 10:53:03 -0500 Subject: [PATCH 07/82] polising --- code/modules/surgery/surgery_initiator.dm | 2 +- code/modules/surgery/xeno.dm | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/modules/surgery/surgery_initiator.dm b/code/modules/surgery/surgery_initiator.dm index 35c21c3ee3e2..e92c2728c318 100644 --- a/code/modules/surgery/surgery_initiator.dm +++ b/code/modules/surgery/surgery_initiator.dm @@ -63,7 +63,7 @@ if(affecting.status & LIMB_DESTROYED) continue else - if(ishuman(target)) + if(ishuman(target))//otherwise breaks when trying to op xeno if(!(affecting.status & LIMB_DESTROYED) && ishuman(target)) continue if(affecting.parent && affecting.parent.status & LIMB_DESTROYED && ishuman(target)) diff --git a/code/modules/surgery/xeno.dm b/code/modules/surgery/xeno.dm index cef98fd80358..e3cbd3d5c67f 100644 --- a/code/modules/surgery/xeno.dm +++ b/code/modules/surgery/xeno.dm @@ -40,8 +40,8 @@ else user.affected_message(target, SPAN_NOTICE("You start to [pick("smash", "crack", "break")] [target.caste_type] carapace apart using \the [tool], Recklessly, with acid splashing on you!"), - SPAN_NOTICE("[user] starts to [pick("smash", "crack", "break")] Your carapace apart using \the [tool], Recklessly, with acid splashing on you!"), - SPAN_NOTICE("[user] starts to [pick("smash", "crack", "break")] [target.caste_type] carapace with \the [tool], Recklessly, with acid splashing him!")) + SPAN_NOTICE("[user] starts to [pick("smash", "crack", "break")] Your carapace apart using \the [tool], Recklessly, with acid splashing all of the place!"), + SPAN_NOTICE("[user] starts to [pick("smash", "crack", "break")] [target.caste_type] carapace with \the [tool], Recklessly, with acid splashing them!")) if(user.head && !(user.head.flags_inventory & COVEREYES)) var/datum/internal_organ/eyes/user_eye = user.internal_organs_by_name["eyes"] user_eye.take_damage(rand(3,5), FALSE) @@ -197,6 +197,6 @@ if(tool) user.affected_message(target, SPAN_NOTICE("You fail to pull the [target.caste_type] organ out using \the [tool]"), - SPAN_NOTICE("[user] pulled Your organ out using \the [tool]"), - SPAN_NOTICE("[user] pulled the [target.caste_type] organ out using \the [tool]")) + SPAN_NOTICE("[user] fails to pull Your organ out using \the [tool]"), + SPAN_NOTICE("[user] fails to pull the [target.caste_type] organ out using \the [tool]")) From 33cddf77238e7555da19db61233d33ec855539bd Mon Sep 17 00:00:00 2001 From: kiVts <48099872+kiVts@users.noreply.github.com> Date: Wed, 24 Jan 2024 18:10:45 -0500 Subject: [PATCH 08/82] waa --- .../mob/living/carbon/xenomorph/Xenomorph.dm | 2 +- .../chemical_research/xenomorph_analyzer.dm | 77 +++++++++++++++++++ colonialmarines.dme | 1 + .../tgui/interfaces/XenomorphExtractor.jsx | 75 ++++++++++++++++++ 4 files changed, 154 insertions(+), 1 deletion(-) create mode 100644 code/modules/reagents/chemical_research/xenomorph_analyzer.dm create mode 100644 tgui/packages/tgui/interfaces/XenomorphExtractor.jsx diff --git a/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm b/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm index 2f31e2821100..dd7a3bb63275 100644 --- a/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm +++ b/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm @@ -676,7 +676,7 @@ if(iff_tag) . += SPAN_NOTICE("It has an IFF tag sticking out of its carapace.") if(organ_removed) - . += "It seems to have its organ removed." + . += "It seems to have its carapace cut open." /mob/living/carbon/xenomorph/Destroy() GLOB.living_xeno_list -= src diff --git a/code/modules/reagents/chemical_research/xenomorph_analyzer.dm b/code/modules/reagents/chemical_research/xenomorph_analyzer.dm new file mode 100644 index 000000000000..f94ab6aee4c6 --- /dev/null +++ b/code/modules/reagents/chemical_research/xenomorph_analyzer.dm @@ -0,0 +1,77 @@ +/obj/structure/machinery/xenoanalyzer + name = "Biomass Analyzer" + desc = "todo" + density = TRUE + anchored = TRUE + icon = 'icons/obj/structures/machinery/science_machines.dmi' + icon_state = "mixer0b" //for the time while no sprites + use_power = USE_POWER_NONE + wrenchable = FALSE + idle_power_usage = 40 + var/biomass_points = 0 //most important thing in this + var/obj/item/organ/heart/xeno/organ = null + +/obj/structure/machinery/xenoanalyzer/attackby(obj/item/W, mob/user) + if(!skillcheck(user, SKILL_RESEARCH, SKILL_RESEARCH_TRAINED)) + to_chat(user, SPAN_WARNING("You have no idea how to use this.")) + return + if(!istype(W, /obj/item/organ/heart/xeno)) + return + if(!do_after(user, 3 SECONDS, INTERRUPT_ALL, BUSY_ICON_GENERIC)) + to_chat(user, SPAN_WARNING("You were interupted!")) + return + if(!user.drop_inv_item_to_loc(W, src)) + return + to_chat(user, SPAN_NOTICE("You fed organ in the machine.")) + organ = W + +/obj/structure/machinery/xenoanalyzer/ui_data(mob/user) + var/list/data = list() + + data["points"] = biomass_points + + if(organ) + data["organ"] = TRUE + else + data["organ"] = FALSE + return data + + +/obj/structure/machinery/xenoanalyzer/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) + . = ..() + if(.) + return + + switch(action) + if("eject_organ") + eject_biomass() + . = TRUE + + if("process_organ") + process_organ() + . = TRUE + +/obj/structure/machinery/xenoanalyzer/proc/eject_biomass() + if(isnull(organ)) + return + organ.forceMove(get_turf(src)) + organ = null + +/obj/structure/machinery/xenoanalyzer/proc/process_organ() + if(isnull(organ)) + return + playsound(src.loc, 'sound/machines/blender.ogg', 25, 1) + biomass_points += organ.research_value * 1000 //inflating values less goo + qdel(organ) + organ = null + + + + + + + + + + + diff --git a/colonialmarines.dme b/colonialmarines.dme index 6fda30edf4cf..72b504bef656 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -2214,6 +2214,7 @@ #include "code\modules\reagents\Chemistry-Vessel.dm" #include "code\modules\reagents\chemical_research\Chemical-Research.dm" #include "code\modules\reagents\chemical_research\generated_reagents.dm" +#include "code\modules\reagents\chemical_research\xenomorph_analyzer.dm" #include "code\modules\reagents\chemistry_machinery\acid_harness.dm" #include "code\modules\reagents\chemistry_machinery\autodispenser.dm" #include "code\modules\reagents\chemistry_machinery\centrifuge.dm" diff --git a/tgui/packages/tgui/interfaces/XenomorphExtractor.jsx b/tgui/packages/tgui/interfaces/XenomorphExtractor.jsx new file mode 100644 index 000000000000..26155ef7a835 --- /dev/null +++ b/tgui/packages/tgui/interfaces/XenomorphExtractor.jsx @@ -0,0 +1,75 @@ +import { useBackend } from '../backend'; +import { Section, Button, Stack, LabeledList, NoticeBox } from '../components'; +import { Window } from '../layouts'; + +export const XenomorphExtractor = (_props, context) => { + const { act, data } = useBackend(context); + + const { organ, points } = data; + + const degraded = degradation >= 100; + + return ( + + +
+ + +
+
+ {!organ && ( + + Recepticle is empty, analyzing is impossible! + + )} + {!!disk && ( + + {sourceName} + {locus} + + )} +
+ {!!seed && ( +
+ {degraded && ( + Genetic data too degraded to edit! + )} + + {seed} + + {!degraded ? degradation + '%' : '#!ERROR%'} + + +
+ )} +
+
+ ); +}; From 1c1feaa153c8bb8cd6a3887e81e220cedaaea51a Mon Sep 17 00:00:00 2001 From: kiVts <48099872+kiVts@users.noreply.github.com> Date: Fri, 26 Jan 2024 15:57:40 -0500 Subject: [PATCH 09/82] ima kms --- code/__DEFINES/misc.dm | 6 + code/game/objects/items/old_research.dm | 112 ------------------ code/game/objects/items/research_upgrades.dm | 82 +++++++++++++ .../chemical_research/xenomorph_analyzer.dm | 32 ++++- colonialmarines.dme | 2 +- .../tgui/interfaces/XenomorphExtractor.jsx | 72 ++++++----- 6 files changed, 162 insertions(+), 144 deletions(-) delete mode 100644 code/game/objects/items/old_research.dm create mode 100644 code/game/objects/items/research_upgrades.dm diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index b195328264cd..2ab70bf39654 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -160,6 +160,12 @@ #define MATRIX_NVG 1 #define MATRIX_WIDE 2 +//autodoc upgrade via research +#define AUTODOC_UPGRADE_IB 1 +#define AUTODOC_UPGRADE_BONEBREAK 2 +#define AUTODOC_UPGRADE_ORGAN 3 +#define AUTODOC_UPGRADE_LARVA 4 + // Statistics defines #define STATISTIC_XENO "xeno" #define STATISTIC_HUMAN "human" diff --git a/code/game/objects/items/old_research.dm b/code/game/objects/items/old_research.dm deleted file mode 100644 index 7330baac5812..000000000000 --- a/code/game/objects/items/old_research.dm +++ /dev/null @@ -1,112 +0,0 @@ -/obj/item/XenoBio - name = "An unidentified Alien Organ" - desc = "Looking at it makes you want to vomit" - icon = 'icons/obj/items/Marine_Research.dmi' - icon_state = "biomass" - black_market_value = 50 - //For all of them for now, until we have specific organs/more techs - -/obj/item/XenoBio/Resin - name = "Alien Resin" - desc = "A piece of alien Resin" - icon_state = "biomass" - - -/obj/item/XenoBio/Chitin - name = "Alien Chitin" - desc = "A chunk of alien Chitin" - icon_state = "chitin-chunk" - - -/obj/item/XenoBio/Blood - name = "Alien Blood" - desc = "A sample of alien Blood" - icon_state = "blood-vial" - - - - - - - - -// ======== ITEMS YOU CAN MAKE THAT ARE BADASS ======== // - -/obj/item/XenoItem - name = "Strange Item" - desc = "Some sort of fucked up item from the Weyland-Yutani brand 3D Biometric Printer... Probably should make a bug report if you got this..." - icon_state = "chitin-chunk" - icon = 'icons/obj/items/Marine_Research.dmi' - -/obj/item/XenoItem/ResinPaste - name = "Resin Paste" - desc = "This resin paste will fix a broken helmet. (Use by clicking the glue with the armor)." - icon_state = "resin-glue" - icon = 'icons/obj/items/Marine_Research.dmi' - -/obj/item/XenoItem/ResinPaste/afterattack(obj/item/clothing/head/helmet/marine/A as obj, mob/user as mob) - if (!istype(A) || !istype(usr)) - to_chat(usr, "Doesn't work that way") - return - if (A.anti_hug >= 1) - usr <<"This Helmet can't be further reinforced." - return - to_chat(usr, "You reinforce the Helmet...") - A.anti_hug++ - user.temp_drop_inv_item(src) - qdel(src) - ..() - return - -/obj/item/XenoItem/ChitinPlate - name = "Chitin Plate" - desc = "A plate of Chitin Armor that can be attached to your Marine Armor to make it stronger, but will also slow you down. (Use by clicking the plate with the armor)." - icon_state = "chitin-armor" - icon = 'icons/obj/items/Marine_Research.dmi' - -/obj/item/XenoItem/ChitinPlate/afterattack(obj/item/clothing/suit/storage/marine/A as obj, mob/user as mob) - if (!istype(A) || !istype(usr)) - to_chat(usr, "Doesn't work that way...") - return - if (A.flags_marine_armor & ARMOR_IS_REINFORCED) - usr <<"This armor is already reinforced." - return - to_chat(usr, "You reinforce the armor with some Chitin Plating...") - A.armor_melee = 70 - A.armor_bullet = 90 - A.armor_laser = 7 - A.armor_energy = 40 - A.armor_bomb = 50 - A.armor_bio = 40 - A.armor_rad = 20 - A.slowdown++ - A.flags_marine_armor |= ARMOR_IS_REINFORCED - user.temp_drop_inv_item(src) - qdel(src) - ..() - return - - -/obj/item/XenoItem/AntiAcid - name = "Anti-Acid Spray" - desc = "A spray that makes whatever it's used on unacidable. Single use." - icon_state = "anti-acid" - icon = 'icons/obj/items/Marine_Research.dmi' - - -/obj/item/XenoItem/AntiAcid/afterattack(obj/A as obj, mob/user as mob, proximity) - if (!isobj(A)) - to_chat(usr, "Doesn't work that way...") - return - if (A.unacidable == 1) - to_chat(usr, "It's already resistant to acid...") - return - if (istype(A, /obj/structure/machinery/door)) - to_chat(usr, "It doesn't work on doors...") - return - to_chat(usr, "You spray [A] with the Anti-Acid spray making it unacidable...") - A.unacidable = TRUE - user.temp_drop_inv_item(src) - qdel(src) - ..() - return diff --git a/code/game/objects/items/research_upgrades.dm b/code/game/objects/items/research_upgrades.dm new file mode 100644 index 000000000000..541ccd18c42b --- /dev/null +++ b/code/game/objects/items/research_upgrades.dm @@ -0,0 +1,82 @@ +//prop items +/obj/item/XenoBio + name = "An unidentified Alien Organ" + desc = "Looking at it makes you want to vomit" + icon = 'icons/obj/items/Marine_Research.dmi' + icon_state = "biomass" + black_market_value = 50 + //For all of them for now, until we have specific organs/more techs + +/obj/item/XenoBio/Resin + name = "Alien Resin" + desc = "A piece of alien Resin" + icon_state = "biomass" + + +/obj/item/XenoBio/Chitin + name = "Alien Chitin" + desc = "A chunk of alien Chitin" + icon_state = "chitin-chunk" + + +/obj/item/XenoBio/Blood + name = "Alien Blood" + desc = "A sample of alien Blood" + icon_state = "blood-vial" + +//prop items end + + + +//previously file holding left over stuff that never got finished from 8 years ago, it was boring though, so we change that. +/obj/item/research_upgrades + name = "Research upgrade" + desc = "Somehow you got this, you shouldnt be able to, consider yourself special." + icon = 'icons/obj/items/disk.dmi' + icon_state = "datadisk1" + var/value = 0 //technology stored on this disk, goes through one to whatever levels of upgrades there are, + var/price = 1000 // initial price, multiplied by * price_increase at final checkout if there are better version + var/price_increase + +/obj/item/research_upgrades/proc/get_upgrade_desc(val) //we have to differ them SOMEHOW, so we do that, called if there are more versions of upgrades than one, basically a copypaste of examine text + return "This technology contains unknown data and forever will be..." + +/obj/item/research_upgrades/autodoc + name = "Research upgrade (AutoDoc)" + desc = "Research upgrade for AutoDoc, insert it in the recepticle located underneath certified AutoDoc Pod" + value = AUTODOC_UPGRADE_LARVA + price = 3000 + //starting at internal bleeding repair, 2 for bone repair, 3 for organ repair/etc, and 4 for larva removal. They are not exclusive, that means if you get level 4, you still dont have level 2 and 3 & 1. + //set to final upgrade to show the amount of upgrades + +/obj/item/research_upgrades/autodoc/get_examine_text(mob/user) + . = ..() + switch(value) + + if(AUTODOC_UPGRADE_IB) + . += "Labeling indicates that this disk contains data and statictics for stopping internal bleedings." + if(AUTODOC_UPGRADE_BONEBREAK) + . += "Labeling indicates that this disk contains data and statictics for fixating and mending broken bones." + if(AUTODOC_UPGRADE_ORGAN) + . += "Labeling indicates that this disk contains data and statictics for treating damaged organs." + if(AUTODOC_UPGRADE_LARVA) + . += "Labeling indicates that this disk contains data and statictics for extracting unknown parasites." + +/obj/item/research_upgrades/autodoc/get_upgrade_desc(val) + switch(val) + + if(AUTODOC_UPGRADE_IB) + . += "Labeling indicates that this disk contains data and statictics for stopping internal bleedings." + if(AUTODOC_UPGRADE_BONEBREAK) + . += "Labeling indicates that this disk contains data and statictics for fixating and mending broken bones." + if(AUTODOC_UPGRADE_ORGAN) + . += "Labeling indicates that this disk contains data and statictics for treating damaged organs." + if(AUTODOC_UPGRADE_LARVA) + . += "Labeling indicates that this disk contains data and statictics for extracting unknown parasites." + return + + + + + + diff --git a/code/modules/reagents/chemical_research/xenomorph_analyzer.dm b/code/modules/reagents/chemical_research/xenomorph_analyzer.dm index f94ab6aee4c6..289e37980cf5 100644 --- a/code/modules/reagents/chemical_research/xenomorph_analyzer.dm +++ b/code/modules/reagents/chemical_research/xenomorph_analyzer.dm @@ -10,6 +10,16 @@ idle_power_usage = 40 var/biomass_points = 0 //most important thing in this var/obj/item/organ/heart/xeno/organ = null + var/list/unlocked_tech = list() + +/obj/structure/machinery/xenoanalyzer/attack_hand(mob/user as mob) + tgui_interact(user) + +/obj/structure/machinery/xenoanalyzer/tgui_interact(mob/user, datum/tgui/ui) + ui = SStgui.try_update_ui(user, src, ui) + if(!ui) + ui = new(user, src, "XenomorphExtractor", name) + ui.open() /obj/structure/machinery/xenoanalyzer/attackby(obj/item/W, mob/user) if(!skillcheck(user, SKILL_RESEARCH, SKILL_RESEARCH_TRAINED)) @@ -27,7 +37,6 @@ /obj/structure/machinery/xenoanalyzer/ui_data(mob/user) var/list/data = list() - data["points"] = biomass_points if(organ) @@ -36,6 +45,27 @@ data["organ"] = FALSE return data +/obj/structure/machinery/xenoanalyzer/ui_static_data(mob/user) + to_world("Oof") + var/list/static_data = list() + static_data["upgrades"] = list() + for(var/upgrade_type in typesof(/obj/item/research_upgrades)) + var/obj/item/research_upgrades/upgrade = upgrade_type + var/upgrade_name = initial(upgrade.name) + var/upgrade_variations = initial(upgrade.value) + var/upgrade_price = initial(upgrade.price) + for(var/iteration in 1 to upgrade_variations) + to_world("loor") + to_world(upgrade_name) + to_world(iteration) + if(upgrade.value) + static_data["upgrades"] += list(list( + "name" = (capitalize_first_letters(upgrade_name) + " ([iteration])"), + "desc" = (upgrade.desc + upgrade.get_upgrade_desc(iteration)), + "vari" = iteration, + "cost" = upgrade_price + )) + return static_data /obj/structure/machinery/xenoanalyzer/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) . = ..() diff --git a/colonialmarines.dme b/colonialmarines.dme index 72b504bef656..02f9b32dd89d 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -1060,10 +1060,10 @@ #include "code\game\objects\items\legcuffs.dm" #include "code\game\objects\items\lightstick.dm" #include "code\game\objects\items\misc.dm" -#include "code\game\objects\items\old_research.dm" #include "code\game\objects\items\ore.dm" #include "code\game\objects\items\paint.dm" #include "code\game\objects\items\pamphlets.dm" +#include "code\game\objects\items\research_upgrades.dm" #include "code\game\objects\items\shards.dm" #include "code\game\objects\items\stock_parts.dm" #include "code\game\objects\items\trash.dm" diff --git a/tgui/packages/tgui/interfaces/XenomorphExtractor.jsx b/tgui/packages/tgui/interfaces/XenomorphExtractor.jsx index 26155ef7a835..ed88ef805ecb 100644 --- a/tgui/packages/tgui/interfaces/XenomorphExtractor.jsx +++ b/tgui/packages/tgui/interfaces/XenomorphExtractor.jsx @@ -1,13 +1,11 @@ import { useBackend } from '../backend'; -import { Section, Button, Stack, LabeledList, NoticeBox } from '../components'; +import { Section, Button, Stack, NoticeBox, Box, Flex, LabeledList } from '../components'; import { Window } from '../layouts'; export const XenomorphExtractor = (_props, context) => { const { act, data } = useBackend(context); - const { organ, points } = data; - - const degraded = degradation >= 100; + const { organ, points, upgrades } = data; return ( @@ -27,12 +25,13 @@ export const XenomorphExtractor = (_props, context) => {