Skip to content

Instantly share code, notes, and snippets.

Mandi Grant MJGrant

Block or report user

Report or block MJGrant

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View better-cars.txt
group: auto_dealer_schema
Model = {
model_id:number, model_name:string, first_production_year:string
1,'XJS','1987'
2,'XK120','1948'
3,'Camaro','1966'
4,'GT','2005'
5,'Boss 302 Mustang','1969'
6,'P1800','1961'
@MJGrant
MJGrant / parsely.js
Created Dec 17, 2018
node js project that builds static data files for my Godot project
View parsely.js
/* Parsely v.0.1
Developed for Guild Leader project (December 2018)
To use: place .json files in parsely/names, parsely/staticData, parsely/timedNodeData, etc.
In Terminal:
node parsely.js
Exported .gd files are placed directly in gameData folder.
@MJGrant
MJGrant / createHero1.gd
Created Dec 17, 2018
Create a hero and add it to the scene
View createHero1.gd
#the new hero is the last thing in the roster, so grab it out of the back
var lastIndex = global.guildRoster.size() - 1
global.selectedHero = global.guildRoster[lastIndex]
var heroScene = preload("res://hero.tscn").instance()
heroScene.set_instance_data(global.selectedHero)
heroScene._draw_sprites()
heroScene.set_position(Vector2(240, 80)) #screen is 540 wide
heroScene.set_display_params(false, true) #walking enabled?, show name
add_child(heroScene)
@MJGrant
MJGrant / heroGenerator.gd
Created Dec 17, 2018
Godot project hero generator code copied 12/16/2018
View heroGenerator.gd
extends Node
#heroGenerator.gd
#makes a level 1 hero with random class and name
var nameGenerator = load("res://nameGenerator.gd").new()
var humanFemaleHeads = ["human_female_01.png", "human_female_02.png", "human_female_03.png", "human_female_04.png", "human_female_05.png", "human_female_06.png", "human_female_07.png", "human_female_08.png", "human_female_09.png", "human_female_10.png", "human_female_11.png"]
var humanMaleHeads = ["human_male_01.png", "human_male_02.png", "human_male_03.png", "human_male_04.png", "human_male_05.png", "human_male_06.png", "human_male_07.png", "human_male_08.png", "human_male_08.png", "human_male_09.png"]
var elfFemaleHeads = ["elf_female_01.png"]
func _ready():
View baseHero.gd
extends KinematicBody2D
#Hero properties - not governed by external spreadsheet data
#These are set when a hero is randomly generated in heroGenerator.gd
var heroID = -1
var heroName = "Default Name"
var heroClass = "NONE"
var level = -1
var xp = -1
var currentRoom = 0 #outside by default
@MJGrant
MJGrant / hero.gd
Created Dec 17, 2018
hero.gd copied from godot project for the sake of example 12/16/2018
View hero.gd
extends "basehero.gd"
#hero.gd
#todo: globalize these
var mainRoomMinX = 110
var mainRoomMaxX = 360
var mainRoomMinY = 250
var mainRoomMaxY = 410
var outsideMinX = 150
@MJGrant
MJGrant / items.json
Created Jul 31, 2018
Export of Items data as a JSON from Google Sheets for use in GameMaker Studio 2
View items.json
[
{
"name": "Rusty Broadsword",
"prestige": 0,
"slot": "mainHand",
"rarity": "common",
"classRestriction": "warrior",
"noDrop": false,
"hpRaw": 0,
"manaRaw": 0,
View SDG 2017 css customizations
.pros-cons-table {
width:100%;
}
.pros-cons-table tbody tr td {
border: 2px solid white;
}
.pros-cons-header {
width: 50%;
@MJGrant
MJGrant / course-explorer-mock-data.json
Created Dec 20, 2017
course-explorer-mock-data.json
View course-explorer-mock-data.json
{
"courses":{
"CS123":{
"fullName":"CS 123 - Introduction to Coding",
"description":"A solid course with a brilliant instructor",
"tips":[
{
"tip":"Study hard",
"timestamp":"July 2017"
},
@MJGrant
MJGrant / sqlcourse2exercises.txt
Last active Jan 28, 2016
My answers to sqlcourse2.com exercises
View sqlcourse2exercises.txt
-- Select
SELECT * FROM items_ordered WHERE customerid = 10449;
SELECT * FROM items_ordered WHERE item = 'tent';
SELECT customerid, order_date, item FROM items_ordered WHERE item LIKE '%S';
SELECT DISTINCT item FROM items_ordered;
You can’t perform that action at this time.