From 238ce7a80c8a0d9870189fb1f4df2bbc883d2bea Mon Sep 17 00:00:00 2001 From: inselc Date: Fri, 7 Apr 2017 22:53:21 +0200 Subject: [PATCH] Bugfixes: Drones, Infrared emitters, Implant cases and Limbs (#2049) This PR contains bugfixes for: Drones being unable to matter-decompile burnt matches (#717). Burnt matches will be decompiled into a small amount of wood. Ghosts triggering infrared emitters (#644). Added a check whether the movable passing through the laser beam is actually "visible". Reagent transfer messages showing up when clicking on chem implant cases, even when the syringe is empty (#704). Added a check whether reagents have actually been transferred. The displayed message will now also display the actual amount transferred. Removed spawn(5)-delay to prevent click-stacking. Limb relocation messages not showing up for bystanders (#778). --- .../objects/items/weapons/implants/implantcase.dm | 6 +++--- code/modules/assembly/infrared.dm | 2 ++ code/modules/mob/living/carbon/human/human.dm | 15 +++++++++------ .../mob/living/silicon/robot/drone/drone_items.dm | 3 +++ html/changelogs/inselc-PR-2049.yml | 9 +++++++++ 5 files changed, 26 insertions(+), 9 deletions(-) create mode 100644 html/changelogs/inselc-PR-2049.yml diff --git a/code/game/objects/items/weapons/implants/implantcase.dm b/code/game/objects/items/weapons/implants/implantcase.dm index 49b1b280a7a..13a76e44558 100644 --- a/code/game/objects/items/weapons/implants/implantcase.dm +++ b/code/game/objects/items/weapons/implants/implantcase.dm @@ -37,9 +37,9 @@ if(src.imp.reagents.total_volume >= src.imp.reagents.maximum_volume) user << "\The [src] is full." else - spawn(5) - I.reagents.trans_to_obj(src.imp, 5) - user << "You inject 5 units of the solution. The syringe now contains [I.reagents.total_volume] units." + var/trans = I.reagents.trans_to_obj(src.imp, 5) + if (trans > 0) + user << "You inject [trans] units of the solution. The syringe now contains [I.reagents.total_volume] units." else if (istype(I, /obj/item/weapon/implanter)) var/obj/item/weapon/implanter/M = I if (M.imp) diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm index b28b0f46b46..06acb04d7ec 100644 --- a/code/modules/assembly/infrared.dm +++ b/code/modules/assembly/infrared.dm @@ -248,6 +248,8 @@ /obj/effect/beam/i_beam/Crossed(atom/movable/AM as mob|obj) if(istype(AM, /obj/effect/beam)) return + if( (AM.invisibility == INVISIBILITY_OBSERVER) || (AM.invisibility == 101) ) + return spawn(0) hit() return diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 33d656106dc..5d0ee11a225 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -87,7 +87,7 @@ organs_by_name = null bad_internal_organs = null bad_external_organs = null - + QDEL_NULL(DS) // qdel and null out our equipment. QDEL_NULL(shoes) @@ -1406,9 +1406,11 @@ var/obj/item/organ/external/current_limb = organs_by_name[choice] if(self) - src << "You brace yourself to relocate your [current_limb.joint]..." + U.visible_message("[U] tries to relocate their [current_limb.joint]...", \ + "You brace yourself to relocate your [current_limb.joint]...") else - U << "You begin to relocate [S]'s [current_limb.joint]..." + U.visible_message("[U] tries to relocate [S]'s [current_limb.joint]...", \ + "You begin to relocate [S]'s [current_limb.joint]...") if(!do_after(U, 30)) return @@ -1416,10 +1418,11 @@ return if(self) - src << "You pop your [current_limb.joint] back in!" + U.visible_message("[U] pops their [current_limb.joint] back in!", \ + "You pop your [current_limb.joint] back in!") else - U << "You pop [S]'s [current_limb.joint] back in!" - S << "[U] pops your [current_limb.joint] back in!" + U.visible_message("[U] pops [S]'s [current_limb.joint] back in!", \ + "You pop [S]'s [current_limb.joint] back in!") current_limb.undislocate() /mob/living/carbon/human/drop_from_inventory(var/obj/item/W, var/atom/Target = null) diff --git a/code/modules/mob/living/silicon/robot/drone/drone_items.dm b/code/modules/mob/living/silicon/robot/drone/drone_items.dm index e2d312f9246..4438c4bcc81 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm @@ -75,6 +75,9 @@ if(istype(W,/obj/item/weapon/cigbutt)) if(plastic) plastic.add_charge(500) + else if (istype(W, /obj/item/weapon/flame/match)) + if (wood) + wood.add_charge(100) else if(istype(W,/obj/effect/spider/spiderling)) if(wood) wood.add_charge(2000) diff --git a/html/changelogs/inselc-PR-2049.yml b/html/changelogs/inselc-PR-2049.yml new file mode 100644 index 00000000000..a45894ed48b --- /dev/null +++ b/html/changelogs/inselc-PR-2049.yml @@ -0,0 +1,9 @@ +author: inselc + +delete-after: True + +changes: + - bugfix: "Drones are now able to decompile burnt matches." + - bugfix: "Ghosts will no longer trigger infrared emitters." + - bugfix: "Transferring chemicals to a chem implant will now show actual amount of reagents transferred." + - bugfix: "Relocating your/someone's limb will now properly show a message to all bystanders."