diff --git a/src/actor/pc.t b/src/actor/pc.t index 0569674..e32f329 100644 --- a/src/actor/pc.t +++ b/src/actor/pc.t @@ -1,6 +1,6 @@ me: Actor 'me/self' - location = orangeRoom + location = redRoom posture = lying ; diff --git a/src/actor/surgeryAssistant.t b/src/actor/surgeryAssistant.t index 85b0afa..dcc245f 100644 --- a/src/actor/surgeryAssistant.t +++ b/src/actor/surgeryAssistant.t @@ -16,3 +16,9 @@ surgeryAssistant: Person
You can see the message Connection lost on the indicator display." isInitState = true ; + +dataPort: PlugAttachable, Attachable, Fixture + 'data port/outlet/socket' + 'data port' + @redRoom +; diff --git a/src/item/dataCable.t b/src/item/dataCable.t index 61b6eea..d3b6f63 100644 --- a/src/item/dataCable.t +++ b/src/item/dataCable.t @@ -1,7 +1,34 @@ -dataCable: Thing, RoomPart - 'data cable/wire/cord' +dataCable: PlugAttachable, Attachable, RoomPart + 'data cable/wire/cord/jack/plug' 'data cable' + @redRoom "Thick data cable with damaged connector." - location = redRoom + explainCannotAttachTo(obj) { + obj != dataPort + ? "This data cable can only be connected to the data port." + : jack.isBroken + ? "The connector on data cable is broken." + : ""; + } + + canAttachTo(obj) { + return !jack.isBroken && obj == dataPort; + } +; + ++ jack: Component + 'connector' + 'connector' + "<One of the components of its body should be + fixed with glue, duct tape or something similar.' + : 'Fixed connector. +
The broken part is held carelessly.' + >>" + + dobjFor (AttachTo) remapTo(AttachTo, dataCable, IndirectObject) + + isBroken = true; ; diff --git a/src/item/tape.t b/src/item/tape.t index 6bd16a3..3cd628d 100644 --- a/src/item/tape.t +++ b/src/item/tape.t @@ -28,8 +28,8 @@ tapeWall: Thing, RoomPartItem } dobjFor (Doff) remapTo(Remove, self) - dobjFor (Break) remapTo(Remove, self) dobjFor (Pull) remapTo(Remove, self) + dobjFor (Break) remapTo(Remove, self) dobjFor (Take) { action () {