Skip to content

Instantly share code, notes, and snippets.

View hakusaro's full-sized avatar

Lucas Nicodemus hakusaro

View GitHub Profile
@hakusaro
hakusaro / NewAccountInfo.cs
Created October 10, 2022 08:40
EasyCommands AccountInfo vs Classic AccountInfo
/*
TShock, a server mod for Terraria
Copyright (C) 2011-2019 Pryaxis & TShock Contributors
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@hakusaro
hakusaro / EasyCommandsExample.cs
Last active October 10, 2022 08:41
EasyCommands vs OldCommands alternatives
/*
TShock, a server mod for Terraria
Copyright (C) 2011-2019 Pryaxis & TShock Contributors
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,

Connect Request [1]

Client -> Server

Size Description Type Notes
? Version String "Terraria" + Main.curRelease

Disconnect [2]

Server -> Client

Size Description Type Notes
@hakusaro
hakusaro / with_tshock.log
Created May 11, 2020 05:06
g checkout 1e34cc0c9a2aed52fe2cb8f9d3a7164f72ca46ef
# TShock
# Open chest
5/10/2020 10:00:41 PM: [Recv] 31 (ChestGetContents) from: 0 (squib)
5/10/2020 10:00:41 PM: [Send] 32 (ChestItem) ign: -1 (-) | rem: 0 (squib)
5/10/2020 10:00:41 PM: [Send] 32 (ChestItem) ign: -1 (-) | rem: 0 (squib)
5/10/2020 10:00:41 PM: [Send] 32 (ChestItem) ign: -1 (-) | rem: 0 (squib)
5/10/2020 10:00:41 PM: [Send] 32 (ChestItem) ign: -1 (-) | rem: 0 (squib)
5/10/2020 10:00:41 PM: [Send] 32 (ChestItem) ign: -1 (-) | rem: 0 (squib)
5/10/2020 10:00:41 PM: [Send] 32 (ChestItem) ign: -1 (-) | rem: 0 (squib)
@hakusaro
hakusaro / wtf.java
Created May 12, 2018 02:32
This is the worst data structure ever
package uwyo.cs.acm2013.dao.model;
import java.util.HashMap;
import java.util.Map;
// import com.fasterxml.jackson.annotation.JsonAutoDetect;
// @JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY)
public class Compliance {
public static final String TIER1 = "tier1";

Keybase proof

I hereby claim:

  • I am hakusaro on github.
  • I am xn (https://keybase.io/xn) on keybase.
  • I have a public key whose fingerprint is DBBC 74A2 4E03 47B3 0602 B456 83A5 8D80 0459 0319

To claim this, I am signing this object:

The Canonical Guide

Welcome to the canonical guide for the question you just asked. If you have been referred here, you have asked a question that falls into one of the following categories:

  • We've heard this question so many times, it hurts our heads.
  • This question itself proves you may not want to use TShock in its current form.
  • We've answered this question so many times, it gives us headaches.

TShock for Terraria is software made by volunteers across the globe. We have developers in America, China, Portugal, Australia, Malaysia, and the United Kingdom. None of us are paid for this development effort, and the donations we take accrue a year over year loss (we pay more for our hosting services and software for development than we take in via donations).

There are many good places to buy Chipotle burritos1.

Footnotes

  1. Just not in Wyoming.

@hakusaro
hakusaro / csv_to_readmeio.rb
Created November 3, 2015 08:15
This parses CSVs for inserting into raw data blocks on Readme.io. Don't have commas in your values or it will break. Alternatively, change the root separator to something like a semicolon.
require 'json'
if ARGV[0] == nil
abort "You moron, you forgot to give us a CSV."
end
data = {}
file = File.new(ARGV[0])
This file has been truncated, but you can view the full file.
using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
using Terraria.GameContent;
using Terraria.GameContent.Achievements;
using Terraria.Graphics.Shaders;
using Terraria.ID;
namespace Terraria
{
public class Projectile : Entity