From 7443629d828e30ff4e13bb78aef4ddf121f7e4fa Mon Sep 17 00:00:00 2001 From: inselc Date: Sat, 29 Oct 2016 13:46:19 +0200 Subject: [PATCH] Bugfixes: Welding tool, Constructs, Runes (#1072) Fixes #1066 Fixes #1065 Fixes #1053 --- code/game/objects/items/weapons/tools.dm | 21 +++++++++++++------ code/game/turfs/turf.dm | 5 ++++- .../modules/mob/living/silicon/robot/robot.dm | 8 +++++-- .../simple_animal/constructs/constructs.dm | 17 +++++++++++++-- html/changelogs/inselc-PR-1072.yml | 10 +++++++++ 5 files changed, 50 insertions(+), 11 deletions(-) create mode 100644 html/changelogs/inselc-PR-1072.yml diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index a70bbd5f0a9..ff73999815b 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -306,15 +306,24 @@ var/mob/living/carbon/human/H = M if(H.species.flags & IS_SYNTHETIC) if(M == user) - user << "\red You can't repair damage to your own body - it's against OH&S." + user << "You can't repair damage to your own body - it's against OH&S." return - - if(S.brute_dam) - S.heal_damage(15,0,0,1) - user.visible_message("\red \The [user] patches some dents on \the [M]'s [S.name] with \the [src].") + if(S.brute_dam == 0) + // Organ undamaged + user << "Nothing to fix here!" return + if (!src.welding) + // Welder is switched off! + user << "You need to light the welding tool, first!" + return + if (src.remove_fuel(0)) + // Use a bit of fuel and repair + S.heal_damage(15,0,0,1) + user.visible_message("\The [user] patches some dents on \the [M]'s [S.name] with \the [src].") else - user << "Nothing to fix!" + // Welding tool is out of fuel + user << "Need more welding fuel!" + return else return ..() diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 2fa4d08ce5e..6aa95526d5f 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -425,7 +425,10 @@ if(istype(O,/obj/effect/decal/cleanable) || istype(O,/obj/effect/overlay)) qdel(O) if(istype(O,/obj/effect/rune)) - user << "\red No matter how well you wash, the bloody symbols remain!" + var/obj/effect/rune/R = O + // Only show message for visible runes + if (R.visibility) + user << "No matter how well you wash, the bloody symbols remain!" else user << "\The [source] is too dry to wash that." source.reagents.trans_to_turf(src, 1, 10) //10 is the multiplier for the reaction effect. probably needed to wet the floor properly. diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 630bd0ef1d5..a9b464129e5 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -456,16 +456,20 @@ user << "You lack the reach to be able to repair yourself." return - if (!getBruteLoss()) + if (getBruteLoss() == 0) user << "Nothing to fix here!" return var/obj/item/weapon/weldingtool/WT = W + if (!WT.welding) + // Welding tool is switched off + user << "You need to light the welding tool, first!" + return if (WT.remove_fuel(0)) adjustBruteLoss(-30) updatehealth() add_fingerprint(user) for(var/mob/O in viewers(user, null)) - O.show_message(text("\red [user] has fixed some of the dents on [src]!"), 1) + O.show_message(text("[user] has fixed some of the dents on [src]!"), 1) else user << "Need more welding fuel!" return diff --git a/code/modules/mob/living/simple_animal/constructs/constructs.dm b/code/modules/mob/living/simple_animal/constructs/constructs.dm index 236261c31d2..0e2f420e02b 100644 --- a/code/modules/mob/living/simple_animal/constructs/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs/constructs.dm @@ -57,11 +57,14 @@ /mob/living/simple_animal/construct/attack_generic(var/mob/user) if(istype(user, /mob/living/simple_animal/construct/builder)) - if(health < maxHealth) + if(getBruteLoss() > 0) adjustBruteLoss(-5) user.visible_message("\The [user] mends some of \the [src]'s wounds.") else - user << "\The [src] is undamaged." + if (health < maxHealth) + user << "Healing \the [src] any further is beyond your abilities." + else + user << "\The [src] is undamaged." return return ..() @@ -131,6 +134,16 @@ return (..(P)) +/mob/living/simple_animal/construct/armoured/UnarmedAttack(var/atom/A, var/proximity) + if(istype(A, /obj/machinery)) + // Destroy machines instead of opening their UI + var/obj/machinery/M = A + do_attack_animation(M) + playsound(loc, attack_sound, 50, 1, 1) + M.ex_act(3.0) + else + ..() + ////////////////////////Wraith///////////////////////////////////////////// diff --git a/html/changelogs/inselc-PR-1072.yml b/html/changelogs/inselc-PR-1072.yml new file mode 100644 index 00000000000..96d94405cf6 --- /dev/null +++ b/html/changelogs/inselc-PR-1072.yml @@ -0,0 +1,10 @@ +author: inselc + +delete-after: True + +changes: + - bugfix: "Fixed welding tool not using fuel when repairing IPCs, and repairing IPCs in switched-off state." + - bugfix: "Fixed Artificers healing other constructs." + - bugfix: "Fixed invisible runes triggering message when trying to clean the tile they're on." + - rscadd: "Added Juggernaut ability to smash machines." +