Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surgery System/Process Rework (Omnisurgery) (Under New Management) #2826

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
8116f28
Working Prototype
V2LenKagamine Feb 27, 2024
2913d3e
Oops
V2LenKagamine Feb 27, 2024
3a87c06
Fix inverted !s
V2LenKagamine Feb 27, 2024
16f58c2
Omni-MKII
V2LenKagamine Feb 27, 2024
20948b3
Minor Cleanup
V2LenKagamine Feb 27, 2024
3f6d855
I hate this
V2LenKagamine Feb 28, 2024
511f509
Merge branch 'shiptest-ss13:master' into sergey-rework
V2LenKagamine Feb 28, 2024
257ecf8
Radial instead of input for conflicts
V2LenKagamine Feb 28, 2024
b0c9786
Organ movement refactor *Un-nullspaces your organs* (#79687)
XxNinMario64xX Feb 29, 2024
f1e974a
Few tweakups
V2LenKagamine Mar 1, 2024
1c46cf2
Make organ manip radial
V2LenKagamine Mar 2, 2024
89c3836
Oops
V2LenKagamine Mar 2, 2024
5d920dc
Opti-mas-fix
V2LenKagamine Mar 3, 2024
cb3f58a
Moves all general chest organ surgeries to layer 4
XxNinMario64xX Mar 6, 2024
517ed4d
Reverts organ manipulation surgery
XxNinMario64xX Mar 6, 2024
731beb5
Adds sounds to all movelayer surgeries
XxNinMario64xX Mar 6, 2024
327f262
Bleed removed upon exiting omnisurgery (Temporary Debug)
XxNinMario64xX Mar 6, 2024
26bb5c5
De-mystify omnisurgery steps
V2LenKagamine Mar 6, 2024
2b15211
Merge branch 'master' into sergey-rework
V2LenKagamine Mar 7, 2024
40f7973
Tend Wounds adjustment until it gets a rework
XxNinMario64xX Mar 8, 2024
b0b71ff
Comments out Improved Wound Tending research and its upgrades
XxNinMario64xX Mar 8, 2024
34aae5e
Removes Advanced and Experimental Surgeries (can i get my contributor…
XxNinMario64xX Mar 9, 2024
39f001e
Merge branch 'master' into sergey-rework
XxNinMario64xX Mar 9, 2024
8cc3d3a
when she mixes my <tab><space> till i [PLEASE STICK TO TAB INDENTATION]
XxNinMario64xX Mar 9, 2024
f1dd0b8
Merge branch 'master' into sergey-rework
XxNinMario64xX Mar 9, 2024
11a2a20
Bone Setter and Bone Gel readded; Revival Fixed
XxNinMario64xX Mar 9, 2024
59cec30
Merge branch 'sergey-rework' of https://github.com/V2LenKagamine/Ship…
XxNinMario64xX Mar 9, 2024
179331a
Fixed Null Tool Bug in Omnisurgery.dm
XxNinMario64xX Mar 10, 2024
55c69aa
Renamind this to omni_bone_repair.dm
XxNinMario64xX Mar 10, 2024
ec309dd
Merge branch 'sergey-rework' of https://github.com/V2LenKagamine/Ship…
XxNinMario64xX Mar 10, 2024
bdf3d5d
GLOBAL LISTS FIGURED OUT WOOOOOOOOOOOOOOO
XxNinMario64xX Mar 10, 2024
dde5eeb
Merge branch 'master' into surgery-rework
XxNinMario64xX Mar 10, 2024
7f77c1a
Nevermind I fucked up; defines :)
XxNinMario64xX Mar 10, 2024
a49134a
Merge branch 'master' into surgery-rework
XxNinMario64xX Mar 12, 2024
64f144a
Hmm. Today I will port prosthetic surgery. (Dies)
XxNinMario64xX Mar 13, 2024
c834a13
Stomach Pump Added; Backend stuff modified
XxNinMario64xX Apr 6, 2024
fdbbfe8
Remove other debugstuff
XxNinMario64xX Apr 6, 2024
9fbd159
In the Final (Operating computer hell)
XxNinMario64xX Apr 8, 2024
ab85dde
Merge branch 'master' into surgery-rework
FalloutFalcon Apr 9, 2024
650d721
fixing step display
FalloutFalcon Apr 9, 2024
5260d0a
Merge pull request #1 from FalloutFalcon/surgery-rework
XxNinMario64xX Apr 10, 2024
b15e055
better
FalloutFalcon Apr 10, 2024
7a05bb0
Merge pull request #2 from FalloutFalcon/surgery-rework
XxNinMario64xX Apr 11, 2024
7fc23c6
Update shiptest.dme
XxNinMario64xX Apr 11, 2024
9adba8a
Merge branch 'master' into surgery-rework
XxNinMario64xX Apr 11, 2024
7ffe7c5
Moves surgery_defines to __DEFINES and renames it to "surgery.dm"
XxNinMario64xX Apr 11, 2024
d22a4c8
Removed last_step var; Operating Computer Fixes
XxNinMario64xX Apr 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions code/__DEFINES/surgery.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#define ALL_BODY_ZONES list(\
BODY_ZONE_HEAD = "head",\
BODY_ZONE_CHEST = "chest",\
BODY_ZONE_L_ARM = "l_arm",\
BODY_ZONE_R_ARM = "r_arm",\
BODY_ZONE_L_LEG = "l_leg",\
BODY_ZONE_R_LEG = "r_leg",\
BODY_ZONE_PRECISE_EYES = "eyes",\
BODY_ZONE_PRECISE_MOUTH = "mouth",\
BODY_ZONE_PRECISE_GROIN = "groin"\
)

