diff --git a/experiment.t b/experiment.t index 122e721..b4b468e 100644 --- a/experiment.t +++ b/experiment.t @@ -45,6 +45,7 @@ gameMain: GameMainDef #include "src/room/orangeRoom.t" #include "src/room/orangeBathroom.t" +#include "src/item/dentalFloss.t" #include "src/room/yellowRoom.t" #include "src/item/advertisingDisplay.t" diff --git a/src/item/dataCable.t b/src/item/dataCable.t index d3b6f63..2bbd825 100644 --- a/src/item/dataCable.t +++ b/src/item/dataCable.t @@ -1,9 +1,13 @@ dataCable: PlugAttachable, Attachable, RoomPart - 'data cable/wire/cord/jack/plug' + 'data cable/wire/cord' 'data cable' @redRoom "Thick data cable with damaged connector." + canAttachTo (obj) { + return !jack.isBroken && obj == dataPort; + } + explainCannotAttachTo(obj) { obj != dataPort ? "This data cable can only be connected to the data port." @@ -12,13 +16,18 @@ dataCable: PlugAttachable, Attachable, RoomPart : ""; } - canAttachTo(obj) { - return !jack.isBroken && obj == dataPort; + dobjFor (Repair) remapTo(Repair, jack) + dobjFor (RepairWith) remapTo(Repair, self) + + dobjFor (AttachTo) { + action () { + "Data cable pluged in."; + } } ; + jack: Component - 'connector' + 'connector/jack' 'connector' "<The broken part is held carelessly.' >>" + isBroken = true dobjFor (AttachTo) remapTo(AttachTo, dataCable, IndirectObject) - isBroken = true; + dobjFor (Repair) { + verify() { + illogical('This connector can be fixed + with glue, duck tape or something similar.'); + } + } + dobjFor (RepairWith) { + verify() { + illogical('Code here'); + } + } ; diff --git a/src/item/dentalFloss.t b/src/item/dentalFloss.t new file mode 100644 index 0000000..8d438a7 --- /dev/null +++ b/src/item/dentalFloss.t @@ -0,0 +1,9 @@ +dentalFloss: Thing + 'dental floss' + 'dental floss' + @me + " A cord of thin filaments + used to remove food and dental plaque + from between teeth in areas + a toothbrush is unable to reach." +;