- The
object
table accessible from object scripts has been renamed toentity
for consistency - Object scripts receive an argument in
init
which is true when the object is being previewed and false when it is placed in the world - Wire objects can now use
getInboundNodeIds(nodeIndex)
andgetOutboundNodeIds(nodeIndex)
to get a table of entityIds for all objects connected to the specified wire node - Object scripts can now define a function
die()
to be called when the object is broken or destroyed - Added an
entityProxy
wrapper function to make more entity functions available (details here: https://www.irccloud.com/pastebin/ZQBDj4ou) - Added
entity.setDropPool
for monsters to allow changing theirdropPool
parameter from scripts, which can also be set tonil
to disable drops - Added
world.damageTiles
andworld.placeMaterial
for tile manipulation
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
#!/usr/bin/env perl | |
use feature 'switch'; | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
use File::Basename; | |
use File::Copy; | |
use File::Path qw/make_path/; |
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
using UnityEngine; | |
using System.Collections; | |
public class AnimationScript : MonoBehaviour { | |
public GameObject miku = null; | |
private Animation mikuAnime; | |
// Use this for initialization | |
void Start () { |
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
#!/usr/bin/env python | |
import socket | |
from datetime import datetime | |
import csv | |
import sys | |
import pickle | |
import struct | |
import threading | |
import urllib2 |
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
/*! | |
* jQuery JavaScript Library v2.1.1pre | |
* http://jquery.com/ | |
* | |
* Includes Sizzle.js | |
* http://sizzlejs.com/ | |
* | |
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors | |
* Released under the MIT license | |
* http://jquery.org/license |
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
# Created by https://www.gitignore.io/api/vim,ruby | |
### Vim ### | |
[._]*.s[a-w][a-z] | |
[._]s[a-w][a-z] | |
*.un~ | |
Session.vim | |
.netrwhist | |
*~ |
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
function isotonic_regression(y::Vector{Float64}, weights::Vector{Float64}) | |
@inbounds begin | |
n = size(y, 1) | |
if n <= 1 | |
return y | |
end | |
n -= 1 | |
while true | |
i = 1 | |
pooled = 0 |
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
#include <memory> | |
#include <random> | |
#include <chrono> | |
#include <algorithm> | |
#include <iostream> | |
#include <gflags/gflags.h> | |
#include <boost/chrono/chrono.hpp> | |
#include <boost/chrono/duration.hpp> | |
#include <boost/chrono/process_cpu_clocks.hpp> |
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 emolist=[ | |
{"chars" : " :) ", "class" : "emoticon_smile", "name" : "Smiley"}, | |
{"chars" : " :( ", "class" : "emoticon_frown", "name" : "Frown"}, | |
{"chars" : " :P ", "class" : "emoticon_tongue", "name" : "Tongue"}, | |
{"chars" : " :D ", "class" : "emoticon_grin", "name" : "Grin"}, | |
{"chars" : " :o ", "class" : "emoticon_gasp", "name" : "Gasp"}, | |
{"chars" : " ;) ", "class" : "emoticon_wink", "name" : "Wink"}, | |
{"chars" : " :v ", "class" : "emoticon_pacman", "name" : "Pacman"}, | |
{"chars" : " >:( ", "class" : "emoticon_grumpy", "name" : "Gruñón"}, | |
{"chars" : " :/ ", "class" : "emoticon_unsure", "name" : "Unsure"}, |
- New function
world.tileIsOccupied(tile, tileLayer, includeEphemeral)
tile
(vec2) the position to checktileLayer
(boolean, optional, default=true) the tile layer to check (true
for foreground,false
for background)includeEphemeral
(boolean, optional, default=false) include held but unplaced objects such as a player's object placement preview- returns true when the specified tile position contains a material or a placed object
- New function
world.farmableStage(entityId)
returns the current growth stage of the specified farmable object as an integer, or nil if the object is not a valid farmable - Added
entity.applyMovementParameters
andentity.applyMovementModifiers
to monster context, with functionality similar to thetech
functions of the same name - Objects will now retain their
storage
table when broken into items - Container objects can now specify a hook to be called when the inventory is changed (by players or scripts).