mirror of
https://gitlab.com/Oreolek/salet.git
synced 2024-07-04 07:45:03 +03:00
Random IDs mess up the saves. IDs have to be predictable.
This commit is contained in:
parent
ba3fbf6bcd
commit
10314558af
|
@ -1,5 +1,4 @@
|
||||||
room = require("../room.coffee")
|
room = require("../room.coffee")
|
||||||
randomid = require("./randomid.coffee")
|
|
||||||
###
|
###
|
||||||
A dialogue shortcut.
|
A dialogue shortcut.
|
||||||
Usage:
|
Usage:
|
||||||
|
@ -9,7 +8,7 @@ Usage:
|
||||||
""", "character.sandbox.mild = true"
|
""", "character.sandbox.mild = true"
|
||||||
###
|
###
|
||||||
dialogue = (title, salet, startTag, endTag, text, effect) ->
|
dialogue = (title, salet, startTag, endTag, text, effect) ->
|
||||||
retval = room(randomid(), salet, {
|
retval = room("dialogue_"+salet.rooms.length, salet, {
|
||||||
optionText: title
|
optionText: title
|
||||||
dsc: text
|
dsc: text
|
||||||
clear: false # backlog is useful in dialogues
|
clear: false # backlog is useful in dialogues
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
room = require("../room.coffee")
|
room = require("../room.coffee")
|
||||||
randomid = require("./randomid.coffee")
|
|
||||||
###
|
###
|
||||||
A phrase shortcut.
|
A phrase shortcut.
|
||||||
Usage:
|
Usage:
|
||||||
|
@ -15,7 +14,7 @@ Usage:
|
||||||
@param string effect an optional parameter, eval'd code
|
@param string effect an optional parameter, eval'd code
|
||||||
###
|
###
|
||||||
phrase = (title, salet, tag, text, effect) ->
|
phrase = (title, salet, tag, text, effect) ->
|
||||||
retval = room(randomid(), salet, {
|
retval = room("phrase_"+salet.rooms.length, salet, {
|
||||||
optionText: title
|
optionText: title
|
||||||
dsc: text
|
dsc: text
|
||||||
clear: false # backlog is useful in dialogues
|
clear: false # backlog is useful in dialogues
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
module.exports = () ->
|
|
||||||
alphabet = "abcdefghijklmnopqrstuvwxyz0123456789" # see the dreaded linkRe expression in Undum
|
|
||||||
rndstr = []
|
|
||||||
for i in [1..10]
|
|
||||||
rndstr.push alphabet.charAt(Math.floor(Math.random() * alphabet.length))
|
|
||||||
return rndstr.join('').toString()
|
|
Loading…
Reference in a new issue