upgrade to coffeescript 1.0.1
This commit is contained in:
parent
b061686e64
commit
8874a8e12a
|
@ -163,7 +163,8 @@ class Gst
|
|||
@ClearMenu(true)
|
||||
jMenu = $("<div class='iffy-menu'/>").hide()
|
||||
for verb in rgverb
|
||||
jMenuItem = $("<a href='javascript:void(0)'>#{verb.stDisplay}</a><br/>").click(() => verb.dgActivate(); @Display())
|
||||
dgClick = ((verbT) => () => verbT.dgActivate(); @Display())(verb)
|
||||
jMenuItem = $("<a href='javascript:void(0)'>#{verb.stDisplay}</a><br/>").click(dgClick)
|
||||
jMenu.append(jMenuItem)
|
||||
|
||||
jMenu.css({
|
||||
|
@ -227,6 +228,8 @@ class Gst
|
|||
stHtml = stHtml + "<p class='error'>[[error interpreting markup: #{error}]]</p>"
|
||||
stHtml
|
||||
|
||||
bind = (fn, me) -> ((args...) -> fn.apply(me, args))# argh new coffeescript won't let me use __bind :(
|
||||
|
||||
# narrative event -- the story is told as a sequence of these. Contains the HTML to display when the
|
||||
# narrative event happens, the preconditions to make sure the event should be allowed to occur, and
|
||||
# the resultant effect on the state of the model of the world
|
||||
|
@ -370,7 +373,7 @@ class Word
|
|||
nev = new Nev(dVerb)
|
||||
if not nev.FHasRun(wst) and not @gst.story.actorPlayer.FWillAttempt(wst, nev)
|
||||
stDisplay = $(dVerb).attr("display") or $(dVerb).attr("name")
|
||||
dgActivate = () => @gst.story.actorPlayer.RespondTo(wst.nev, new Nev(dVerb))
|
||||
dgActivate = ((dVerbT) => () => @gst.story.actorPlayer.RespondTo(wst.nev, new Nev(dVerbT)))(dVerb)
|
||||
rgverb.push(new Verb(stDisplay, dgActivate))
|
||||
rgverb
|
||||
|
||||
|
|
Loading…
Reference in a new issue