A spritestack model is a ZIP file with two obligatory entries:
{
"fileType": "SpriteStackModelProject",
"title": "Whatever"
}
# as of godot 4.1 | |
_static_init | |
_init | |
_notification 20 Node.NOTIFICATION_SCENE_INSTANTIATED # only on instantiated scene roots | |
_notification 18 Node.NOTIFICATION_PARENTED | |
_enter_tree | |
tree_entered signal | |
_notification 27 Node.NOTIFICATION_POST_ENTER_TREE | |
_ready | |
ready signal |
// Copyright (c) 2023 Tomasz Stachowiak | |
// | |
// This contribution is dual licensed under EITHER OF | |
// | |
// Apache License, Version 2.0, (http://www.apache.org/licenses/LICENSE-2.0) | |
// MIT license (http://opensource.org/licenses/MIT) | |
// | |
// at your option. | |
#include "/inc/frame_constants.hlsl" |
extends KinematicBody2D | |
const ACC_INSTANT = 1000000 # If acceleration time is 0, default to this | |
# Exposed movement parameters | |
export var move_speed : float | |
export var acceleration_time : float # How many seconds does it take to go from 0 to max speed? | |
export var air_acceleration_time : float # How many seconds does it take to go from 0 to max speed, when we're midair? | |
export var friction_time : float # How many seconds does it take to go from max speed to 0? | |
export var jump_height : float # How many pixels vertically should we jump |
# MIT licenced. Feel free to use in your project. | |
# Use recursion to move along path. We move along path, and if there's any | |
# distance remaining, we call this function again and move further along until | |
# we reach our destination or there's no distance left to travel | |
func move_along_path(distance : float) -> void: | |
# Ensure we have an actual path, otherwise we are done and can stop | |
# processing | |
if path.size() == 0: | |
set_process(false) | |
return |
# Renew Let's Encrypt Certificates | |
/usr/syno/sbin/syno-letsencrypt renew-all | |
# Disable Firewall | |
/usr/syno/bin/synofirewall --disable |
import pygame as pg | |
import math | |
from pygame.locals import * | |
""" | |
thick_aaline(surface, color, point0, point1, width) | |
draw a anti-aliased line from point1 to point2 with given width | |
The algorithms computes the corners (a, b, c, and d) | |
that form the borders of the thick line and then draws a filled |
func grid_to_world(position): | |
# (0,8) is the offset to the middle of the tile | |
return map_to_world(position) + Vector2(0, 8) | |
func world_to_grid(position): | |
return world_to_map(position) | |
func get_tile_cost(pos): | |
# placeholder | |
return 1.0 |
#! /usr/bin/env python3 | |
"""Fixing bluetooth stereo headphone/headset problem in debian distros. | |
Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197 | |
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone. | |
This will be only fixes the bluez5 problem mentioned above . | |
Licence: Freeware |
#!/usr/bin/expect -f | |
set prompt "#" | |
set address [lindex $argv 0] | |
spawn sudo bluetoothctl -a | |
expect -re $prompt | |
send "remove $address\r" | |
sleep 1 | |
expect -re $prompt |