mirror of
https://github.com/He4eT/yet-another-experiment.git
synced 2026-05-05 00:57:22 +00:00
Dental floss; repair of the connector
This commit is contained in:
parent
b3037f2877
commit
0a73200eb6
3 changed files with 35 additions and 5 deletions
|
|
@ -45,6 +45,7 @@ gameMain: GameMainDef
|
||||||
|
|
||||||
#include "src/room/orangeRoom.t"
|
#include "src/room/orangeRoom.t"
|
||||||
#include "src/room/orangeBathroom.t"
|
#include "src/room/orangeBathroom.t"
|
||||||
|
#include "src/item/dentalFloss.t"
|
||||||
|
|
||||||
#include "src/room/yellowRoom.t"
|
#include "src/room/yellowRoom.t"
|
||||||
#include "src/item/advertisingDisplay.t"
|
#include "src/item/advertisingDisplay.t"
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,13 @@
|
||||||
dataCable: PlugAttachable, Attachable, RoomPart
|
dataCable: PlugAttachable, Attachable, RoomPart
|
||||||
'data cable/wire/cord/jack/plug'
|
'data cable/wire/cord'
|
||||||
'data cable'
|
'data cable'
|
||||||
@redRoom
|
@redRoom
|
||||||
"Thick data cable with damaged connector."
|
"Thick data cable with damaged connector."
|
||||||
|
|
||||||
|
canAttachTo (obj) {
|
||||||
|
return !jack.isBroken && obj == dataPort;
|
||||||
|
}
|
||||||
|
|
||||||
explainCannotAttachTo(obj) {
|
explainCannotAttachTo(obj) {
|
||||||
obj != dataPort
|
obj != dataPort
|
||||||
? "This data cable can only be connected to the data port."
|
? "This data cable can only be connected to the data port."
|
||||||
|
|
@ -12,13 +16,18 @@ dataCable: PlugAttachable, Attachable, RoomPart
|
||||||
: "";
|
: "";
|
||||||
}
|
}
|
||||||
|
|
||||||
canAttachTo(obj) {
|
dobjFor (Repair) remapTo(Repair, jack)
|
||||||
return !jack.isBroken && obj == dataPort;
|
dobjFor (RepairWith) remapTo(Repair, self)
|
||||||
|
|
||||||
|
dobjFor (AttachTo) {
|
||||||
|
action () {
|
||||||
|
"Data cable pluged in.";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
+ jack: Component
|
+ jack: Component
|
||||||
'connector'
|
'connector/jack'
|
||||||
'connector'
|
'connector'
|
||||||
"<<jack.isBroken
|
"<<jack.isBroken
|
||||||
? 'Broken connector.
|
? 'Broken connector.
|
||||||
|
|
@ -27,8 +36,19 @@ dataCable: PlugAttachable, Attachable, RoomPart
|
||||||
: 'Fixed connector.
|
: 'Fixed connector.
|
||||||
<br>The broken part is held carelessly.'
|
<br>The broken part is held carelessly.'
|
||||||
>>"
|
>>"
|
||||||
|
isBroken = true
|
||||||
|
|
||||||
dobjFor (AttachTo) remapTo(AttachTo, dataCable, IndirectObject)
|
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');
|
||||||
|
}
|
||||||
|
}
|
||||||
;
|
;
|
||||||
|
|
|
||||||
9
src/item/dentalFloss.t
Normal file
9
src/item/dentalFloss.t
Normal file
|
|
@ -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."
|
||||||
|
;
|
||||||
Loading…
Add table
Add a link
Reference in a new issue