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
from math import factorial | |
from sympy.utilities.iterables import multiset_permutations | |
print("Searching...") | |
# Numerically balanced dice | |
# To calculate: | |
# 1. Find the average value of a face | |
# 2. Multiply that average by the number of faces touching a vert. | |
# The result is the value each vert should have. |
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
Number | Name | |
---|---|---|
1 | Bulbasaur | |
2 | Ivysaur | |
3 | Venusaur | |
4 | Charmander | |
5 | Charmeleon | |
6 | Charizard | |
7 | Squirtle | |
8 | Wartortle | |
9 | Blastoise |
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.Linq.Expressions; | |
using System.Text; | |
namespace MonsterVial.Extensions | |
{ | |
public static class EnumExt | |
{ |
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.Runtime.CompilerServices; | |
using Godot.Collections; | |
using Array = Godot.Collections.Array; | |
/* Example Usage: | |
// Declare a class with the attribute | |
[CSharpScript] | |
public class CustomResource : Resource { ... } |
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
tool | |
class_name ResRef extends Reference | |
#### | |
# Settable in the editor. Hit reset to get a new obj. Tries to never be null. | |
# Cannot be changed once in-game if `p_set_once` is true. | |
#### | |
#### EXAMPLE USAGE #### | |
#var __backer := ResRef.new(MyResource) | |
#export var my_res :Resource setget set_my_res, get_my_res |
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
tool class_name help_obj | |
# Like the default connect, but doesn't push error if already connected | |
static func try_connect( source: Object, sig: String, target: Object, method: String, binds := [], flags := 0 ) -> SignalResult: | |
if not source.has_signal(sig): | |
return SignalResult.new( ERR_INVALID_PARAMETER, str("Can't connect: Signal '", sig, "' missing from object.") ) | |
if not(flags & Object.CONNECT_REFERENCE_COUNTED) and source.is_connected(sig, target, method): | |
return SignalResult.new( ERR_INVALID_PARAMETER, str("Can't connect: Target already connected to signal '", sig, "'.") ) | |
return SignalResult.new( source.connect(sig, target, method, binds, flags), "" ) | |
# Like the default disconnect, but doesn't push error if not connected |
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
tool | |
class_name ShapePolygon2D extends Polygon2D | |
func _get_configuration_warning() -> String: | |
if shape == null: | |
return "Shape resource is null" | |
if shape is ConvexPolygonShape2D and len(shape.points) <= 1: | |
return "ConvexPolygonShape2D has too few points to draw" | |
if shape is ConcavePolygonShape2D: |
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
---------------------------------------------------------------------- | |
-- Author: Cory Beutler | |
-- License: MIT (So you can't sue me... Otherwise go wild!) | |
-- | |
-- Exports the current file using layer name prefixes to be smart. | |
-- The png and json files are always exported with all their data. | |
-- Texture png files will be auto-named <filename>.png | |
-- Json files will be auto-named <filename>.asejson | |
-- Layer name prefixes it recognizes: | |
-- _ Hide from all exports. Useful for guide and reference layers. |
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.Linq; | |
using Godot; | |
using Godot.Collections; | |
namespace Vial.Export { | |
[System.AttributeUsage(System.AttributeTargets.Property, Inherited = false, AllowMultiple = true)] | |
public sealed class ExportAsAttribute : System.Attribute { |
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
# Singleton Time | |
extends Node | |
## | |
# Set this class as a singleton in Godot named Time or similar. | |
# Setting it near the top will ensure it is processed before | |
# everything else, giving you consistent values for all nodes | |
# that use this class. | |
# this class has a global process and physics process count | |
# that is very useful when doing things less often. | |
# A wrapper has provided to make that even quicker: |
NewerOlder