#define BROAD_BODY_ZONES list(\
BODY_ZONE_HEAD = "head",\
BODY_ZONE_CHEST = "chest",\
BODY_ZONE_L_ARM = "l_arm",\
BODY_ZONE_R_ARM = "r_arm",\
BODY_ZONE_L_LEG = "l_leg",\
BODY_ZONE_R_LEG = "r_leg",\
BODY_ZONE_PRECISE_EYES = "eyes",\
BODY_ZONE_PRECISE_MOUTH = "mouth",\
BODY_ZONE_PRECISE_GROIN = "groin"\
)

#define PRECISE_BODY_ZONES list(\
BODY_ZONE_PRECISE_EYES = "eyes",\
BODY_ZONE_PRECISE_MOUTH = "mouth",\
BODY_ZONE_PRECISE_GROIN = "groin"\
)
2 changes: 2 additions & 0 deletions code/__DEFINES/tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#define TOOL_DRILL "drill"
#define TOOL_SCALPEL "scalpel"
#define TOOL_SAW "saw"
#define TOOL_BONEGEL "bonegel"
#define TOOL_BONESETTER "bonesetter"

// If delay between the start and the end of tool operation is less than MIN_TOOL_SOUND_DELAY,
// tool sound is only played when op is started. If not, it's played twice.
Expand Down
5 changes: 5 additions & 0 deletions code/__HELPERS/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@
GLOB.surgeries_list += new path()
sortList(GLOB.surgeries_list, /proc/cmp_typepaths_asc)

//Omni-surgery steps
for(var/path in subtypesof(/datum/surgery_step/omni))
GLOB.omnisurgerysteps_list += new path()
sortList(GLOB.omnisurgerysteps_list, /proc/cmp_typepaths_asc)

// Hair Gradients - Initialise all /datum/sprite_accessory/hair_gradient into an list indexed by gradient-style name
for(var/path in subtypesof(/datum/sprite_accessory/hair_gradient))
var/datum/sprite_accessory/hair_gradient/H = new path()
Expand Down
2 changes: 2 additions & 0 deletions code/_globalvars/lists/objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ GLOBAL_LIST(chemical_reagents_list)
GLOBAL_LIST_EMPTY(materials_list)
/// List of all /datum/tech datums indexed by id.
GLOBAL_LIST_EMPTY(tech_list)
//List of all Omni-Surgery steps, associated with their path.
GLOBAL_LIST_EMPTY(omnisurgerysteps_list)
/// List of all surgeries by name, associated with their path.
GLOBAL_LIST_EMPTY(surgeries_list)
/// List of all table craft recipes
Expand Down
16 changes: 8 additions & 8 deletions code/_onclick/item_attack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,22 @@
/obj/attackby(obj/item/I, mob/living/user, params)
return ..() || ((obj_flags & CAN_BE_HIT) && I.attack_obj(src, user))

