Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
666Savior committed Apr 26, 2021
2 parents ab34c5e + 2c87790 commit 95921c0
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 43 deletions.
2 changes: 2 additions & 0 deletions environment/props/ResearchTable.gd
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ func interact():
character.set_process_input(false)
character.set_physics_process(false)
panel.show()
update_inventory_view()

func done_interacting():
panel.hide()
Expand All @@ -43,6 +44,7 @@ func update_inventory_view():
character = null
return
var inventory_buttons = $CanvasLayer/ResearchPanel/InventoryButtons.get_children()
print_debug(inventory_buttons)
var button_idx = 0
for item_type in character.inventory:
if button_idx >= inventory_buttons.size():
Expand Down
15 changes: 14 additions & 1 deletion environment/props/TableWide2.tscn
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[gd_scene load_steps=8 format=2]
[gd_scene load_steps=9 format=2]

[ext_resource path="res://environment/props/table.png" type="Texture" id=1]
[ext_resource path="res://environment/props/ResearchTable.gd" type="Script" id=2]
[ext_resource path="res://game/ui-theme/ui_theme.tres" type="Theme" id=3]
[ext_resource path="res://game/menu/InventoryButton.tscn" type="PackedScene" id=4]
[ext_resource path="res://game/ui-theme/panel_style_transparent.tres" type="StyleBox" id=5]
[ext_resource path="res://game/ui-theme/font_large.tres" type="DynamicFont" id=6]

[sub_resource type="CircleShape2D" id=1]
radius = 40.0
Expand Down Expand Up @@ -153,3 +154,15 @@ text = "Done"
__meta__ = {
"_edit_use_anchors_": false
}

