Skip to content

Instantly share code, notes, and snippets.

nikitalita /
Created January 12, 2024 10:07
Dumps the classdb from a running Godot 4.x game
extends Node
# for Godot 4.x
# There are many ways you can inject this into a project, but I've found the easiest way to do it
# is to put this into a project with a blank scene with this attached, export it as a PCK, and then copy it to the game
# directory and rename it to the name of the main game pck.
func get_method_flags(flags):
var arr = []
nikitalita /
Last active December 17, 2023 17:40
Dumps the classdb from a running Godot 3.x game
extends Node
# for Godot 3.x
func get_type(typenum):
match typenum:
return "NIL"
return "BOOL"
nikitalita / GPL-
Last active August 17, 2021 00:22
Dynamic linking a GPL program with the Discord Game SDK

(Disclaimer: IANAL, this does not constitute legal advice, seek a lawyer for more guidance if necessary)

GPL and other FOSS licenses are only concerned with distribution; indeed, restrictions on use are forbidden by free software and open source definitions, it can only enforce restrictions on distribution. So, GPL clauses come into force whenever a GPL program is distributed to other people.

The thing that's at issue here is the FSF's interpretation of copyright law when it comes to software and derivative works.

  • First, the FSF takes the position that a program that dynamic links against a library at runtime with constitutes a derivative work; you've combined a program and a library to make a new program.
  • Second, "collectivity": They take the position that when you distribute said program with said library, you are distributing a "combined" program that constitutes a derivative work, even if said combination actually happens at runtime. The argument is that when you distribute them together,
nikitalita / afterpack.js
Created September 16, 2020 10:02
electron-builder afterPack hook to fix nested node_modules bug
'use strict';
This is a hack to get around the issues with electron-builder not including nested node_modules.
We do this by simply making the asar ourselves using the parameters from the build.
This takes the asar file that we have created, unpacks it, then copies in the nested node_modules
directories from the app directory.
This also preserves any asar unpacked files that you may have had in the build, and unpacks any
nested node_modules files that might have been unpacked as well.