/mob/living/attackby(obj/item/I, mob/living/user, params)
/mob/living/attackby(obj/item/item, mob/living/user, params)
if(..())
return TRUE
if(user.a_intent == INTENT_HELP || user.a_intent == INTENT_DISARM)
for(var/datum/surgery/S in surgeries)
if(body_position != LYING_DOWN && S.lying_required)
for(var/datum/surgery/surgery in surgeries)
if(body_position != LYING_DOWN && surgery.lying_required)
continue
if(!S.self_operable && user == src)
if(!surgery.self_operable && user == src) //STOP USING ONE-LETTER VARIABLES IM LITERALLY HERE BECAUSE OF THIS
continue
if(S.next_step(user, user.a_intent))
if(surgery.next_step(user, user.a_intent))
return TRUE
if((I.item_flags & SURGICAL_TOOL) && user.a_intent == INTENT_HELP)
if(attempt_initiate_surgery(I, src, user))
if((item.item_flags & SURGICAL_TOOL) && user.a_intent == INTENT_HELP)
if(attempt_initiate_surgery(item, src, user))
return TRUE
user.changeNext_move(CLICK_CD_MELEE)
return I.attack(src, user)
return item.attack(src, user)

/mob/living/attack_hand(mob/living/user)
if(..())
Expand Down
28 changes: 9 additions & 19 deletions code/game/machinery/computer/Operating.dm
Original file line number Diff line number Diff line change
Expand Up @@ -136,30 +136,20 @@
data["patient"]["toxLoss"] = patient.getToxLoss()
data["patient"]["oxyLoss"] = patient.getOxyLoss()
data["procedures"] = list()


if(patient.surgeries.len)
for(var/datum/surgery/procedure in patient.surgeries)
var/datum/surgery_step/surgery_step = procedure.get_surgery_step()
var/chems_needed = surgery_step.get_chem_list()
var/alternative_step
var/alt_chems_needed = ""
if(surgery_step.repeatable)
var/datum/surgery_step/next_step = procedure.get_surgery_next_step()
if(next_step)
alternative_step = capitalize(next_step.name)
alt_chems_needed = next_step.get_chem_list()
else
alternative_step = "Finish operation"
for(var/datum/surgery/omni/procedure in patient.surgeries)
var/list/atlayer_surgeries = procedure.get_valid_surgeries(user, patient)
var/list/listed_surgery_steps = list()
for(var/datum/surgery_step/surgery_step in atlayer_surgeries)
listed_surgery_steps += surgery_step.name
data["procedures"] += list(list(
"name" = capitalize("[parse_zone(procedure.location)] [procedure.name]"),
"next_step" = capitalize(surgery_step.name),
"chems_needed" = chems_needed,
"alternative_step" = alternative_step,
"alt_chems_needed" = alt_chems_needed
"name" = capitalize("[procedure.name] ([parse_zone(procedure.location)])"),
"steps" = listed_surgery_steps,
))
return data



/obj/machinery/computer/operating/ui_act(action, params)
. = ..()
if(.)
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/items/storage/backpack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,8 @@
new /obj/item/cautery(src)
new /obj/item/clothing/mask/surgical(src)
new /obj/item/razor(src)
new /obj/item/bonegel(src)
new /obj/item/bonesetter(src)

/obj/item/storage/backpack/duffelbag/sec
name = "security duffel bag"
Expand Down
148 changes: 0 additions & 148 deletions code/modules/research/designs/medical_designs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -649,157 +649,9 @@
surgery = /datum/surgery/advanced/experimental_dissection/alien
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL

/datum/design/surgery/lobotomy
name = "Lobotomy"
desc = "An invasive surgical procedure which guarantees removal of almost all brain traumas, but might cause another permanent trauma in return."
id = "surgery_lobotomy"
surgery = /datum/surgery/advanced/lobotomy
research_icon_state = "surgery_head"
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL

/datum/design/surgery/pacify
name = "Pacification"
desc = "A surgical procedure which permanently inhibits the aggression center of the brain, making the patient unwilling to cause direct harm."
id = "surgery_pacify"
surgery = /datum/surgery/advanced/pacify
research_icon_state = "surgery_head"
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL

/datum/design/surgery/viral_bonding
name = "Viral Bonding"
desc = "A surgical procedure that forces a symbiotic relationship between a virus and its host. The patient must be dosed with spaceacillin, virus food, and formaldehyde."
id = "surgery_viral_bond"
surgery = /datum/surgery/advanced/viral_bonding
research_icon_state = "surgery_chest"
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL

/datum/design/surgery/healing //PLEASE ACCOUNT FOR UNIQUE HEALING BRANCHES IN THE hptech HREF (currently 2 for Brute/Burn; Combo is bonus)
name = "Tend Wounds"
desc = "An upgraded version of the original surgery."
id = "surgery_healing_base" //holder because CI cries otherwise. Not used in techweb unlocks.
research_icon_state = "surgery_chest"
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL

