From 1c2d801f99610e635bcc8e5ded066eb4bd849085 Mon Sep 17 00:00:00 2001 From: diegoflores31 Date: Sun, 9 Jun 2024 16:47:25 -0500 Subject: [PATCH 1/2] August 12 2036 The Heat Death of The Universe --- code/game/objects/items/stacks/cable_coil.dm | 45 ++++++++--------- code/game/objects/items/stacks/nanopaste.dm | 46 ++++++++--------- .../objects/items/tools/maintenance_tools.dm | 50 ++++++++----------- .../living/carbon/human/species/synthetic.dm | 4 +- 4 files changed, 64 insertions(+), 81 deletions(-) diff --git a/code/game/objects/items/stacks/cable_coil.dm b/code/game/objects/items/stacks/cable_coil.dm index 1dd95464ddd5..5d277559c836 100644 --- a/code/game/objects/items/stacks/cable_coil.dm +++ b/code/game/objects/items/stacks/cable_coil.dm @@ -22,6 +22,7 @@ attack_speed = 3 ground_offset_x = 2 ground_offset_y = 2 + var/healing_time = 4 SECONDS /obj/item/stack/cable_coil/Initialize(mapload, length = MAXCOIL, param_color = null) . = ..() @@ -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!")) @@ -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)) + 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 + 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 ..() diff --git a/code/game/objects/items/stacks/nanopaste.dm b/code/game/objects/items/stacks/nanopaste.dm index 156fbf548f5f..af989497f368 100644 --- a/code/game/objects/items/stacks/nanopaste.dm +++ b/code/game/objects/items/stacks/nanopaste.dm @@ -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" @@ -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.")) - diff --git a/code/game/objects/items/tools/maintenance_tools.dm b/code/game/objects/items/tools/maintenance_tools.dm index 8febff63ee5d..4eb8dd5af6b6 100644 --- a/code/game/objects/items/tools/maintenance_tools.dm +++ b/code/game/objects/items/tools/maintenance_tools.dm @@ -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 /obj/item/tool/weldingtool/Initialize() . = ..() @@ -217,43 +218,32 @@ 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) 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].")) + 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) + 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) return ..() /obj/item/tool/weldingtool/afterattack(obj/target, mob/user, proximity) @@ -445,7 +435,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 has_welding_screen = TRUE inherent_traits = list(TRAIT_TOOL_SIMPLE_BLOWTORCH) icon_state = "welder_b" diff --git a/code/modules/mob/living/carbon/human/species/synthetic.dm b/code/modules/mob/living/carbon/human/species/synthetic.dm index f2d5c50f7391..6be12853527e 100644 --- a/code/modules/mob/living/carbon/human/species/synthetic.dm +++ b/code/modules/mob/living/carbon/human/species/synthetic.dm @@ -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 cold_level_1 = -1 cold_level_2 = -1 From 424a3c59eb0bd5a43eafdae6a5a12811148ecd8d Mon Sep 17 00:00:00 2001 From: Diegoflores31 <47069269+Diegoflores31@users.noreply.github.com> Date: Sun, 9 Jun 2024 21:57:35 -0500 Subject: [PATCH 2/2] Update code/game/objects/items/tools/maintenance_tools.dm Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com> --- code/game/objects/items/tools/maintenance_tools.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/tools/maintenance_tools.dm b/code/game/objects/items/tools/maintenance_tools.dm index 4eb8dd5af6b6..ea37373545c0 100644 --- a/code/game/objects/items/tools/maintenance_tools.dm +++ b/code/game/objects/items/tools/maintenance_tools.dm @@ -227,7 +227,8 @@ if(user.action_busy) return if(target_limb.brute_dam && welding) - remove_fuel(1,user) + 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"))