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

Synthetic and Robotic Tweaks #6416

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
45 changes: 20 additions & 25 deletions code/game/objects/items/stacks/cable_coil.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
attack_speed = 3
ground_offset_x = 2
ground_offset_y = 2
var/healing_time = 4 SECONDS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var/healing_time = 4 SECONDS
var/healing_time = 3 SECONDS


/obj/item/stack/cable_coil/Initialize(mapload, length = MAXCOIL, param_color = null)
. = ..()
Expand Down Expand Up @@ -63,9 +64,9 @@
set name = "Make Cable Restraints"
set category = "Object"
set src in usr
var/mob/M = usr
var/mob/target_mob = usr

if(ishuman(M) && !M.is_mob_incapacitated())
if(ishuman(target_mob) && !target_mob.is_mob_incapacitated())
if(!istype(usr.loc,/turf)) return
if(src.amount <= 14)
to_chat(usr, SPAN_WARNING("You need at least 15 lengths to make restraints!"))
Expand Down Expand Up @@ -304,34 +305,28 @@
. = ..()
color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_WHITE, COLOR_MAGENTA, COLOR_YELLOW, COLOR_CYAN)

/obj/item/stack/cable_coil/attack(mob/M as mob, mob/user as mob)
if(ishuman(M))
var/mob/living/carbon/human/H = M

var/obj/limb/S = H.get_limb(user.zone_selected)
if(!(S.status & (LIMB_ROBOT|LIMB_SYNTHSKIN)) || user.a_intent != INTENT_HELP)
/obj/item/stack/cable_coil/attack(mob/target_mob as mob, mob/user as mob)
if(ishuman(target_mob))
var/mob/living/carbon/human/humanus = target_mob
var/obj/limb/target_limb = humanus.get_limb(user.zone_selected)
if(!(target_limb.status & (LIMB_ROBOT|LIMB_SYNTHSKIN)) || user.a_intent != INTENT_HELP)
return ..()

if(user.action_busy)
return
var/self_fixing = FALSE

if(H.species.flags & IS_SYNTHETIC && M == user)
self_fixing = TRUE

if(S.burn_dam > 0 && use(1))
if(self_fixing)
user.visible_message(SPAN_WARNING("\The [user] begins fixing some burn damage on their [S.display_name]."), \
SPAN_WARNING("You begin to carefully patch some burn damage on your [S.display_name] so as not to void your warranty."))
if(!do_after(user, 30, INTERRUPT_ALL, BUSY_ICON_FRIENDLY))
return

S.heal_damage(0, 15, TRUE)
H.pain.recalculate_pain()
user.visible_message(SPAN_DANGER("\The [user] repairs some burn damage on \the [M]'s [S.display_name] with \the [src]."))
if(target_limb.burn_dam && use(5))
Diegoflores31 marked this conversation as resolved.
Show resolved Hide resolved
if(user == humanus)
user.visible_message(SPAN_WARNING("\The [user] begins fixing some burns on from its [target_limb.display_name]."), \
SPAN_WARNING("You try to patch some burns on your [target_limb.display_name] by yourself"))
healing_time += 3 SECONDS
if(!do_after(user, max(healing_time - (user.skills.get_skill_level(SKILL_ENGINEER)SECONDS)), INTERRUPT_ALL, BUSY_ICON_FRIENDLY))
return
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a physical item being used, the cable used should be dropped on the ground on do_after interruption.

Alternatively, only check the amount before hand, and only consume it (and confirm it could be consumed) after the do_after.

target_limb.heal_damage(0, 15, TRUE)
humanus.updatehealth()
humanus.pain.recalculate_pain()
user.visible_message(SPAN_DANGER("\The [user] repairs some damage on \the [target_mob]'s [target_limb.display_name] with \the [src]."))
return
else
to_chat(user, "Nothing to fix!")
to_chat(user, "There is nothing to fix!")

