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