This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const WeatherRoller = (function(){ | |
'use strict'; | |
var version = 1.0, | |
weather = function() { | |
var roll; | |
var temperature; | |
var wind; | |
var precipitation; | |
var season; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Noise = (function(){ | |
function Grad(x, y, z) { | |
this.x = x; this.y = y; this.z = z; | |
} | |
Grad.prototype.dot2 = function(x, y) { | |
return this.x*x + this.y*y; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Calendar for Mundana | |
Created by Kirsty (https://app.roll20.net/users/1165285/kirsty) | |
and sabotaged to an extreme extent by dancodan, also cramed in some swedish here and there.. | |
Many thanks to Aaron (https://app.roll20.net/users/104025/the-aaron) for his NoteLog script, parts of which I "borrowed" | |
API Commands: | |
!cal (as Player) - Shows world, date, time, moon, weather and counted days | |
!cal (as GM) - Same as player but includes options to advance the date/time, alter the weather, add a note or view the settings menu. | |
!calSet (GM only) - Allows the GM to change the world, date, time display, show/hide days until full moon, adjust day counter or set the start date | |
Red Colour: #7E2D40 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getXYisWindy = getXYer(0.0137,9,0.0321,6); | |
const getXYhowWindy = getXYer(0.0691,9,0.0537,9); | |
so, those functions are just to get the X,Y where the answer to the question is. | |
you'll still need a function to evaluate them. something like. | |
curried functions take N arguments. for N-1 or fewer arguments, they return a | |
function that takes the remaining arguments. The classic example is add(a,b). | |
If you call add(5), it returns a function that takes one parameter and adds 5 to it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var RealRollableTable = RealRollableTable || (function() { | |
'use strict'; | |
var version = 1, | |
tables = _.groupBy(findObjs({ type: 'rollabletable' }), function(table) { return table.get('name').toLowerCase(); }), | |
commands = { | |
rt: function(args, msg) { | |
var i, items, roll, table; | |
if (args.length < 2) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on('ready',function(){ | |
"use strict"; | |
on('chat:message',function(msg){ | |
var cmd; | |
if('api' !== msg.type || !playerIsGM(msg.playerid) ){ | |
return; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"-=> TableExport v0.2.3 <=- [Tue Jan 19 2016 13:10:12 GMT+0000 (UTC)]" | |
"(0.00, 0.53) :: 0.24 [A light breeze is blowing occationaly]" | |
"(0.05, 0.51) :: 0.27 [A light breeze is blowing occationaly]" | |
"(0.10, 0.52) :: 0.29 [A light breeze is blowing occationaly]" | |
"(0.15, 0.56) :: 0.28 [A light breeze is blowing occationaly]" | |
"(0.20, 0.61) :: 0.26 [A light breeze is blowing occationaly]" | |
"(0.25, 0.62) :: 0.25 [A light breeze is blowing occationaly]" | |
"(0.30, 0.65) :: 0.23 [A light breeze is blowing occationaly]" | |
"(0.35, 0.64) :: 0.22 [A light breeze is blowing occationaly]" | |
"(0.40, 0.65) :: 0.20 [A light breeze is blowing occationaly]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Calendar for Mundana | |
Created by Kirsty (https://app.roll20.net/users/1165285/kirsty) | |
and sabotaged to an extreme extent by dancodan, also cramed in some swedish here and there.. | |
Many thanks to Aaron (https://app.roll20.net/users/104025/the-aaron) for his NoteLog script, parts of which I "borrowed" | |
API Commands: | |
!cal (as Player) - Shows world, date, time, moon, weather and counted days | |
!cal (as GM) - Same as player but includes options to advance the date/time, alter the weather, add a note or view the settings menu. | |
!calSet (GM only) - Allows the GM to change the world, date, time display, show/hide days until full moon, adjust day counter or set the start date | |
Red Colour: #7E2D40 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Ported from: https://github.com/josephg/noisejs | |
/* | |
Perlin.seed(134123); | |
let v1 = Perlin.perlin2(0.5,0.5); | |
*/ | |
/* | |
* A speed-improved perlin and simplex noise algorithms for 2D. | |
* | |
* Based on example code by Stefan Gustavson ([email protected]). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Calendar for Mundana | |
Created by Kirsty (https://app.roll20.net/users/1165285/kirsty) | |
and sabotaged to an extreme extent by dancodan, also cramed in some swedish here and there.. | |
Many thanks to Aaron (https://app.roll20.net/users/104025/the-aaron) for his NoteLog script, parts of which I "borrowed" | |
API Commands: | |
!cal (as Player) - Shows world, date, time, moon, weather and counted days | |
!cal (as GM) - Same as player but includes options to advance the date/time, alter the weather, add a note or view the settings menu. | |
!calSet (GM only) - Allows the GM to change the world, date, time display, show/hide days until full moon, adjust day counter or set the start date | |
Red Colour: #7E2D40 |
NewerOlder