Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- OWOP.tool.addToolObject(new OWOP.tool.class('(TF)Dithering', OWOP.cursors.erase, OWOP.fx.player.RECT_SELECT_ALIGNED(2), false, function(tool) {
- tool.setEvent('mousemove mousedown', function(mouse, event) {
- var color = mouse.buttons == 1 ? OWOP.player.selectedColor : [255, 255, 255];
- function setChunk() {
- chunkx = Math.floor(mouse.tileX / 2) * 2
- chunky = Math.floor(mouse.tileY / 2) * 2
- for (var x = 0; x < 2; x++) {
- for (var y = 0; y < 2; y++) {
- OWOP.world.setPixel(chunkx + x + x, chunky + y + y, color)
- OWOP.world.setPixel(chunkx + x + y , chunky + y + x , color)
- }
- }
- }
- switch (mouse.buttons) {
- case 1:
- setChunk()
- break;
- case 2:
- setChunk()
- break;
- }
- });
- }));
- //took me a bit to figure out F, but its good now
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement