mirror of
https://github.com/He4eT/yet-another-experiment.git
synced 2026-05-05 00:57:22 +00:00
dataCable: pluggable connector
This commit is contained in:
parent
d3c0863de5
commit
8cfa2cf198
4 changed files with 38 additions and 5 deletions
|
|
@ -1,6 +1,6 @@
|
|||
me: Actor
|
||||
'me/self'
|
||||
location = orangeRoom
|
||||
location = redRoom
|
||||
posture = lying
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,3 +16,9 @@ surgeryAssistant: Person
|
|||
<br>You can see the message <q>Connection lost</q> on the indicator display."
|
||||
isInitState = true
|
||||
;
|
||||
|
||||
dataPort: PlugAttachable, Attachable, Fixture
|
||||
'data port/outlet/socket'
|
||||
'data port'
|
||||
@redRoom
|
||||
;
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
"<<jack.isBroken
|
||||
? 'Broken connector.
|
||||
<br>One of the components of its body should be
|
||||
fixed with glue, duct tape or something similar.'
|
||||
: 'Fixed connector.
|
||||
<br>The broken part is held carelessly.'
|
||||
>>"
|
||||
|
||||
dobjFor (AttachTo) remapTo(AttachTo, dataCable, IndirectObject)
|
||||
|
||||
isBroken = true;
|
||||
;
|
||||
|
|
|
|||
|
|
@ -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 () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue