Collection of small snippets for potentially useful things in DragonRuby
Intended to be copy/pasted.
| class Text | |
| def initialize label_hash | |
| @l = label_hash.dup | |
| if !@l.key?(:vertical_alignment_enum) | |
| @l.vertical_alignment_enum = 0 | |
| end | |
| if !@l.key?(:blendmode_enum) | |
| @l.blendmode_enum = 0 | |
| end | |
| if !@l.key?(:font) |
| $debug = false | |
| $current_palette = 0 | |
| $palettes = [ | |
| [[0.5,0.5,0.5],[0.5,0.5,0.5],[1.0,1.0,1.0],[0,0.3333,0.6666]], | |
| [[0.5,0.5,0.5],[0.666,0.666,0.666],[1.0,1.0,1.0],[0,0.3333,0.6666]], | |
| [[0.5,0.5,0.5],[0.75,0.75,0.75],[1.0,1.0,1.0],[0,0.3333,0.6666]], | |
| [[0.5,0.5,0.5],[1,1,1],[1.0,1.0,1.0],[0,0.3333,0.6666]], | |
| [[1,0.5,0.5],[0.5,0.5,0.5],[0.75,1.0,0.6666],[0.8,1.0,0.3333]], | |
| [[0.5,0.5,0.5],[0.5,0.5,0.5],[0.8,0.8,0.5],[0,0.2,0.5]], |
| require "xenobrain/ruby_vectormath/vectormath_2d.rb" | |
| $sub_steps = 2 | |
| $all_objects = [] | |
| $frame_elapsed_time = 0.0 | |
| $gravity = Vec2.new(0.0, -1000.0) | |
| $size = 20.0 | |
| $spawn_timer = 0 | |
| $spawn_rate = 2 |
| // To get to your user keybindings, you can use CTRL+Shift+P then search for: | |
| // "Preferences: Open Keyboard Shortcuts (JSON)" | |
| // this should open up this empty json file. | |
| [ | |
| { | |
| "key": "alt+r", | |
| "args": "rundr", | |
| "command": "workbench.action.tasks.runTask", | |
| }, | |
| { |
| def tick args | |
| if args.tick_count == 0 | |
| init_state args | |
| $noise = Noise.new(2000, 4) | |
| end | |
| visible_tiles = get_visible_tiles(args, args.state.zoom_level, args.state.x, args.state.y) | |
| args.outputs.sprites << visible_tiles |
| $deck = [] | |
| $game = {} | |
| $card_width = 100 | |
| $card_height = 145 | |
| $space_between_cards = 156 | |
| $waste_and_foundation_y = 560 | |
| $waste_x_stagger = 3 | |
| $waste_number_of_cards = 30 |
| def tick args | |
| front_buffer, back_buffer = prepare_buffers args | |
| tc = args.state.tick_count | |
| w = 1280 | |
| h = 720 | |
| yoffset = (w - h) / 2 | |
| args.outputs[back_buffer].lines << [ | |
| { |
I hereby claim:
To claim this, I am signing this object:
| [2012-08-01 14:42:13,257][INFO ][node ] [isolatednode] {0.20.0.Beta1-SNAPSHOT}[3236]: initializing ... | |
| [2012-08-01 14:42:13,262][INFO ][plugins ] [isolatednode] loaded [], sites [] | |
| [2012-08-01 14:42:14,205][DEBUG][discovery.zen.ping.multicast] [isolatednode] using group [224.2.2.4], with port [54328], ttl [3], and address [null] | |
| [2012-08-01 14:42:14,207][DEBUG][discovery.zen.ping.unicast] [isolatednode] using initial hosts [], with concurrent_connects [10] | |
| [2012-08-01 14:42:14,208][DEBUG][discovery.zen ] [isolatednode] using ping.timeout [3s], master_election.filter_client [true], master_election.filter_data [false] | |
| [2012-08-01 14:42:14,212][DEBUG][discovery.zen.elect ] [isolatednode] using minimum_master_nodes [2] | |
| [2012-08-01 14:42:14,213][DEBUG][discovery.zen.fd ] [isolatednode] [master] uses ping_interval [1s], ping_timeout [3s], ping_retries [2] | |
| [2012-08-01 14:42:14,215][DEBUG][discovery.zen.fd ] [isolatednode] [node ] uses ping_interva |