[node name="TitleLabel" type="Label" parent="CanvasLayer/ResearchPanel"]
anchor_right = 1.0
margin_bottom = 80.0
custom_fonts/font = ExtResource( 6 )
text = "Choose an item to research"
align = 1
valign = 1
autowrap = true
__meta__ = {
"_edit_use_anchors_": false
}
1 change: 1 addition & 0 deletions game/Game.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ visible = false
[node name="DebugLabel" type="Label" parent="UILayer"]
margin_right = 75.0
margin_bottom = 14.0
theme = ExtResource( 1 )
text = "DebugLabel"
script = ExtResource( 2 )
__meta__ = {
Expand Down
14 changes: 7 additions & 7 deletions game/menu/MainMenu.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -70,35 +70,35 @@ __meta__ = {

[node name="PlayButton" type="Button" parent="VBoxContainer"]
margin_right = 240.0
margin_bottom = 34.0
margin_bottom = 35.0
text = "Play"
__meta__ = {
"_edit_use_anchors_": false
}

[node name="OptionsButton" type="Button" parent="VBoxContainer"]
margin_top = 44.0
margin_top = 45.0
margin_right = 240.0
margin_bottom = 78.0
margin_bottom = 80.0
disabled = true
text = "Options"
__meta__ = {
"_edit_use_anchors_": false
}

[node name="CreditsButton" type="Button" parent="VBoxContainer"]
margin_top = 88.0
margin_top = 90.0
margin_right = 240.0
margin_bottom = 122.0
margin_bottom = 125.0
text = "Credits"
__meta__ = {
"_edit_use_anchors_": false
}

[node name="QuitButton" type="Button" parent="VBoxContainer"]
margin_top = 132.0
margin_top = 135.0
margin_right = 240.0
margin_bottom = 166.0
margin_bottom = 170.0
text = "Quit"
__meta__ = {
"_edit_use_anchors_": false
Expand Down
6 changes: 0 additions & 6 deletions game/ui-theme/font_bold.tres

This file was deleted.

6 changes: 0 additions & 6 deletions game/ui-theme/font_bold_italic.tres

This file was deleted.

10 changes: 6 additions & 4 deletions game/ui-theme/font_default.tres
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[gd_resource type="DynamicFont" format=2]
[gd_resource type="DynamicFont" load_steps=2 format=2]

[ext_resource path="res://font/Silver.ttf" type="DynamicFontData" id=1]

[resource]
size = 24
use_mipmaps = true
use_filter = true
size = 20
extra_spacing_bottom = -8
font_data = ExtResource( 1 )
6 changes: 0 additions & 6 deletions game/ui-theme/font_italic.tres

This file was deleted.

8 changes: 8 additions & 0 deletions game/ui-theme/font_large.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[gd_resource type="DynamicFont" load_steps=2 format=2]

[ext_resource path="res://font/Silver.ttf" type="DynamicFontData" id=1]

[resource]
size = 32
extra_spacing_bottom = -8
font_data = ExtResource( 1 )
6 changes: 4 additions & 2 deletions game/ui-theme/ui_theme.tres
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
[gd_resource type="Theme" load_steps=6 format=2]
[gd_resource type="Theme" load_steps=7 format=2]

[ext_resource path="res://game/ui-theme/button_style_empty.tres" type="StyleBox" id=1]
[ext_resource path="res://game/ui-theme/button_style_pressed.tres" type="StyleBox" id=2]
[ext_resource path="res://game/ui-theme/font_default.tres" type="DynamicFont" id=3]
[ext_resource path="res://game/ui-theme/button_style_base.tres" type="StyleBox" id=6]
[ext_resource path="res://game/ui-theme/panel_style_base.tres" type="StyleBox" id=7]
[ext_resource path="res://game/ui-theme/panel_style_popup.tres" type="StyleBox" id=8]

[resource]
default_font = ExtResource( 3 )
Button/colors/font_color = Color( 1, 1, 1, 1 )
Button/colors/font_color_disabled = Color( 0.188235, 0.188235, 0.188235, 1 )
Button/colors/font_color_hover = Color( 1, 1, 1, 1 )
Expand Down Expand Up @@ -88,7 +90,7 @@ FileDialog/icons/parent_folder = null
FileDialog/icons/reload = null
FileDialog/icons/toggle_hidden = null
Fonts/fonts/large = null
Fonts/fonts/normal = null
Fonts/fonts/normal = ExtResource( 3 )
GraphEdit/colors/activity = Color( 0, 0, 0, 1 )
GraphEdit/colors/grid_major = Color( 0, 0, 0, 1 )
GraphEdit/colors/grid_minor = Color( 0, 0, 0, 1 )
Expand Down
22 changes: 11 additions & 11 deletions level/Item.gd
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ enum ItemType {
}

const ICONS: Dictionary = {
NONE = preload("res://item/None.tres"),
ORB_RED = preload("res://item/OrbRed.tres"),
ORB_BLUE = preload("res://item/OrbBlue.tres"),
ORB_YELLOW = preload("res://item/OrbYellow.tres"),
ORB_GREEN = preload("res://item/OrbGreen.tres"),
LEAVES = preload("res://item/Leaves.tres"),
TWIG = preload("res://item/Twig.tres"),
BOTTLE_RED = preload("res://item/BottleRed.tres"),
BOTTLE_BLUE = preload("res://item/BottleBlue.tres"),
BOTTLE_YELLOW = preload("res://item/BottleYellow.tres"),
BOTTLE_GREEN = preload("res://item/BottleGreen.tres"),
ItemType.NONE: preload("res://item/None.tres"),
ItemType.ORB_RED: preload("res://item/OrbRed.tres"),
ItemType.ORB_BLUE: preload("res://item/OrbBlue.tres"),
ItemType.ORB_YELLOW: preload("res://item/OrbYellow.tres"),
ItemType.ORB_GREEN: preload("res://item/OrbGreen.tres"),
ItemType.LEAVES: preload("res://item/Leaves.tres"),
ItemType.TWIG: preload("res://item/Twig.tres"),
ItemType.BOTTLE_RED: preload("res://item/BottleRed.tres"),
ItemType.BOTTLE_BLUE: preload("res://item/BottleBlue.tres"),
ItemType.BOTTLE_YELLOW: preload("res://item/BottleYellow.tres"),
ItemType.BOTTLE_GREEN: preload("res://item/BottleGreen.tres"),
}

static func type_str(item_type):
Expand Down
1 change: 1 addition & 0 deletions project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ gdscript/warnings/integer_division=false

window/size/width=1280
window/size/height=720
window/stretch/mode="viewport"
window/stretch/aspect="expand"

[input]
Expand Down

0 comments on commit 95921c0

Please sign in to comment.