From f544d12d572bc3024f9af820b7bac6340e485975 Mon Sep 17 00:00:00 2001 From: He4eT Date: Tue, 17 Mar 2020 16:09:03 +0500 Subject: [PATCH] Connector can be fixed only once --- src/item/dataCable.t | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/item/dataCable.t b/src/item/dataCable.t index 4813f03..e4a91d6 100644 --- a/src/item/dataCable.t +++ b/src/item/dataCable.t @@ -42,12 +42,20 @@ dataCable: PlugAttachable, Attachable, RoomPart dobjFor (Repair) { verify() { - illogical('This connector can be fixed - with glue, duck tape or something similar.'); + if (jack.isBroken) { + illogical(' + This connector can be fixed + with glue, duck tape or something similar.'); + } else { + illogical('The connector is already fixed.'); + } } } dobjFor (RepairWith) { verify() { + if (!jack.isBroken) { + illogical('The connector is already fixed.'); + } if (gIobj not in ( dentalFloss, pieceOfTape @@ -58,7 +66,9 @@ dataCable: PlugAttachable, Attachable, RoomPart } } action() { - "Wow!"; + gIobj.moveInto(nil); + jack.isBroken = nil; + "The connector is now ugly, but serviceable."; } } ;