Skip to content

Instantly share code, notes, and snippets.

View tjone270's full-sized avatar

Thomas Jones tjone270

View GitHub Profile
@tjone270
tjone270 / function.cs
Created September 22, 2019 22:44
Get all WinForms controls on a form.
private IEnumerable<Control> GetAllControls(Control.ControlCollection controls) {
List<Control> all_controls = new List<Control>();
foreach (Control control in controls) {
if (control.GetType() == typeof(GroupBox)) {
all_controls.AddRange(GetAllControls(control.Controls));
}
all_controls.Add(control);
}
return all_controls;
}
@tjone270
tjone270 / gist:055525ad646bd2ca416b91072f213cbd
Created September 21, 2017 08:38
Quake Live spawn_item() IDs
0 = Game Crashes (when you attempt to pick it up)
1 = Armor Shard
2 = Yellow Armor
3 = Red Armor
4 = Green Armor
5 = 5 Health
6 = 25 Health
7 = 50 Health
@tjone270
tjone270 / mappool.txt
Created July 27, 2017 02:39
Mappool parser
Ra3Map1C | pqlca
Ra3Map2A | pqlca
Ra3Map2C | pqlca
Ra3Map3A | pqlca
Ra3Map3B | pqlca
Ra3Map3C | pqlca
Ra3Map4 | pqlca
Ra3Map4B | pqlca
Ra3Map5A | pqlca
Ra3Map5B | pqlca
import minqlx
class tooltips(minqlx.Plugin):
def __init__(self):
self.add_command("discord", self.cmd_discord)
def cmd_discord(self, player, msg, channel):
channel.reply("Our discord server is available at example.com!")
@tjone270
tjone270 / Item List 0,60
Created July 5, 2017 14:52
bg_itemlist
0 = Game Crashes
1 = Armor Shard
2 = Yellow Armor
3 = Red Armor
4 = Green Armor
5 = 5 Health
6 = 25 Health
7 = 50 Health

Keybase proof

I hereby claim:

  • I am tjone270 on github.
  • I am tjone270 (https://keybase.io/tjone270) on keybase.
  • I have a public key whose fingerprint is 6130 E24C 53D4 E234 453E 7F50 4619 B616 0EC2 BC6C

To claim this, I am signing this object:

@tjone270
tjone270 / workshop.txt
Created February 3, 2016 18:21
overflowing workshop.txt,
# Please only load maps here, other items will most likely cause issues.
# Get these numbers from the ?id= ending of the workshop URL.
# Quake Live Extras Pack
539421606
# Quake Live Holiday Pack
539421982
# Quake III Arena: Sound Pack (by Thomas Jones for testing purposes)
@tjone270
tjone270 / snippet
Created February 3, 2016 07:35
how to tell which team scored last
self.team_gametypes = ["tdm", "ca", "ctf", "1f", "har", "ft", "dom", "ad", "rr"]
self.free_gametypes = ["ffa", "duel", "race"]
self.stored_score_red = 0
self.stored_score_blue = 0
def handle_round_end(self, *args, **kwargs):
if self.game.type_short in self.team_gametypes:
if self.game.red_score != self.stored_score_red:
self.stored_score_red = self.game.red_score
@tjone270
tjone270 / workshop.txt
Created December 16, 2015 18:51
The Purgery - workshop.txt
# TomTec Solutions' loaded workshop maps. Please only load maps here, other items will most likely cause issues.
# Get these numbers from the ?id= ending of the workshop URL.
# Quake Live Extras Pack
539421606
# Quake Live Holiday Pack
539421982
# Quake III Arena: Sound Pack (by Thomas Jones for testing purposes)
@tjone270
tjone270 / rysiu_sounds.py
Last active December 14, 2015 18:10
rysiu_sounds.py, a minqlx plugin for RysiuWroc of RysiuBot servers in Poland.
# get access to the minqlx code base so we can access the server and game
import minqlx
# import the randint function from the random class, so we can make random numbers
from random import randint
class rysiu_sounds(minqlx.Plugin):
def __init__(self):
# Adding hooks, so everytime the map changes or the round ends, the code runs :)
self.add_hook("map", self.reference_soundpack)