else
return ..()
46 changes: 22 additions & 24 deletions code/game/objects/items/stacks/nanopaste.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/obj/item/stack/nanopaste
name = "nanopaste"
singular_name = "nanite swarm"
desc = "A tube of paste containing swarms of repair nanites. Very effective in repairing robotic machinery."
name = "Polymer tape"
singular_name = "Polymer tape"
desc = "A roll of tape made of self bonding polymer , used for repair of synthetic and metalic instruments on the field."
icon = 'icons/obj/items/items.dmi'
icon_state = "tube"

Expand All @@ -11,28 +11,26 @@
w_class = SIZE_SMALL
stack_id = "nanopaste"
black_market_value = 25
var/healing_time = 3 SECONDS

/obj/item/stack/nanopaste/attack(mob/living/M as mob, mob/user as mob)
if (!istype(M) || !istype(user))
return 0

if (istype(M,/mob/living/carbon/human)) //Repairing robolimbs
var/mob/living/carbon/human/H = M
if(isspeciessynth(H) && M == user && !H.allow_gun_usage)
to_chat(H, SPAN_WARNING("Your programming forbids you from self-repairing with \the [src]."))
return
var/obj/limb/S = H.get_limb(user.zone_selected)

if (S && (S.status & (LIMB_ROBOT|LIMB_SYNTHSKIN)))
if(S.get_damage())
S.heal_damage(15, 15, robo_repair = 1)
H.pain.recalculate_pain()
H.updatehealth()
/obj/item/stack/nanopaste/attack(mob/living/target_living, mob/user as mob)
if(!ishuman(target_living) || !ishuman(user))
return
var/mob/living/carbon/human/humanus = target_living
var/obj/limb/target_limb = humanus.get_limb(user.zone_selected)
if(target_limb && (target_limb.status & (LIMB_ROBOT|LIMB_SYNTHSKIN)))
if(user == target_living)
healing_time += 3 SECONDS //self healing penalty
if(do_after(user, max(1 SECONDS, healing_time - (user.skills.get_skill_level(SKILL_ENGINEER)SECONDS)), INTERRUPT_ALL, BUSY_ICON_FRIENDLY, INTERRUPT_MOVED, BUSY_ICON_MEDICAL))
if(target_limb.get_damage())
target_limb.heal_damage(20, 20, TRUE)
target_living.pain.recalculate_pain()
target_living.updatehealth()
use(1)
var/others_msg = "\The [user] applies some nanite paste at[user != M ? " \the [M]'s" : " the"] [S.display_name] with \the [src]." // Needs to create vars for these messages because macro doesn't work otherwise
var/user_msg = "You apply some nanite paste at [user == M ? "your" : "[M]'s"] [S.display_name]."
user.visible_message(SPAN_NOTICE("[others_msg]"),\
SPAN_NOTICE("[user_msg]"))
user.affected_message(user,
SPAN_HELPFUL("You apply a piece of [src] to [target_living]'s [target_limb.display_name]"),
SPAN_HELPFUL("[user] repairs your [target_limb.display_name] with the [src]"),
SPAN_NOTICE("[user] repairs [target_living]'s [target_limb.display_name]"))
playsound(user, 'sound/handling/bandage.ogg', 25, 1, 2)
else
to_chat(user, SPAN_NOTICE("Nothing to fix here."))

51 changes: 21 additions & 30 deletions code/game/objects/items/tools/maintenance_tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@
/// Used to slowly deplete the fuel when the tool is left on.
var/weld_tick = 0
var/has_welding_screen = FALSE
var/healing_time = 4 SECONDS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var/healing_time = 4 SECONDS
var/healing_time = 3 SECONDS


/obj/item/tool/weldingtool/Initialize()
. = ..()
Expand Down Expand Up @@ -217,43 +218,33 @@
else //should never be happening, but just in case
toggle(TRUE)

/obj/item/tool/weldingtool/attack(mob/target, mob/user)

if(ishuman(target))
var/mob/living/carbon/human/human = target
var/obj/limb/limb = human.get_limb(user.zone_selected)

if (!limb) return
if(!(limb.status & (LIMB_ROBOT|LIMB_SYNTHSKIN)) || user.a_intent != INTENT_HELP)
/obj/item/tool/weldingtool/attack(mob/target_mob, mob/user)
if(ishuman(target_mob))
var/mob/living/carbon/human/humanus = target_mob
var/obj/limb/target_limb = humanus.get_limb(user.zone_selected)
if(!(target_limb.status & (LIMB_ROBOT|LIMB_SYNTHSKIN)) || user.a_intent != INTENT_HELP)
return ..()

if(user.action_busy)
return
var/self_fixing = FALSE

if(human.species.flags & IS_SYNTHETIC && target == user)
self_fixing = TRUE

if(limb.brute_dam && welding)
if(target_limb.brute_dam && welding)
if(!remove_fuel(1,user))
return
if(user == humanus)
user.visible_message(SPAN_WARNING("\The [user] begins fixing some dents on from its [target_limb.display_name]."), \
SPAN_WARNING("You try to patch some dents on your [target_limb.display_name] by yourself"))
healing_time += 3 SECONDS
if(!do_after(user, max(healing_time - (user.skills.get_skill_level(SKILL_ENGINEER)SECONDS)), INTERRUPT_ALL, BUSY_ICON_FRIENDLY))
return
remove_fuel(1,user)
if(self_fixing)
user.visible_message(SPAN_WARNING("\The [user] begins fixing some dents on their [limb.display_name]."), \
SPAN_WARNING("You begin to carefully patch some dents on your [limb.display_name] so as not to void your warranty."))
if(!do_after(user, 30, INTERRUPT_ALL, BUSY_ICON_FRIENDLY))
return

limb.heal_damage(15, 0, TRUE)
human.pain.recalculate_pain()
human.UpdateDamageIcon()
user.visible_message(SPAN_WARNING("\The [user] patches some dents on \the [human]'s [limb.display_name] with \the [src]."), \
SPAN_WARNING("You patch some dents on \the [human]'s [limb.display_name] with \the [src]."))
target_limb.heal_damage(15, 0, TRUE)
humanus.updatehealth()
humanus.pain.recalculate_pain()
user.visible_message(SPAN_DANGER("\The [user] repairs some damage on \the [target_mob]'s [target_limb.display_name] with \the [src]."))
return
else
to_chat(user, SPAN_WARNING("Nothing to fix!"))
to_chat(user, "There is nothing to fix!")

else
if(ismob(target))
remove_fuel(1)
Comment on lines -255 to -256
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we dont want to remove fuel if nothing has been done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thats not the situation here for this else; and regardless I do want the fuel removed.

return ..()

/obj/item/tool/weldingtool/afterattack(obj/target, mob/user, proximity)
Expand Down Expand Up @@ -445,7 +436,7 @@
/obj/item/tool/weldingtool/simple
name = "\improper ME3 hand welder"
desc = "A compact, handheld welding torch used by the marines of the United States Colonial Marine Corps for cutting and welding jobs on the field. Due to the small size and slow strength, its function is limited compared to a full-sized technician's blowtorch."
max_fuel = 5
max_fuel = 10
Comment on lines -448 to +439
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Undocumented change that probably doesn't need to change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will add to the changelog . this is needed so non engi classes can heal themselves when they get prostetic limbs at least for a limited amount (5 uses ) . sincerely i dont think this affects balance at all , nobody touches that torch

has_welding_screen = TRUE
inherent_traits = list(TRAIT_TOOL_SIMPLE_BLOWTORCH)
icon_state = "welder_b"
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/carbon/human/species/synthetic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

total_health = 150 //more health than regular humans

brute_mod = 0.5
burn_mod = 0.9 //a small bit of resistance
brute_mod = 0.9
burn_mod = 0.9
Comment on lines -19 to +20
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't need to change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has to be done , synths are way too tanky for being a support role, check on any round and you will see synthetics abusing this to basically shrug off any xenomorph and do ballsy moves with no risk


cold_level_1 = -1
cold_level_2 = -1
Expand Down
Loading