/datum/design/surgery/healing/brute_upgrade
name = "Tend Wounds (Brute) Upgrade"
surgery = /datum/surgery/healing/brute/upgraded
id = "surgery_heal_brute_upgrade"

/datum/design/surgery/healing/brute_upgrade_2
name = "Tend Wounds (Brute) Upgrade"
surgery = /datum/surgery/healing/brute/upgraded/femto
id = "surgery_heal_brute_upgrade_femto"
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL

/datum/design/surgery/healing/burn_upgrade
name = "Tend Wounds (Burn) Upgrade"
surgery = /datum/surgery/healing/burn/upgraded
id = "surgery_heal_burn_upgrade"
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL

/datum/design/surgery/healing/burn_upgrade_2
name = "Tend Wounds (Burn) Upgrade"
surgery = /datum/surgery/healing/burn/upgraded/femto
id = "surgery_heal_burn_upgrade_femto"
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL

/datum/design/surgery/healing/combo
name = "Tend Wounds (Physical)"
desc = "A surgical procedure that repairs both bruises and burns. Repair efficiency is not as high as the individual surgeries but it is faster."
surgery = /datum/surgery/healing/combo
id = "surgery_heal_combo"
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL

/datum/design/surgery/healing/combo_upgrade
name = "Tend Wounds (Physical) Upgrade"
surgery = /datum/surgery/healing/combo/upgraded
id = "surgery_heal_combo_upgrade"
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL

/datum/design/surgery/healing/combo_upgrade_2
name = "Tend Wounds (Physical) Upgrade"
desc = "A surgical procedure that repairs both bruises and burns faster than their individual counterparts. It is more effective than both the individual surgeries."
surgery = /datum/surgery/healing/combo/upgraded/femto
id = "surgery_heal_combo_upgrade_femto"
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL

/datum/design/surgery/brainwashing
name = "Brainwashing"
desc = "A surgical procedure which directly implants a directive into the patient's brain, making it their absolute priority. It can be cleared using a mindshield implant."
id = "surgery_brainwashing"
surgery = /datum/surgery/advanced/brainwashing
research_icon_state = "surgery_head"
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL

/datum/design/surgery/nerve_splicing
name = "Nerve Splicing"
desc = "A surgical procedure which splices the patient's nerves, making them more resistant to stuns."
id = "surgery_nerve_splice"
surgery = /datum/surgery/advanced/bioware/nerve_splicing
research_icon_state = "surgery_chest"
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL

/datum/design/surgery/nerve_grounding
name = "Nerve Grounding"
desc = "A surgical procedure which makes the patient's nerves act as grounding rods, protecting them from electrical shocks."
id = "surgery_nerve_ground"
surgery = /datum/surgery/advanced/bioware/nerve_grounding
research_icon_state = "surgery_chest"
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL

/datum/design/surgery/vein_threading
name = "Vein Threading"
desc = "A surgical procedure which severely reduces the amount of blood lost in case of injury."
id = "surgery_vein_thread"
surgery = /datum/surgery/advanced/bioware/vein_threading
research_icon_state = "surgery_chest"
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL

/datum/design/surgery/muscled_veins
name = "Vein Muscle Membrane"
desc = "A surgical procedure which adds a muscled membrane to blood vessels, allowing them to pump blood without a heart."
id = "surgery_muscled_veins"
surgery = /datum/surgery/advanced/bioware/muscled_veins
research_icon_state = "surgery_chest"
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL

/datum/design/surgery/ligament_hook
name = "Ligament Hook"
desc = "A surgical procedure which reshapes the connections between torso and limbs, making it so limbs can be attached manually if severed. \
However this weakens the connection, making them easier to detach as well."
id = "surgery_ligament_hook"
surgery = /datum/surgery/advanced/bioware/ligament_hook
research_icon_state = "surgery_chest"
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL

/datum/design/surgery/ligament_reinforcement
name = "Ligament Reinforcement"
desc = "A surgical procedure which adds a protective tissue and bone cage around the connections between the torso and limbs, preventing dismemberment. \
However, the nerve connections as a result are more easily interrupted, making it easier to disable limbs with damage."
id = "surgery_ligament_reinforcement"
surgery = /datum/surgery/advanced/bioware/ligament_reinforcement
research_icon_state = "surgery_chest"
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL

