This file contains 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
findPathableAround(target: RoomPosition): RoomPosition[] | |
findPathableAround(target: { pos: RoomPosition }): RoomPosition[] | |
findPathableAround(target: any, ignoreCreeps: boolean = false): RoomPosition[] { | |
var pos: RoomPosition = target.pos ? target.pos : target; | |
var room = Game.rooms[pos.roomName]; | |
var pathableTiles: RoomPosition[] = []; | |
var area = room.lookAtArea(pos.y - 1, pos.x - 1, pos.y + 1, pos.x + 1); | |
for (var x in area) { | |
for (var y in area[x]) { | |
var results: LookAtResult[] = y; |
This file contains 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
saveRoomPos(target) { | |
var pos = target.pos ? target.pos : target | |
if (!Memory.positions) Memory.positions = []; | |
Memory.positions.push({x: pos.x, y: pos.y, roomName: pos.roomName}); | |
} | |
isInMemory(target) { | |
if (!Memory.positions) return false; | |
return _.find(Memory.positions, function(pos) new RoomPosition(pos.x, pos.y, pos.roomName).isEqualTo(target)) != null; | |
} |
This file contains 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 gulp = require('gulp'); | |
var ts = require('gulp-typescript'); | |
var https = require('https'); | |
var fs = require('fs'); | |
var secrets = require('./secrets.js') | |
gulp.task('compile', function () { | |
var tsResult = gulp.src(['src/**/*.ts', 'typings/**/*.d.ts']) | |
.pipe(ts({ | |
noImplicitAny: true, |
This file contains 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 Quagga.DbDomain | |
namespace Quagga.POS | |
{ | |
class TransactionViewModel: INotifyPropertyChanged | |
{ | |
private IDbItemCommands _dbItems; | |
private IDbTransactionCommands _dbTrans; | |
public TransactionViewModel(IDbItemCommands dbItems, IDbTransactionCommands dbTrans) | |
{ |
This file contains 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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.IO; | |
using System.Xml.Linq; | |
namespace SystemCheckerPlus | |
{ | |
class XMLService | |
{ |
This file contains 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
/*QuizBuilder create_database query | |
By: Cameron VanHouzen | |
Date: 1/29/14 | |
The MIT License (MIT) | |
Copyright (c) <2014> <Cameron VanHouzen> | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights |