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 001/113] 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 002/113] 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 003/113] 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 004/113] 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 005/113] 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 006/113] 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 007/113] 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 008/113] 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 009/113] 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) => { Biological Matter : {points} @@ -92,7 +88,6 @@ export const XenomorphExtractor = (_props, context) => { {' '} }> From 2f296e9fd17915f7c0df9826058e7607f76e3531 Mon Sep 17 00:00:00 2001 From: kiVts <48099872+kiVts@users.noreply.github.com> Date: Tue, 14 May 2024 10:33:07 -0400 Subject: [PATCH 099/113] syringe is no more --- .../mob/living/carbon/xenomorph/damage_procs.dm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/damage_procs.dm b/code/modules/mob/living/carbon/xenomorph/damage_procs.dm index 04a8f00811ad..fe1f25e33196 100644 --- a/code/modules/mob/living/carbon/xenomorph/damage_procs.dm +++ b/code/modules/mob/living/carbon/xenomorph/damage_procs.dm @@ -17,13 +17,14 @@ 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(!istype(item, /obj/item/reagent_container/syringe)) + 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 return if(item.type in SURGERY_TOOLS_PINCH) if(!iff_tag) From e5190b1910559c47a074161f156706d580b5ab8e Mon Sep 17 00:00:00 2001 From: kiVts <48099872+kiVts@users.noreply.github.com> Date: Tue, 14 May 2024 10:51:32 -0400 Subject: [PATCH 100/113] a lot of capital --- code/modules/surgery/xeno.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/surgery/xeno.dm b/code/modules/surgery/xeno.dm index 3742ff6106a8..b521414aec97 100644 --- a/code/modules/surgery/xeno.dm +++ b/code/modules/surgery/xeno.dm @@ -197,7 +197,7 @@ 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 your insides out!"), SPAN_NOTICE("[user] burns [user.p_their()] hands as [user.p_they()] pulled the [target.caste_type] organ out.")) user.emote("pain") if(user.hand) From 55ce979e1923c0d08a13fd969fc6cb855b523ce6 Mon Sep 17 00:00:00 2001 From: kiVts <48099872+kiVts@users.noreply.github.com> Date: Tue, 14 May 2024 18:55:29 -0400 Subject: [PATCH 101/113] this --- code/datums/research_upgrade_datum.dm | 2 +- code/modules/reagents/chemistry_machinery/xenomorph_analyzer.dm | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/code/datums/research_upgrade_datum.dm b/code/datums/research_upgrade_datum.dm index 7532bb4564fd..74ef8d9fd703 100644 --- a/code/datums/research_upgrade_datum.dm +++ b/code/datums/research_upgrade_datum.dm @@ -108,7 +108,7 @@ change_purchase = -200 minimum_price = 200 item_reference = /obj/item/stack/medical/splint/nano/research - behavior = RESEARCH_UPGRADE_TIER_1 + behavior = RESEARCH_UPGRADE_TIER_5 upgrade_type = ITEM_ACCESSORY_UPGRADE /datum/research_upgrades/armor diff --git a/code/modules/reagents/chemistry_machinery/xenomorph_analyzer.dm b/code/modules/reagents/chemistry_machinery/xenomorph_analyzer.dm index a6083f9d43d6..bde338326a12 100644 --- a/code/modules/reagents/chemistry_machinery/xenomorph_analyzer.dm +++ b/code/modules/reagents/chemistry_machinery/xenomorph_analyzer.dm @@ -43,6 +43,8 @@ to_chat(user, SPAN_WARNING("You have no idea how to use this.")) return if(istype(attacked_item, /obj/item/organ/xeno)) + if(busy) + to_chat(user, SPAN_WARNING("The [src] is currently busy!")) if(organ) to_chat(user, SPAN_WARNING("Organ slot is already full!")) return From 5938013b5f8f7b2429308344dada9da043fb3419 Mon Sep 17 00:00:00 2001 From: kiVts <48099872+kiVts@users.noreply.github.com> Date: Tue, 14 May 2024 19:25:04 -0400 Subject: [PATCH 102/113] prices --- code/datums/research_upgrade_datum.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/datums/research_upgrade_datum.dm b/code/datums/research_upgrade_datum.dm index 74ef8d9fd703..a890737de6dc 100644 --- a/code/datums/research_upgrade_datum.dm +++ b/code/datums/research_upgrade_datum.dm @@ -150,12 +150,12 @@ /datum/research_upgrades/armor/ceramic name = "Ceramic Armor Plate" desc = "A strong trauma plate, able to protect the user from a large amount of bullets. Completely useless against sharp objects." - value_upgrade = 500 + value_upgrade = 1000 clearance_req = 4 behavior = RESEARCH_UPGRADE_TIER_1 upgrade_type = ITEM_ARMOR_UPGRADE change_purchase = -100 - minimum_price = 100 + minimum_price = 200 item_reference = /obj/item/clothing/accessory/health/ceramic_plate /datum/research_upgrades/armor/preservation From dbd57df8183665857c704e5ed9b2f2df4d80a9af Mon Sep 17 00:00:00 2001 From: kiVts <48099872+kiVts@users.noreply.github.com> Date: Wed, 15 May 2024 19:48:59 -0400 Subject: [PATCH 103/113] more pricing changes + autodoc bone speed buff --- code/datums/research_upgrade_datum.dm | 8 ++++---- code/game/machinery/medical_pod/autodoc.dm | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/code/datums/research_upgrade_datum.dm b/code/datums/research_upgrade_datum.dm index a890737de6dc..d2d96bf00a7f 100644 --- a/code/datums/research_upgrade_datum.dm +++ b/code/datums/research_upgrade_datum.dm @@ -80,7 +80,7 @@ behavior = RESEARCH_UPGRADE_TIER_1 upgrade_type = ITEM_ACCESSORY_UPGRADE change_purchase = 100 - maximum_price = 2000 + maximum_price = 3000 clearance_req = 4 /datum/research_upgrades/item/laser_scalpel @@ -95,7 +95,7 @@ /datum/research_upgrades/item/incision_management name = "Incision Management System" desc = "A true extension of the surgeon's body, this marvel instantly and completely prepares an incision allowing for the immediate commencement of therapeutic steps." - value_upgrade = 2000 + value_upgrade = 3000 item_reference = /obj/item/tool/surgery/scalpel/manager behavior = RESEARCH_UPGRADE_TIER_1 upgrade_type = ITEM_ACCESSORY_UPGRADE @@ -150,11 +150,11 @@ /datum/research_upgrades/armor/ceramic name = "Ceramic Armor Plate" desc = "A strong trauma plate, able to protect the user from a large amount of bullets. Completely useless against sharp objects." - value_upgrade = 1000 + value_upgrade = 500 clearance_req = 4 behavior = RESEARCH_UPGRADE_TIER_1 upgrade_type = ITEM_ARMOR_UPGRADE - change_purchase = -100 + change_purchase = -50 minimum_price = 200 item_reference = /obj/item/clothing/accessory/health/ceramic_plate diff --git a/code/game/machinery/medical_pod/autodoc.dm b/code/game/machinery/medical_pod/autodoc.dm index 1e3bf6e967d0..16d25d9b8432 100644 --- a/code/game/machinery/medical_pod/autodoc.dm +++ b/code/game/machinery/medical_pod/autodoc.dm @@ -443,8 +443,7 @@ surgery_todo_list -= S continue open_incision(H,S.limb_ref) - sleep(BONEGEL_REPAIR_MAX_DURATION*surgery_mod) - sleep(BONESETTER_MAX_DURATION*surgery_mod) + sleep(BONEGEL_REPAIR_MAX_DURATION*surgery_mod+20) if(S.limb_ref.brute_dam > 20) sleep(((S.limb_ref.brute_dam - 20)/2)*surgery_mod) if(!surgery) break From 75aaaa6b57c9c3e6a812368e5cbe8154c7a80d8a Mon Sep 17 00:00:00 2001 From: kiVts <48099872+kiVts@users.noreply.github.com> Date: Thu, 16 May 2024 03:13:24 -0400 Subject: [PATCH 104/113] more autodoc --- code/datums/research_upgrade_datum.dm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/datums/research_upgrade_datum.dm b/code/datums/research_upgrade_datum.dm index d2d96bf00a7f..26729a0eec38 100644 --- a/code/datums/research_upgrade_datum.dm +++ b/code/datums/research_upgrade_datum.dm @@ -3,9 +3,9 @@ var/name = "Upgrade." ///name of upgrades, not items. Items are at research_upgrades.dm somewhere in item folder. var/desc = "something is broken. yippee!!" - ///which behavior should this type follow. Should this be completely excluded from the buy menu? should it be one of the dropdown options? - var/behavior = RESEARCH_UPGRADE_EXCLUDE_BUY // should this be on the list? whatever. - /// the price of the upgrade, refer to this: 500 is a runner, 8k is queen. T3 is usually 3k. + ///which behavior should this type follow. Should this be completely excluded from the buy menu? should it be one of the dropdown options? This is also what gets passed to the initizialize of an item, this can be any number *but* it cannot be -1 or -2, as it messes with the buy menu. + var/behavior = RESEARCH_UPGRADE_EXCLUDE_BUY // should this be on the list? + /// the price of the upgrade, refer to this: 500 is a runner, 8k is queen. T3 is usually 3k, woyer is 2k. var/value_upgrade = 1000 /// actual path to the item.(upgrade) var/item_reference @@ -13,7 +13,7 @@ var/upgrade_type ///Clearance requirment to buy this upgrade. 5x is level 6. Why is it not that way? no one knows. var/clearance_req = 5 - ///The change of price for item per purchase + ///The change of price for item per purchase, recommended for mass producing stuff or limited upgrade. var/change_purchase = 0 ///the minimum price which we cant go any cheaper usually dont need to set this if change price is 0 or positive var/minimum_price = 0 @@ -108,7 +108,7 @@ change_purchase = -200 minimum_price = 200 item_reference = /obj/item/stack/medical/splint/nano/research - behavior = RESEARCH_UPGRADE_TIER_5 + behavior = RESEARCH_UPGRADE_TIER_5 //adjust this to change amount of nanosplints in a stack, cant be higher than five, go change max_amount in the nanosplint itself, then change it. upgrade_type = ITEM_ACCESSORY_UPGRADE /datum/research_upgrades/armor From 4db3b17650ba59a505d03358d678366780a6526f Mon Sep 17 00:00:00 2001 From: kiVts <48099872+kiVts@users.noreply.github.com> Date: Thu, 16 May 2024 03:24:17 -0400 Subject: [PATCH 105/113] better plate --- code/modules/cm_tech/implements/armor.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/cm_tech/implements/armor.dm b/code/modules/cm_tech/implements/armor.dm index 7b807791f816..9e8ca9c5fd8e 100644 --- a/code/modules/cm_tech/implements/armor.dm +++ b/code/modules/cm_tech/implements/armor.dm @@ -419,7 +419,7 @@ wearer = user if(!used) RegisterSignal(user, COMSIG_MOB_DEATH, PROC_REF(begin_preserving)) - user.revive_grace_period += 2 MINUTES + user.revive_grace_period += 4 MINUTES /obj/item/clothing/accessory/health/research_plate/anti_decay/on_removed(mob/living/user, obj/item/clothing/C) . = ..() From c0af5fd1c4a8a65314483ca238b63524cb783c1f Mon Sep 17 00:00:00 2001 From: kiVts <48099872+kiVts@users.noreply.github.com> Date: Sat, 18 May 2024 22:24:45 -0400 Subject: [PATCH 106/113] goddam tgui Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com> --- tgui/packages/tgui/interfaces/XenomorphExtractor.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tgui/packages/tgui/interfaces/XenomorphExtractor.jsx b/tgui/packages/tgui/interfaces/XenomorphExtractor.jsx index 222b5be05a37..82828e4b7539 100644 --- a/tgui/packages/tgui/interfaces/XenomorphExtractor.jsx +++ b/tgui/packages/tgui/interfaces/XenomorphExtractor.jsx @@ -2,8 +2,8 @@ import { useBackend, useLocalState } from '../backend'; import { Section, Button, Stack, NoticeBox, LabeledList, Flex, Box, Dropdown, Divider } from '../components'; import { Window } from '../layouts'; -export const XenomorphExtractor = (_props, context) => { - const { act, data } = useBackend(context); +export const XenomorphExtractor = () => { + const { act, data } = useBackend(); const { organ, @@ -16,7 +16,7 @@ export const XenomorphExtractor = (_props, context) => { is_x_level, } = data; const dropdownOptions = categories; - const [selectedTab, setSelectedTab] = useLocalState('category', 'NONE'); + const [selectedTab, setSelectedTab] = useState('NONE'); return ( From dd609c6292548e8c1483aa2e9025756f2e67db45 Mon Sep 17 00:00:00 2001 From: kiVts <48099872+kiVts@users.noreply.github.com> Date: Sun, 19 May 2024 00:28:56 -0400 Subject: [PATCH 107/113] credits price change --- code/datums/research_upgrade_datum.dm | 8 ++++---- .../carbon/xenomorph/abilities/queen/queen_powers.dm | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/code/datums/research_upgrade_datum.dm b/code/datums/research_upgrade_datum.dm index 26729a0eec38..be43a0beace2 100644 --- a/code/datums/research_upgrade_datum.dm +++ b/code/datums/research_upgrade_datum.dm @@ -75,12 +75,12 @@ /datum/research_upgrades/item/research_credits name = "Research Credits" desc = "Sell the data acquired to the nearest Weyland-Yutani Science division team for two or three points." - value_upgrade = 500 + value_upgrade = 800 item_reference = /obj/item/research_upgrades/credits behavior = RESEARCH_UPGRADE_TIER_1 upgrade_type = ITEM_ACCESSORY_UPGRADE change_purchase = 100 - maximum_price = 3000 + maximum_price = 4000 clearance_req = 4 /datum/research_upgrades/item/laser_scalpel @@ -128,7 +128,7 @@ /datum/research_upgrades/armor/coagulator name = "Active Blood Coagulator Plate" desc = "A uniform-attachable plate capable of coagulating any bleeding wounds the user possesses." - value_upgrade = 1250 + value_upgrade = 1200 behavior = RESEARCH_UPGRADE_TIER_1 clearance_req = 2 change_purchase = -200 @@ -160,7 +160,7 @@ /datum/research_upgrades/armor/preservation name = "Death Preservation Plate" - desc = "preservation plate which activates once the user is dead, uses variety of different substances and sensors to slow down the decay and increase the time before the user is permanently dead, due to small tank of preservatives, it needs to be replaced on each death." + desc = "preservation plate which activates once the user is dead, uses variety of different substances and sensors to slow down the decay and increase the time before the user is permanently dead, due to small tank of preservatives, it needs to be replaced on each death. Extends time to permadeath by around four minutes." value_upgrade = 500 clearance_req = 4 behavior = RESEARCH_UPGRADE_TIER_1 diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/queen/queen_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/queen/queen_powers.dm index 38e643e0d25c..bf3eb289f578 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/queen/queen_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/queen/queen_powers.dm @@ -87,7 +87,9 @@ xeno_type = /mob/living/carbon/xenomorph/defender if(XENO_CASTE_BURROWER) xeno_type = /mob/living/carbon/xenomorph/burrower - + var/obj/item/organ/xeno/organ = locate() in src + if(!isnull(organ)) + qdel(organ) //From there, the new xeno exists, hopefully var/mob/living/carbon/xenomorph/new_xeno = new xeno_type(get_turf(target_xeno), target_xeno) From 94dd10f8f5076eaec2c7457a784b9cd5917affca Mon Sep 17 00:00:00 2001 From: kiVts <48099872+kiVts@users.noreply.github.com> Date: Sun, 19 May 2024 00:55:37 -0400 Subject: [PATCH 108/113] Im such an idiot damn. --- .../reagents/chemistry_machinery/xenomorph_analyzer.dm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/code/modules/reagents/chemistry_machinery/xenomorph_analyzer.dm b/code/modules/reagents/chemistry_machinery/xenomorph_analyzer.dm index bde338326a12..89fd6eac4702 100644 --- a/code/modules/reagents/chemistry_machinery/xenomorph_analyzer.dm +++ b/code/modules/reagents/chemistry_machinery/xenomorph_analyzer.dm @@ -117,12 +117,12 @@ if("process_organ") if(!busy) + busy = TRUE addtimer(CALLBACK(src, PROC_REF(process_organ), organ.research_value), 3 SECONDS) icon_state = "xeno_analyzer_on_moving" playsound(loc, 'sound/machines/blender.ogg', 25, TRUE) QDEL_NULL(organ) . = TRUE - busy = TRUE if("produce") if(!busy) start_print_upgrade(text2path(params["ref"]), usr, text2num(params["vari"])) @@ -145,9 +145,12 @@ /obj/structure/machinery/xenoanalyzer/proc/start_print_upgrade(produce_path, mob/user, variation) - if (stat & NOPOWER) + if(stat & NOPOWER) icon_state = "xeno_analyzer_off" return + if(busy)//double check for me here + to_chat(user, SPAN_WARNING("[src] makes a annoying hum and flashes red - its currently busy!")) + return var/path_exists = FALSE var/datum/research_upgrades/upgrade var/datum_upgrades @@ -161,7 +164,7 @@ if(!path_exists) to_chat(user, SPAN_WARNING("[src] makes a suspicious wail before powering down.")) return - if(upgrade.value_upgrade > biomass_points) + if(clamp(upgrade.value_upgrade + upgrade.change_purchase * technology_purchased[datum_upgrades], upgrade.minimum_price, upgrade.maximum_price) > biomass_points) to_chat(user, SPAN_WARNING("[src] makes a worrying beep and flashes red, theres not enough data processed to build the requested upgrade!")) return if((upgrade.clearance_req > GLOB.chemical_data.clearance_level && upgrade.clearance_req != 6) || (upgrade.clearance_req == 6 && !GLOB.chemical_data.reached_x_access)) From 1221c971a2ca8cc7619b7e4a3fa1b60cd4f020f7 Mon Sep 17 00:00:00 2001 From: kiVts <48099872+kiVts@users.noreply.github.com> Date: Sun, 19 May 2024 20:40:46 -0400 Subject: [PATCH 109/113] fix for tgui --- tgui/packages/tgui/interfaces/XenomorphExtractor.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tgui/packages/tgui/interfaces/XenomorphExtractor.jsx b/tgui/packages/tgui/interfaces/XenomorphExtractor.jsx index 82828e4b7539..aaea042b7846 100644 --- a/tgui/packages/tgui/interfaces/XenomorphExtractor.jsx +++ b/tgui/packages/tgui/interfaces/XenomorphExtractor.jsx @@ -1,4 +1,4 @@ -import { useBackend, useLocalState } from '../backend'; +import { useBackend, useState } from '../backend'; import { Section, Button, Stack, NoticeBox, LabeledList, Flex, Box, Dropdown, Divider } from '../components'; import { Window } from '../layouts'; From a4d754844496c4bdc0d182754f7b69e3e8074cd6 Mon Sep 17 00:00:00 2001 From: kiVts <48099872+kiVts@users.noreply.github.com> Date: Sun, 19 May 2024 20:48:36 -0400 Subject: [PATCH 110/113] autofix!!!! --- .../tgui/interfaces/XenomorphExtractor.jsx | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/tgui/packages/tgui/interfaces/XenomorphExtractor.jsx b/tgui/packages/tgui/interfaces/XenomorphExtractor.jsx index aaea042b7846..4d89b565f03b 100644 --- a/tgui/packages/tgui/interfaces/XenomorphExtractor.jsx +++ b/tgui/packages/tgui/interfaces/XenomorphExtractor.jsx @@ -1,5 +1,15 @@ import { useBackend, useState } from '../backend'; -import { Section, Button, Stack, NoticeBox, LabeledList, Flex, Box, Dropdown, Divider } from '../components'; +import { + Box, + Button, + Divider, + Dropdown, + Flex, + LabeledList, + NoticeBox, + Section, + Stack, +} from '../components'; import { Window } from '../layouts'; export const XenomorphExtractor = () => { @@ -28,7 +38,8 @@ export const XenomorphExtractor = () => { fluid icon="eject" disabled={!organ} - onClick={() => act('eject_organ')}> + onClick={() => act('eject_organ')} + > {!organ ? 'Eject Biomass' : 'Eject ' + caste + ' biomass'} @@ -37,7 +48,8 @@ export const XenomorphExtractor = () => { fluid icon="eject" disabled={!organ} - onClick={() => act('process_organ')}> + onClick={() => act('process_organ')} + > {!organ ? 'Process Biomass' : 'Process Biomass, Expected value : ' + value} @@ -96,11 +108,13 @@ export const XenomorphExtractor = () => { ref: upgrades.ref, vari: upgrades.vari, }) - }> + } + > Print ({upgrades.cost}) - }> + } + > Clearance{' '} {upgrades.clearance === 6 @@ -126,7 +140,7 @@ export const XenomorphExtractor = () => { )} - ) : null + ) : null, )} )} From 08f815073310bb0ef02a5dbe7bedc72e93dc7686 Mon Sep 17 00:00:00 2001 From: kiVts <48099872+kiVts@users.noreply.github.com> Date: Sun, 19 May 2024 21:13:12 -0400 Subject: [PATCH 111/113] actual fix --- tgui/packages/tgui/interfaces/XenomorphExtractor.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tgui/packages/tgui/interfaces/XenomorphExtractor.jsx b/tgui/packages/tgui/interfaces/XenomorphExtractor.jsx index 4d89b565f03b..990f3651fe66 100644 --- a/tgui/packages/tgui/interfaces/XenomorphExtractor.jsx +++ b/tgui/packages/tgui/interfaces/XenomorphExtractor.jsx @@ -1,4 +1,5 @@ -import { useBackend, useState } from '../backend'; +import { useBackend } from '../backend'; +import { useState } from 'react'; import { Box, Button, From d0b3cf78fbae1088340e534129b157db014f1f6e Mon Sep 17 00:00:00 2001 From: kiVts <48099872+kiVts@users.noreply.github.com> Date: Tue, 21 May 2024 20:52:47 -0400 Subject: [PATCH 112/113] disks are actually not huge, wow. --- code/game/objects/items/research_upgrades.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/game/objects/items/research_upgrades.dm b/code/game/objects/items/research_upgrades.dm index 315c27ea4bfe..e090821062ff 100644 --- a/code/game/objects/items/research_upgrades.dm +++ b/code/game/objects/items/research_upgrades.dm @@ -33,6 +33,7 @@ name = "Research upgrade" desc = "Somehow you got this, you shouldnt be able to, consider yourself special." icon = 'icons/obj/items/disk.dmi' + w_class = SIZE_TINY icon_state = "datadisk1" // doesnt HAVE to be a disk! ///technology stored on this disk, goes through one to whatever levels of upgrades there are. var/value From 19058277f8ef4f762283cff8962a3886368cbfb5 Mon Sep 17 00:00:00 2001 From: kiVts <48099872+kiVts@users.noreply.github.com> Date: Fri, 24 May 2024 13:52:00 -0400 Subject: [PATCH 113/113] . fix --- code/modules/surgery/surgery_initiator.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/surgery/surgery_initiator.dm b/code/modules/surgery/surgery_initiator.dm index b48df96181e9..1158088e83e6 100644 --- a/code/modules/surgery/surgery_initiator.dm +++ b/code/modules/surgery/surgery_initiator.dm @@ -106,7 +106,7 @@ to_chat(user, SPAN_WARNING("You don't know of any operations you could begin on [limbname].")) return FALSE if(isxeno(target)) - to_chat(user, SPAN_WARNING("You don't know of any operations you could perform on this body part of a xenomorph.")) + to_chat(user, SPAN_WARNING("You don't know any operations you could perform on this body part of a xenomorph.")) var/hint_msg for(var/datum/surgery_step/current_step as anything in valid_steps) if(hint_msg) @@ -116,7 +116,8 @@ hint_msg += ", [current_step.desc]" else hint_msg = "You can't [current_step.desc] with \the [tool]" - to_chat(user, SPAN_WARNING("[hint_msg].")) + if(!isnull(hint_msg)) + to_chat(user, SPAN_WARNING("[hint_msg].")) return FALSE var/datum/surgery/surgeryinstance