Skip to content

Instantly share code, notes, and snippets.

View ClobberXD's full-sized avatar
ℹ️
Unavailable... forever

ANAND ClobberXD

ℹ️
Unavailable... forever
  • India
View GitHub Profile
@ClobberXD
ClobberXD / README.md
Created June 11, 2020 14:48
PR creator script for Minetest CTF maps

This script allows you to very easily create PRs for MT-CTF/maps.

Before first run

There are a couple of hard-coded variables in the script, which need to be set before the first run. I didn't bother to make these configurable via command-line args because these variables usually need to be set only once.

  • MAPSREPO (L7): This should contain the path to the local maps repository. This needs to be an absolute path. e.g. /home/test_user/new_super_duper_awesome_map_that_will_get_rejected_immediately/
  • USERNAME (L8): This should contain your GitHub username. You'll need to authenticate, as the PR will be made in your name.

Also, don't forget to mark the script as executable.

@ClobberXD
ClobberXD / Entity.h
Created August 7, 2019 05:23
Quick, dirty alternative to RTTI
enum EntityType { EntityType_Entity = 0, EntityType_Player, EntityType_Enemy };
class Entity
{
public:
Entity() : type(EntityType_Entity) {}
// This would generally be private, with a public getter
EntityType type;
};
@ClobberXD
ClobberXD / irc.md
Last active July 9, 2018 08:31 — forked from xero/irc.md
irc cheat sheet

IRC Reference

Not intended as a guide for newbies, more like a "cheat sheet" for the somewhat experienced IRC user, especially one who wields some power over a channel.

The Basics

  • /join #channel
    • Joins the specified channel.
  • /part #channel
  • Leaves the specified channel.
local pos1 = ...
local pos2 = ...
local lvm = VoxelManip(lvm_p1, lvm_p2) -- or minetest.get_voxel_manip(pos1, pos2)
lvm:write_to_map(true)
core.register_chatcommand("hasprivs", {
params = "<priv>",
description = "Returns a list of all online players with the priv passed as param. e.g. /hasprivs fly",
privs = {server = true},
func = function(caller, param)
param = param:trim()
if param == "" then
return false, "Invalid parameters (see /help hasprivs)"
end
local param_privs = core.string_to_privs(param)
@ClobberXD
ClobberXD / debug.txt
Last active April 11, 2018 07:11
debug.txt (latest run only) for debugging aluminium
2018-04-11 07:18:41: INFO[Main]: Selected world: Aluminum [C:\Minetest\bin\..\worlds\Aluminum]
2018-04-11 07:18:41: INFO[Main]: SourceImageCache::getOrLoad(): Loading path "C:\Minetest\bin\..\textures\base\pack\progress_bar.png"
2018-04-11 07:18:41: INFO[Main]: SourceImageCache::getOrLoad(): Loading path "C:\Minetest\bin\..\textures\base\pack\progress_bar_bg.png"
2018-04-11 07:18:41: INFO[Main]: Attempting to use OpenAL audio
2018-04-11 07:18:41: INFO[Main]: Audio: Initializing...
2018-04-11 07:18:41: INFO[Main]: Audio: Initialized: OpenAL 1.1 ALSOFT 1.15.1, using OpenAL Soft
2018-04-11 07:18:41: INFO[Main]: Server created for gameid "minetest" in simple singleplayer mode
2018-04-11 07:18:41: INFO[Main]: - world: C:\Minetest\bin\..\worlds\Aluminum
2018-04-11 07:18:41: INFO[Main]: - game: C:\Minetest\bin\..\games\minetest_game
2018-04-11 07:18:41: INFO[Main]: Initializing world at C:\Minetest\bin\..\worlds\Aluminum