/datum/design/surgery/cortex_imprint
name = "Cortex Imprint"
desc = "A surgical procedure which modifies the cerebral cortex into a redundant neural pattern, making the brain able to bypass damage caused by minor brain traumas."
id = "surgery_cortex_imprint"
surgery = /datum/surgery/advanced/bioware/cortex_imprint
research_icon_state = "surgery_head"

/datum/design/surgery/cortex_folding
name = "Cortex Folding"
desc = "A surgical procedure which modifies the cerebral cortex into a complex fold, giving space to non-standard neural patterns."
id = "surgery_cortex_folding"
surgery = /datum/surgery/advanced/bioware/cortex_folding
research_icon_state = "surgery_head"
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL

/datum/design/surgery/necrotic_revival
name = "Necrotic Revival"
desc = "An experimental surgical procedure that stimulates the growth of a Romerol tumor inside the patient's brain. Requires zombie powder or rezadone."
id = "surgery_zombie"
surgery = /datum/surgery/advanced/necrotic_revival
research_icon_state = "surgery_head"
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
27 changes: 4 additions & 23 deletions code/modules/research/techweb/all_nodes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -124,40 +124,21 @@
export_price = 5000

/////////////////////////Advanced Surgery/////////////////////////
/datum/techweb_node/imp_wt_surgery
id = "imp_wt_surgery"
display_name = "Improved Wound-Tending Surgery"
description = "Who would have known being more gentle with a hemostat decreases patient pain?"
prereq_ids = list("biotech")
design_ids = list("surgery_heal_brute_upgrade","surgery_heal_burn_upgrade")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 1000)
export_price = 1000


/datum/techweb_node/adv_surgery
id = "adv_surgery"
display_name = "Advanced Surgery"
description = "When simple medicine doesn't cut it."
prereq_ids = list("imp_wt_surgery")
design_ids = list("surgery_lobotomy", "surgery_heal_brute_upgrade_femto", "surgery_heal_burn_upgrade_femto","surgery_heal_combo","surgery_adv_dissection")
prereq_ids = list("biotech")
design_ids = list("surgery_adv_dissection")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 1500)
export_price = 4000

/datum/techweb_node/exp_surgery
id = "exp_surgery"
display_name = "Experimental Surgery"
description = "When evolution isn't fast enough."
prereq_ids = list("adv_surgery")
design_ids = list("surgery_pacify","surgery_vein_thread","surgery_muscled_veins","surgery_nerve_splice","surgery_nerve_ground","surgery_ligament_hook","surgery_ligament_reinforcement","surgery_viral_bond", "surgery_heal_combo_upgrade", "surgery_exp_dissection", "surgery_cortex_imprint","surgery_cortex_folding")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 5000)
export_price = 5000

/datum/techweb_node/alien_surgery
id = "alien_surgery"
display_name = "Alien Surgery"
description = "Abductors did nothing wrong."
prereq_ids = list("exp_surgery", "alientech")
design_ids = list("surgery_brainwashing","surgery_zombie","surgery_heal_combo_upgrade_femto", "surgery_ext_dissection")
prereq_ids = list("alientech")
design_ids = list("surgery_ext_dissection")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 10000)
export_price = 5000

Expand Down
5 changes: 3 additions & 2 deletions code/modules/ruins/spaceruin_code/forgottenship.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ GLOBAL_VAR_INIT(fscpassword, generate_password())
default_raw_text = "Greetings, operatives. You are assigned to SCSBC-12(Syndicate Cyber Sun Battle Cruiser 12) to protect our high-ranking officer while he is on his way to next outpost. While you are travelling, he is the captain of this ship and <b>you must</b> obey his orders.<br><br>Remember, disobeying high-ranking officer orders is a reason for termination."

/////////// forgottenship items
/obj/item/disk/surgery/forgottenship
/*/obj/item/disk/surgery/forgottenship
name = "Advanced Surgery Disk"
desc = "A disk that contains advanced surgery procedures, must be loaded into an Operating Console."
surgeries = list(/datum/surgery/advanced/lobotomy, /datum/surgery/advanced/bioware/vein_threading, /datum/surgery/advanced/bioware/nerve_splicing)
surgeries = list(/datum/surgery/advanced/lobotomy, /datum/surgery/advanced/bioware/vein_threading, /datum/surgery/advanced/bioware/nerve_splicing)
Might be used later; leaving it commented because I'm unsure */

/obj/structure/fluff/empty_sleeper/syndicate/captain
icon_state = "sleeper_s-open"
Expand Down
35 changes: 0 additions & 35 deletions code/modules/surgery/advanced/bioware/bioware.dm

This file was deleted.

Loading
Loading