[Semi-Modular] Synthetic Rebalance III: A Rope of Sand (#10821)

* upgradespeopleupgrades

* yeah

* weldingmoment

* Apply suggestions from code review

Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>

* love death and robots

* modularity i guess who knows

* Apply suggestions from code review

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* wew

* literally just kill me

* satisfaction

* i hate synths

* Fixing the commented code

* Update code/modules/surgery/healing.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* whew

* Update modular_skyrat/master_files/code/modules/power/cable.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Update modular_skyrat/master_files/code/game/objects/items/tools/weldingtool.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* wew

* Update code/__DEFINES/~skyrat_defines/mobs.dm

Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>

* Should hopefully actually fix the logic for the synth revival surgery

* Update modular_skyrat/modules/customization/modules/mob/living/carbon/human/human_defense.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* uwu

Co-authored-by: Snakebittenn <12636964+Snakebittenn@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
This commit is contained in:
Nerevar
2022-02-16 16:51:40 +00:00
committed by GitHub
co-authored by Tom GoldenAlpharex Snakebittenn GoldenAlpharex
parent f12dcc286f
commit 85fed784da
14 changed files with 139 additions and 72 deletions
+1
View File
@@ -2,4 +2,5 @@
#define PULL_OVERSIZED_SLOWDOWN 2
/// Used for Nanite Slurry vomit. The mob will vomit a nanite puddle.
#define VOMIT_NANITE 3
@@ -126,8 +126,14 @@
if(user == attacked_humanoid)
user.visible_message(span_notice("[user] starts to fix some of the dents on [attacked_humanoid]'s [affecting.name]."),
span_notice("You start fixing some of the dents on [attacked_humanoid == user ? "your" : "[attacked_humanoid]'s"] [affecting.name]."))
/* SKYRAT EDIT START - ORIGINAL:
if(!do_mob(user, attacked_humanoid, 50))
return
*/
// SKYRAT EDIT CHANGE START
if(!do_after(user, (user == attacked_humanoid ? self_delay : other_delay)))
return
// SKYRAT EDIT CHANGE END
item_heal_robotic(attacked_humanoid, user, 15, 0)
else
return ..()
+7 -1
View File
@@ -549,15 +549,21 @@ GLOBAL_LIST_INIT(wire_node_generating_types, typecacheof(list(/obj/structure/gri
if(affecting && affecting.status == BODYPART_ROBOTIC)
if(user == H)
user.visible_message(span_notice("[user] starts to fix some of the wires in [H]'s [affecting.name]."), span_notice("You start fixing some of the wires in [H == user ? "your" : "[H]'s"] [affecting.name]."))
/* SKYRAT EDIT START - ORIGINAL:
if(!do_mob(user, H, 50))
return
*/
// SKYRAT EDIT CHANGE START
if(!do_after(user, (user == H ? self_delay : other_delay)))
return
// SKYRAT EDIT CHANGE END
if(item_heal_robotic(H, user, 0, 15))
user.visible_message(span_green("[user] fixes some of the wires in to [H]'s [affecting.name]."), span_green("You fix some of the wires in [H == user ? "your" : "[H]'s"] [affecting.name].")) // SKYRAT EDIT ADD
use(1)
return
else
return ..()
///////////////////////////////////////////////
// Cable laying procedures
//////////////////////////////////////////////
+1 -1
View File
@@ -9,7 +9,7 @@
target_mobtypes = list(/mob/living)
possible_locs = list(BODY_ZONE_CHEST)
requires_bodypart_type = FALSE
requires_bodypart_type = BODYPART_ORGANIC //SKYRAT EDIT CHANGE - ORIGINAL VALUE: requires_bodypart_type = FALSE
replaced_by = /datum/surgery
ignore_clothes = TRUE
var/healing_step_type
@@ -0,0 +1,6 @@
/obj/item/weldingtool
/// How long it takes to weld someone else's robotic limbs.
var/self_delay = 5 SECONDS
/// How long it takes to weld your own robotic limbs.
var/other_delay = 1 SECONDS
@@ -0,0 +1,5 @@
/obj/item/stack/cable_coil
/// How long it takes to apply cable to your own robotic limbs to heal their burns.
var/self_delay = 5 SECONDS
/// How long it takes to apply cable to someone else's robotic limbs to heal their burns.
var/other_delay = 1 SECONDS
@@ -80,8 +80,9 @@
update_body()
return
/mob/living/carbon/human/revive(full_heal = 0, admin_revive = 0)
if(..())
/mob/living/carbon/human/revive(full_heal = FALSE, admin_revive = FALSE)
. = ..()
if(.)
if(dna && dna.species)
dna.species.spec_revival(src)
@@ -1,3 +1,7 @@
#define EMP_BRUTE_DAMAGE 0
#define EMP_BURN_DAMAGE_LIGHT 2
#define EMP_BURN_DAMAGE_HEAVY 5
/mob/living/carbon/human/emp_act(severity)
. = ..()
if(. & EMP_PROTECT_CONTENTS)
@@ -12,11 +16,11 @@
informed = TRUE
switch(severity)
if(1)
L.receive_damage(0,6)
stun_time += 40
L.receive_damage(EMP_BRUTE_DAMAGE, EMP_BURN_DAMAGE_HEAVY)
stun_time += 2 SECONDS
if(2)
L.receive_damage(0,3)
stun_time += 20
L.receive_damage(EMP_BRUTE_DAMAGE,EMP_BURN_DAMAGE_LIGHT)
stun_time += 1 SECONDS
if(L.body_zone == BODY_ZONE_L_LEG || L.body_zone == BODY_ZONE_R_LEG)
affects_leg = TRUE
@@ -29,6 +33,10 @@
if(affects_leg)
switch(severity)
if(1)
Knockdown(100)
if(2)
Knockdown(50)
if(2)
Knockdown(25)
#undef EMP_BRUTE_DAMAGE
#undef EMP_BURN_DAMAGE_LIGHT
#undef EMP_BURN_DAMAGE_HEAVY
@@ -19,8 +19,8 @@
mutant_bodyparts = list()
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_MAGIC | MIRROR_PRIDE | ERT_SPAWN | RACE_SWAP | SLIME_EXTRACT
reagent_flags = PROCESS_SYNTHETIC
burnmod = 1.5 // Every 0.1% is 10% above the base.
brutemod = 1.6
burnmod = 1.3 // Every 0.1% is 10% above the base.
brutemod = 1.3
coldmod = 1.2
heatmod = 2
siemens_coeff = 1.4 //Not more because some shocks will outright crit you, which is very unfun
@@ -76,7 +76,6 @@
NOEYESPRITES,
ROBOTIC_LIMBS,
NOTRANSSTING,
REVIVES_BY_HEALING
)
mutant_bodyparts = list()
default_mutant_bodyparts = list(
@@ -151,7 +150,6 @@
HAIR,
ROBOTIC_LIMBS,
NOTRANSSTING,
REVIVES_BY_HEALING
)
mutant_bodyparts = list()
default_mutant_bodyparts = list(
@@ -185,7 +183,6 @@
LIPS,HAIR,
ROBOTIC_LIMBS,
NOTRANSSTING,
REVIVES_BY_HEALING,
FACEHAIR
)
default_mutant_bodyparts = list(
@@ -269,7 +266,6 @@
LIPS,
HAIR,
ROBOTIC_LIMBS,
REVIVES_BY_HEALING,
FACEHAIR,
NOTRANSSTING
)
@@ -8,6 +8,10 @@
icon = 'modular_skyrat/master_files/icons/obj/surgery.dmi'
icon_state = "posibrain-ipc"
#define SYNTH_EMP_BRAIN_DAMAGE_HEAVY 36
#define SYNTH_EMP_BRAIN_DAMAGE_LIGHT 12
#define SYNTH_EMP_BRAIN_DAMAGE_MAXIMUM 75
/obj/item/organ/brain/ipc_positron/Insert(mob/living/carbon/user, special = 0, drop_if_replaced = TRUE)
..()
if(user.stat == DEAD && ishuman(user))
@@ -19,11 +23,11 @@
/obj/item/organ/brain/ipc_positron/emp_act(severity)
switch(severity)
if(1)
owner.adjustOrganLoss(ORGAN_SLOT_BRAIN, 75, 150)
to_chat(owner, span_warning("Alert: Posibrain heavily damaged."))
owner.adjustOrganLoss(ORGAN_SLOT_BRAIN, SYNTH_EMP_BRAIN_DAMAGE_HEAVY, SYNTH_EMP_BRAIN_DAMAGE_MAXIMUM)
to_chat(owner, span_warning("Alert: Rampant system corruption in central processing unit."))
if(2)
owner.adjustOrganLoss(ORGAN_SLOT_BRAIN, 25, 150)
to_chat(owner, span_warning("Alert: Posibrain damaged."))
owner.adjustOrganLoss(ORGAN_SLOT_BRAIN, SYNTH_EMP_BRAIN_DAMAGE_LIGHT, SYNTH_EMP_BRAIN_DAMAGE_MAXIMUM)
to_chat(owner, span_warning("Alert: System corruption in central processing unit."))
/obj/item/organ/stomach/robot_ipc
name = "IPC micro cell"
@@ -69,12 +73,12 @@
owner.Dizzy(30)
owner.Knockdown(80)
deaf = 30
to_chat(owner, span_warning("Your robotic ears are ringing, uselessly."))
to_chat(owner, span_warning("Your system reports a complete lack of input from your auditory sensors."))
if(2)
owner.Jitter(15)
owner.Dizzy(15)
owner.Knockdown(40)
to_chat(owner, span_warning("Your robotic ears buzz."))
to_chat(owner, span_warning("Your system reports anomalous feedback from your auditory sensors."))
/obj/item/organ/tongue/robot_ipc
name = "robotic voicebox"
@@ -92,7 +96,7 @@
speech_args[SPEECH_SPANS] |= SPAN_ROBOT
/obj/item/organ/eyes/robot_ipc
name = "robotic eyes"
name = "optical sensors"
icon_state = "cybernetic_eyeballs"
desc = "A very basic set of optical sensors with no extra vision modes or functions."
status = ORGAN_ROBOTIC
@@ -102,7 +106,7 @@
. = ..()
if(!owner || . & EMP_PROTECT_SELF)
return
to_chat(owner, span_warning("Static obfuscates your vision!"))
to_chat(owner, span_warning("Electromagnetic interference clouds your optics with static."))
owner.flash_act(visual = 1)
if(severity == EMP_HEAVY)
owner.adjustOrganLoss(ORGAN_SLOT_EYES, 20)
@@ -229,3 +233,6 @@
#undef IPC_CHARGE_MIN
#undef IPC_CHARGE_PER_NUTRITION
#undef IPC_CHARGE_DELAY_PER_100
#undef SYNTH_EMP_BRAIN_DAMAGE_HEAVY
#undef SYNTH_EMP_BRAIN_DAMAGE_LIGHT
#undef SYNTH_EMP_BRAIN_DAMAGE_MAXIMUM
@@ -1,5 +1,5 @@
/datum/surgery/robot_brain_surgery
name = "Reset posibrain logic (Brain surgery)"
name = "Reset Posibrain Logic (Brain Surgery)"
steps = list(
/datum/surgery_step/mechanic_open,
/datum/surgery_step/mechanic_unwrench,
@@ -14,9 +14,15 @@
desc = "A surgical procedure that restores the default behavior logic and personality matrix of an IPC posibrain."
/datum/surgery_step/fix_robot_brain
name = "fix posibrain (multitool)"
implements = list(TOOL_MULTITOOL = 100, TOOL_HEMOSTAT = 35, TOOL_SCREWDRIVER = 15)
time = 120 //long and complicated
name = "fix posibrain"
implements = list(
TOOL_MULTITOOL = 100,
TOOL_HEMOSTAT = 35,
TOOL_SCREWDRIVER = 15,
)
repeatable = TRUE
time = 12 SECONDS //long and complicated
/datum/surgery/robot_brain_surgery/can_start(mob/user, mob/living/carbon/target, obj/item/tool)
var/obj/item/organ/brain/B = target.getorganslot(ORGAN_SLOT_BRAIN)
if(!B)
@@ -24,23 +30,25 @@
return TRUE
/datum/surgery_step/fix_robot_brain/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, span_notice("You begin to fix [target]'s posibrain..."),
display_results(user, target, span_notice("You begin to clear system corruption from [target]'s posibrain..."),
"[user] begins to fix [target]'s posibrain.",
"[user] begins to perform surgery on [target]'s posibrain.")
/datum/surgery_step/fix_robot_brain/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, span_notice("You succeed in fixing [target]'s posibrain."),
display_results(user, target, span_notice("You succeed in clearing system corruption from [target]'s posibrain."),
"[user] successfully fixes [target]'s posibrain!",
"[user] completes the surgery on [target]'s posibrain.")
if(target.mind && target.mind.has_antag_datum(/datum/antagonist/brainwashed))
target.mind.remove_antag_datum(/datum/antagonist/brainwashed)
target.setOrganLoss(ORGAN_SLOT_BRAIN, target.getOrganLoss(ORGAN_SLOT_BRAIN) - 60) //we set damage in this case in order to clear the "failing" flag
target.cure_all_traumas(TRAUMA_RESILIENCE_LOBOTOMY) //Lobotomy tier fix cause you can't clone this!
return TRUE
if(target.getOrganLoss(ORGAN_SLOT_BRAIN) > NONE)
to_chat(user, "[target]'s posibrain still has some lasting system damage that can be cleared.")
return ..()
/datum/surgery_step/fix_robot_brain/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(target.getorganslot(ORGAN_SLOT_BRAIN))
display_results(user, target, span_warning("You screw up, causing more damage!"),
display_results(user, target, span_warning("You screw up, fragmenting their data!"),
span_warning("[user] screws up, causing damage to the circuits!"),
"[user] completes the surgery on [target]'s posibrain.")
target.adjustOrganLoss(ORGAN_SLOT_BRAIN, 60)
@@ -1,5 +1,5 @@
/datum/surgery/robot_chassis_restoration
name = "Full chassis restoration (Full heal + revival)"
/datum/surgery/positronic_restoration
name = "Posibrain Reboot (Revival)"
steps = list(
/datum/surgery_step/mechanic_unwrench,
/datum/surgery_step/pry_off_plating/fullbody,
@@ -8,70 +8,88 @@
/datum/surgery_step/prepare_electronics,
/datum/surgery_step/add_plating/fullbody,
/datum/surgery_step/weld_plating/fullbody,
/datum/surgery_step/finalize_chassis_restoration)
/datum/surgery_step/finalize_positronic_restoration,
/datum/surgery_step/mechanic_close)
target_mobtypes = list(/mob/living/carbon/human)
possible_locs = list(BODY_ZONE_CHEST)
requires_bodypart_type = BODYPART_ROBOTIC
desc = "A surgical procedure that rebuilds a synthetic unit from their skeleton to full integrity, recommended if they are damaged far beyond repair."
desc = "A surgical procedure that reboots a positronic brain."
/datum/surgery/robot_chassis_restoration/can_start(mob/user, mob/living/carbon/target)
if(!..())
return FALSE
if(target.stat != DEAD)
return FALSE
if(target.suiciding)
return FALSE
var/obj/item/organ/brain/target_brain = target.getorganslot(ORGAN_SLOT_BRAIN)
if(!target_brain)
return FALSE
return TRUE
/datum/surgery_step/pry_off_plating/fullbody
time = 120
time = 12 SECONDS
/datum/surgery_step/pry_off_plating/fullbody/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, span_notice("You begin to pry off [target]'s plating..."),
"[user] begins to pry off [target]'s plating.",
"[user] begins to pry off [target]'s plating.")
display_results(user, target, span_notice("You begin to pry open compromised panels on [target]'s braincase..."),
span_notice("[user] begins to pry open compromised panels on [target]'s braincase."))
/datum/surgery_step/cut_wires/fullbody
time = 120
time = 12 SECONDS
/datum/surgery_step/cut_wires/fullbody/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, span_notice("You begin to cut [target]'s loose wires..."),
"[user] begins to cut [target]'s loose wires.",
"[user] begins to cut [target]'s loose wires.")
display_results(user, target, span_notice("You begin to trim [target]'s nonfunctional wires..."),
span_notice("[user] begins to cut [target]'s loose wires."))
/datum/surgery_step/weld_plating/fullbody
time = 120
time = 12 SECONDS
/datum/surgery_step/weld_plating/fullbody/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, span_notice("You begin to weld [target]'s plating..."),
"[user] begins to weld [target]'s plating.",
"[user] begins to weld [target]'s plating.")
display_results(user, target, span_notice("You begin to slice compromised panels from [target]'s braincase..."),
span_notice("[user] begins to slice compromised panels from [target]'s braincase."))
/datum/surgery_step/replace_wires/fullbody
time = 72
time = 7 SECONDS
cableamount = 15
/datum/surgery_step/replace_wires/fullbody/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, span_notice("You begin to replace [target]'s wiring..."),
"[user] begins to replace [target]'s wiring.",
"[user] begins to replace [target]'s wiring.")
span_notice("[user] begins to replace [target]'s wiring."))
/datum/surgery_step/add_plating/fullbody
time = 120
time = 12 SECONDS
ironamount = 15
/datum/surgery_step/add_plating/fullbody/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, span_notice("You begin to add plating to [target]..."),
"[user] begins to add plating to [target].",
"[user] begins to add plating to [target].")
display_results(user, target, span_notice("You begin to add new panels to [target]'s braincase..."),
span_notice("[user] begins to add new panels to [target]'s braincase."))
/datum/surgery_step/finalize_chassis_restoration
name = "finalize chassis restoration (wrench)"
/datum/surgery_step/finalize_positronic_restoration
name = "finalize positronic restoration (multitool)"
implements = list(
TOOL_WRENCH = 100)
time = 120
TOOL_MULTITOOL = 100,
)
repeatable = TRUE
time = 12 SECONDS
/datum/surgery_step/finalize_chassis_restoration/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, span_notice("You begin to finalize [target]'s chassis..."),
"[user] begins to finalize [target]'s chassis.",
"[user] begins to finalize [target]'s chassis.")
/datum/surgery_step/finalize_positronic_restoration/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, span_notice("You begin to force a reboot in [target]'s posibrain..."),
span_notice("[user] begins to force a reboot in [target]'s posibrain."))
target.notify_ghost_cloning("Someone is trying to reboot your posibrain.", source = target)
/datum/surgery_step/finalize_chassis_restoration/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
/datum/surgery_step/finalize_positronic_restoration/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
target.cure_husk()
//Revival is handled by REVIVES_BY_HEALING
target.heal_overall_damage(1000,1000,0, BODYPART_ROBOTIC)
//I call this twice because for some reason health may not update and we may not get a revival, and I cant find a good clean solution to this
target.heal_overall_damage(1,1,0, BODYPART_ROBOTIC)
return TRUE
target.grab_ghost()
target.updatehealth()
target.setOrganLoss(ORGAN_SLOT_BRAIN, target.getOrganLoss(ORGAN_SLOT_BRAIN) - 200)
if(target.revive(full_heal = FALSE, admin_revive = FALSE))
target.emote("chime")
target.visible_message(span_notice("...[target] reactivates, their chassis coming online!"))
to_chat(target, span_danger("[CONFIG_GET(string/blackoutpolicy)]"))
return FALSE //This is due to synths having some weirdness with their revive.
else
target.emote("buzz")
target.visible_message(span_warning("...[target.p_they()] convulses, then goes offline."))
return TRUE
@@ -27,7 +27,7 @@
name = "repair body (welder/cable)"
implements = list(TOOL_WELDER = 100, /obj/item/stack/cable_coil = 100)
repeatable = TRUE
time = 15
time = 25
var/healsbrute = FALSE
var/healsburn = FALSE
var/brutehealing = 0
@@ -72,9 +72,11 @@
tool.use_tool(target, user, 0, volume=50, amount=1)
var/urhealedamt_burn = 0
if(healsburn)
var/obj/item/stack/cable_coil/cable = tool
urhealedamt_burn = burnhealing
if(tool)
tool.use(1)
if(!cable.amount)
return
cable.use(1)
if(missinghpbonus)
if(target.stat != DEAD)
urhealedamt_brute += round((target.getBruteLoss()/ missinghpbonus),0.1)
@@ -127,3 +129,4 @@
brutehealing = 10
burnhealing = 10
missinghpbonus = 15
time = 10
+2
View File
@@ -4398,6 +4398,7 @@
#include "modular_skyrat\master_files\code\game\objects\items\devices\radio\encryption_key.dm"
#include "modular_skyrat\master_files\code\game\objects\items\devices\radio\headset.dm"
#include "modular_skyrat\master_files\code\game\objects\items\storage\boxes.dm"
#include "modular_skyrat\master_files\code\game\objects\items\tools\weldingtool.dm"
#include "modular_skyrat\master_files\code\game\objects\structures\railings.dm"
#include "modular_skyrat\master_files\code\game\objects\structures\sauna_oven.dm"
#include "modular_skyrat\master_files\code\game\objects\structures\tables_racks.dm"
@@ -4466,6 +4467,7 @@
#include "modular_skyrat\master_files\code\modules\mod\mod_clothes.dm"
#include "modular_skyrat\master_files\code\modules\mod\modules\_module.dm"
#include "modular_skyrat\master_files\code\modules\mod\modules\modules_antag.dm"
#include "modular_skyrat\master_files\code\modules\power\cable.dm"
#include "modular_skyrat\master_files\code\modules\power\lighting.dm"
#include "modular_skyrat\master_files\code\modules\power\singularity\containment_field.dm"
#include "modular_skyrat\master_files\code\modules\projectiles\boxes_magazines\external\shotgun.dm"