generated from bitbrain/godot-gamejam
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from the-dev-bin/tyler/ui_setup
Mostly functional game loop setup
- Loading branch information
Showing
37 changed files
with
629 additions
and
52 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="CompressedTexture2D" | ||
uid="uid://bpoxr5tkoi7k1" | ||
path="res://.godot/imported/one_block.svg-cfc2e0ae5b1432e799327957c8f8a5aa.ctex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://assets/one_block.svg" | ||
dest_files=["res://.godot/imported/one_block.svg-cfc2e0ae5b1432e799327957c8f8a5aa.ctex"] | ||
|
||
[params] | ||
|
||
compress/mode=0 | ||
compress/high_quality=false | ||
compress/lossy_quality=0.7 | ||
compress/hdr_compression=1 | ||
compress/normal_map=0 | ||
compress/channel_pack=0 | ||
mipmaps/generate=false | ||
mipmaps/limit=-1 | ||
roughness/mode=0 | ||
roughness/src_normal="" | ||
process/fix_alpha_border=true | ||
process/premult_alpha=false | ||
process/normal_map_invert_y=false | ||
process/hdr_as_srgb=false | ||
process/hdr_clamp_exposure=false | ||
process/size_limit=0 | ||
detect_3d/compress_to=1 | ||
svg/scale=1.0 | ||
editor/scale_with_editor_scale=false | ||
editor/convert_colors_with_editor_theme=false |
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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class_name LootTableEntry | ||
extends Resource | ||
|
||
|
||
@export var ingredient: Ingredient | ||
@export var likelihood: int |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
class_name LootTable | ||
extends Resource | ||
|
||
@export var loot: Array[LootTableEntry] | ||
@export var money_range: Array[int] = [5,15] # might not use this yet, but eventually | ||
|
||
func get_loot(quantity: int) -> Array[LootTableEntry]: | ||
var temp: Array[LootTableEntry] = loot.duplicate() | ||
var output: Array[LootTableEntry] = [] | ||
randomize() | ||
var rng: RandomNumberGenerator = RandomNumberGenerator.new() | ||
for i in quantity: | ||
var weights: Array = temp.map(get_weights) | ||
var index: int = rng.rand_weighted(weights) | ||
var item = temp.pop_at(index) | ||
if item: | ||
output.push_back(item) | ||
return output | ||
|
||
func get_weights(loot_entry: LootTableEntry) -> float: | ||
return loot_entry.likelihood |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[gd_resource type="Resource" script_class="LootTable" load_steps=8 format=3 uid="uid://b181mahpm5jwp"] | ||
|
||
[ext_resource type="Script" path="res://loot_tables/LootTableEntry.gd" id="1_5p5ur"] | ||
[ext_resource type="Script" path="res://loot_tables/loot_table.gd" id="1_pcdo4"] | ||
[ext_resource type="Resource" uid="uid://bahbxo6wc30m4" path="res://ingredients/resources/godot_single.tres" id="2_0u5as"] | ||
[ext_resource type="Resource" uid="uid://cyhd24hu3rkmq" path="res://ingredients/resources/l_block.tres" id="3_g1scy"] | ||
|
||
[sub_resource type="Resource" id="Resource_rwm6v"] | ||
script = ExtResource("1_5p5ur") | ||
ingredient = ExtResource("2_0u5as") | ||
likelihood = 1 | ||
|
||
[sub_resource type="Resource" id="Resource_mk8fk"] | ||
script = ExtResource("1_5p5ur") | ||
ingredient = ExtResource("3_g1scy") | ||
likelihood = 1 | ||
|
||
[sub_resource type="Resource" id="Resource_p8m23"] | ||
script = ExtResource("1_5p5ur") | ||
ingredient = ExtResource("2_0u5as") | ||
likelihood = 1 | ||
|
||
[resource] | ||
script = ExtResource("1_pcdo4") | ||
loot = Array[ExtResource("1_5p5ur")]([SubResource("Resource_rwm6v"), SubResource("Resource_mk8fk"), SubResource("Resource_p8m23")]) | ||
money_range = Array[int]([5, 15]) |
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
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
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
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
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
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
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
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
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
Oops, something went wrong.