Some of the remaining methods may fit well in the Godot
class.
GDScript | C# |
---|
import zlib | |
from bwriter import BinaryWriter | |
class Compressor: | |
header_version = 108311 | |
header_len = 48 | |
header = [ |
# The MIT License (MIT) | |
# | |
# Copyright (c) 2015 Ignacio Roldán Etcheverry | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
:: git remote add neikeq https://github.com/neikeq/KicksEmu.git | |
:: Create a branch for our local changes if it does not exists | |
git checkout -b private-changes | |
:: Fetch the updates from neikeq | |
git fetch neikeq | |
:: Commit all the changes from private-changes branch and merge updates | |
git checkout private-changes |
-- check days-based expiration items where the days left to expire is greater than the expiration-type limit | |
select * from items where expiration = 9201007 and timestampdiff(day, current_timestamp, timestamp_expire) > 7; | |
select * from items where expiration = 9201030 and timestampdiff(day, current_timestamp, timestamp_expire) > 30; | |
-- check usage items with more usages left than its limit | |
select * from items where expiration = 9101010 and usages > 10; | |
select * from items where expiration = 9101050 and usages > 50; | |
select * from items where expiration = 9101100 and usages > 100; | |
-- check if there is a default-cloth item |
DROP PROCEDURE IF EXISTS delete_duplicates; | |
delimiter | | |
CREATE PROCEDURE delete_duplicates() | |
BEGIN | |
DECLARE done INT; | |
DECLARE playerid INT; | |
DECLARE inventoryid INT; | |
DECLARE countnum INT; |
from __future__ import print_function | |
import mysql.connector | |
from mysql.connector import errorcode | |
level_offset = 1 | |
config = { | |
'user': 'root', |
#ifndef _CODES_H_ | |
#define _CODES_H_ | |
#define ID_STS_LOGIN 101 | |
#define ID_CERTIFY_LOGIN 1000 | |
#define ID_INSTANT_LOGIN 1001 | |
#define ID_CERTIFY_EXIT 1002 | |
#define ID_MEMBER_INFO 1100 | |
#define ID_CHARACTER_INFO 1200 |
func tileset_from_scene(scene, library, merge): | |
""" | |
@scene Node - The input scene | |
@library TileSet - The output tileset | |
@merge bool - Preserve old tiles | |
""" | |
if merge: | |
library.clear() | |
for child in scene.get_children(): |
extends Camera2D | |
var dragging = false | |
var drag_from = Vector2() | |
func _ready(): | |
set_process_unhandled_input(true) | |
func _unhandled_input(event): |