mirror of
https://gitlab.com/Oreolek/salet-module.git
synced 2024-07-01 06:15:04 +03:00
Follow-up: @display as a function
This commit is contained in:
parent
eda7aabdf1
commit
8131138254
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "salet",
|
||||
"version": "1.7.6",
|
||||
"version": "1.7.7",
|
||||
"description": "A general client-side framework for cybertext interactive fiction games.",
|
||||
"keywords": ["ifiction", "interactive fiction", "games", "coffee-script", "text", "menu"],
|
||||
"homepage": "https://salet.su",
|
||||
|
|
|
@ -21,7 +21,7 @@ class Character
|
|||
@listinv = (thing) =>
|
||||
for i in @inventory
|
||||
if i.name == thing
|
||||
return invlink(i.display, i.name)
|
||||
return invlink(i.display.fcall(i), i.name)
|
||||
|
||||
@inv = (thing) =>
|
||||
for i in @inventory
|
||||
|
|
|
@ -15,10 +15,10 @@ class SaletUnit
|
|||
return parsedsc(text, @name)
|
||||
@takeable = false
|
||||
@display = ""
|
||||
@take = () => "You take the #{@display}." # taking to inventory
|
||||
@act = () => "You don't find anything extraordinary about the #{@display}." # unit action
|
||||
@dsc = () => "You see a {{#{@display}}} here." # unit description
|
||||
@inv = () => "It's a #{@display}." # inventory description
|
||||
@take = () => "You take the #{@display.fcall(@)}." # taking to inventory
|
||||
@act = () => "You don't find anything extraordinary about the #{@display.fcall(@)}." # unit action
|
||||
@dsc = () => "You see a {{#{@display.fcall(@)}}} here." # unit description
|
||||
@inv = () => "It's a #{@display.fcall(@)}." # inventory description
|
||||
@location = ""
|
||||
@put = (location) =>
|
||||
if salet.rooms[location]?
|
||||
|
|
Loading…
Reference in a new issue