From d3b5f1fc1ced7161e36af78ee12a93b99c11dd2d Mon Sep 17 00:00:00 2001 From: Anthony Foxclaw Date: Sat, 27 Jun 2020 12:06:53 -0400 Subject: [PATCH] TextureButton is now the root scene - Due to resize issues with the grid container, TextureButton is now the root for all wardrobe items - Brought back underwear, with the exception of the owo censor (for now) - Remove clothing buttons are tied to wardrobe - Game scene now properly references the wardrobe again --- scenes/clothing/accessoryBase.tscn | 2 +- scenes/clothing/baseClothing.tscn | 13 ++++----- scenes/clothing/briefs.tscn | 7 +++++ scenes/clothing/camera.tscn | 7 +++-- scenes/clothing/fundosi.tscn | 12 ++++++++ scenes/clothing/undiesBase.tscn | 2 +- scenes/clothing/zBriefs.tscn | 7 +++++ scenes/game.tscn | 2 +- scenes/{wordrobe.tscn => wardrobe.tscn} | 37 +++++++++++++------------ scripts/characterBase.gd | 4 +++ scripts/clothing/accessoryBase.gd | 3 +- scripts/clothing/baseClothing.gd | 2 +- scripts/clothing/undiesBase.gd | 3 +- scripts/wardrobe.gd | 7 +++++ 14 files changed, 74 insertions(+), 34 deletions(-) create mode 100644 scenes/clothing/briefs.tscn create mode 100644 scenes/clothing/fundosi.tscn create mode 100644 scenes/clothing/zBriefs.tscn rename scenes/{wordrobe.tscn => wardrobe.tscn} (87%) create mode 100644 scripts/wardrobe.gd diff --git a/scenes/clothing/accessoryBase.tscn b/scenes/clothing/accessoryBase.tscn index d84ffc9..16e4e2c 100644 --- a/scenes/clothing/accessoryBase.tscn +++ b/scenes/clothing/accessoryBase.tscn @@ -5,4 +5,4 @@ [node name="accessoryBase" instance=ExtResource( 1 )] script = ExtResource( 2 ) -[connection signal="pressed" from="clothing" to="." method="_on_accessory_pressed"] +[connection signal="pressed" from="." to="." method="_on_accessory_pressed"] diff --git a/scenes/clothing/baseClothing.tscn b/scenes/clothing/baseClothing.tscn index 1aa40e6..1cb5375 100644 --- a/scenes/clothing/baseClothing.tscn +++ b/scenes/clothing/baseClothing.tscn @@ -2,14 +2,13 @@ [ext_resource path="res://scripts/clothing/baseClothing.gd" type="Script" id=1] -[node name="baseClothing" type="Control"] +[node name="baseClothing" type="TextureButton"] +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_right = -694.0 +margin_bottom = -488.0 +rect_min_size = Vector2( 106, 112 ) script = ExtResource( 1 ) __meta__ = { "_edit_use_anchors_": false } - -[node name="clothing" type="TextureButton" parent="."] -rect_min_size = Vector2( 106, 112 ) -__meta__ = { -"_edit_use_anchors_": false -} diff --git a/scenes/clothing/briefs.tscn b/scenes/clothing/briefs.tscn new file mode 100644 index 0000000..295a54a --- /dev/null +++ b/scenes/clothing/briefs.tscn @@ -0,0 +1,7 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://sprites/clothes/briefs.svg" type="Texture" id=1] +[ext_resource path="res://scenes/clothing/undiesBase.tscn" type="PackedScene" id=2] + +[node name="briefs" instance=ExtResource( 2 )] +texture_normal = ExtResource( 1 ) diff --git a/scenes/clothing/camera.tscn b/scenes/clothing/camera.tscn index 88ba8aa..f90e665 100644 --- a/scenes/clothing/camera.tscn +++ b/scenes/clothing/camera.tscn @@ -4,6 +4,9 @@ [ext_resource path="res://sprites/clothes/camera.png" type="Texture" id=2] [node name="camera" instance=ExtResource( 1 )] - -[node name="clothing" parent="." index="0"] +anchor_right = 0.0 +anchor_bottom = 0.0 +margin_right = 0.0 +margin_bottom = 0.0 +rect_min_size = Vector2( 0, 0 ) texture_normal = ExtResource( 2 ) diff --git a/scenes/clothing/fundosi.tscn b/scenes/clothing/fundosi.tscn new file mode 100644 index 0000000..19f3523 --- /dev/null +++ b/scenes/clothing/fundosi.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://sprites/clothes/fundosi.svg" type="Texture" id=1] +[ext_resource path="res://scenes/clothing/undiesBase.tscn" type="PackedScene" id=2] + +[node name="fundosi" instance=ExtResource( 2 )] +anchor_right = 0.0 +anchor_bottom = 0.0 +margin_right = 0.0 +margin_bottom = 0.0 +rect_min_size = Vector2( 0, 0 ) +texture_normal = ExtResource( 1 ) diff --git a/scenes/clothing/undiesBase.tscn b/scenes/clothing/undiesBase.tscn index 4a53669..b8128e4 100644 --- a/scenes/clothing/undiesBase.tscn +++ b/scenes/clothing/undiesBase.tscn @@ -5,4 +5,4 @@ [node name="baseClothing" instance=ExtResource( 1 )] script = ExtResource( 2 ) -[connection signal="pressed" from="clothing" to="." method="_on_undies_pressed"] +[connection signal="pressed" from="." to="." method="_on_undies_pressed"] diff --git a/scenes/clothing/zBriefs.tscn b/scenes/clothing/zBriefs.tscn new file mode 100644 index 0000000..9739ffa --- /dev/null +++ b/scenes/clothing/zBriefs.tscn @@ -0,0 +1,7 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://sprites/clothes/z_briefs.svg" type="Texture" id=1] +[ext_resource path="res://scenes/clothing/undiesBase.tscn" type="PackedScene" id=2] + +[node name="zBriefs" instance=ExtResource( 2 )] +texture_normal = ExtResource( 1 ) diff --git a/scenes/game.tscn b/scenes/game.tscn index 141126f..1ce48ad 100644 --- a/scenes/game.tscn +++ b/scenes/game.tscn @@ -2,7 +2,7 @@ [ext_resource path="res://scenes/characterBase.tscn" type="PackedScene" id=1] [ext_resource path="res://scenes/pause.tscn" type="PackedScene" id=2] -[ext_resource path="res://scenes/clothes.tscn" type="PackedScene" id=4] +[ext_resource path="res://scenes/wardrobe.tscn" type="PackedScene" id=4] [ext_resource path="res://sprites/clothes/icrazy_frame.svg" type="Texture" id=5] [ext_resource path="res://sprites/clothes/lights.png" type="Texture" id=6] diff --git a/scenes/wordrobe.tscn b/scenes/wardrobe.tscn similarity index 87% rename from scenes/wordrobe.tscn rename to scenes/wardrobe.tscn index f395306..96ea405 100644 --- a/scenes/wordrobe.tscn +++ b/scenes/wardrobe.tscn @@ -1,6 +1,7 @@ [gd_scene load_steps=23 format=2] [ext_resource path="res://scenes/clothing/camera.tscn" type="PackedScene" id=1] +[ext_resource path="res://scenes/clothing/zBriefs.tscn" type="PackedScene" id=2] [ext_resource path="res://sprites/clothes/jeans.svg" type="Texture" id=3] [ext_resource path="res://sprites/clothes/blue_skirt.svg" type="Texture" id=4] [ext_resource path="res://sprites/clothes/sweat_pants.svg" type="Texture" id=5] @@ -18,10 +19,9 @@ [ext_resource path="res://sprites/clothes/train_hoodie.svg" type="Texture" id=17] [ext_resource path="res://sprites/clothes/korm_shirt.png" type="Texture" id=18] [ext_resource path="res://sprites/clothes/whatsnew_shirt.svg" type="Texture" id=19] -[ext_resource path="res://sprites/clothes/owo_censor.svg" type="Texture" id=20] -[ext_resource path="res://sprites/clothes/briefs.svg" type="Texture" id=21] -[ext_resource path="res://sprites/clothes/z_briefs.svg" type="Texture" id=22] -[ext_resource path="res://sprites/clothes/fundosi.svg" type="Texture" id=23] +[ext_resource path="res://scenes/clothing/briefs.tscn" type="PackedScene" id=20] +[ext_resource path="res://scripts/wardrobe.gd" type="Script" id=21] +[ext_resource path="res://scenes/clothing/fundosi.tscn" type="PackedScene" id=22] [node name="Wordrobe" type="TabContainer"] anchor_right = 1.0 @@ -29,6 +29,7 @@ anchor_bottom = 1.0 custom_colors/font_color_disabled = Color( 0, 0, 0, 1 ) custom_colors/font_color_bg = Color( 0.921569, 0.921569, 0.921569, 1 ) custom_colors/font_color_fg = Color( 1, 1, 1, 1 ) +script = ExtResource( 21 ) __meta__ = { "_edit_use_anchors_": false } @@ -43,6 +44,7 @@ margin_bottom = -4.0 custom_constants/hseparation = 0 [node name="PantsScroll" type="ScrollContainer" parent="Pants"] +visible = false anchor_right = 1.0 anchor_bottom = 1.0 __meta__ = { @@ -211,32 +213,23 @@ anchor_bottom = 1.0 [node name="UndiesGrid" type="GridContainer" parent="Underwear/UndiesScroll"] margin_right = 792.0 -margin_bottom = 228.0 +margin_bottom = 112.0 size_flags_horizontal = 3 columns = 3 -[node name="OwOCensor" type="TextureButton" parent="Underwear/UndiesScroll/UndiesGrid"] +[node name="fundosi" parent="Underwear/UndiesScroll/UndiesGrid" instance=ExtResource( 22 )] margin_right = 106.0 margin_bottom = 112.0 -texture_normal = ExtResource( 20 ) -[node name="Briefs" type="TextureButton" parent="Underwear/UndiesScroll/UndiesGrid"] +[node name="zBriefs" parent="Underwear/UndiesScroll/UndiesGrid" instance=ExtResource( 2 )] margin_left = 110.0 margin_right = 216.0 margin_bottom = 112.0 -texture_normal = ExtResource( 21 ) -[node name="ZBriefs" type="TextureButton" parent="Underwear/UndiesScroll/UndiesGrid"] +[node name="briefs" parent="Underwear/UndiesScroll/UndiesGrid" instance=ExtResource( 20 )] margin_left = 220.0 margin_right = 326.0 margin_bottom = 112.0 -texture_normal = ExtResource( 22 ) - -[node name="Fundosi" type="TextureButton" parent="Underwear/UndiesScroll/UndiesGrid"] -margin_top = 116.0 -margin_right = 106.0 -margin_bottom = 228.0 -texture_normal = ExtResource( 23 ) [node name="Accessoires" type="Tabs" parent="."] visible = false @@ -255,7 +248,17 @@ margin_bottom = 494.0 [node name="AccsGrid" type="GridContainer" parent="Accessoires/AccsScroll"] margin_right = 350.0 +margin_bottom = 112.0 size_flags_horizontal = 3 columns = 3 [node name="camera" parent="Accessoires/AccsScroll/AccsGrid" instance=ExtResource( 1 )] +margin_right = 85.0 +margin_bottom = 112.0 + +[node name="removeAccessory" type="TextureButton" parent="Accessoires/AccsScroll/AccsGrid"] +margin_left = 89.0 +margin_right = 195.0 +margin_bottom = 112.0 +texture_normal = ExtResource( 9 ) +[connection signal="pressed" from="Accessoires/AccsScroll/AccsGrid/removeAccessory" to="." method="_on_removeAccessory_pressed"] diff --git a/scripts/characterBase.gd b/scripts/characterBase.gd index bf9f32f..f09cd42 100644 --- a/scripts/characterBase.gd +++ b/scripts/characterBase.gd @@ -4,7 +4,11 @@ extends Node2D onready var character = preload("res://resources/character.tres") onready var accessory = $Accessory +onready var underwear = $Undies func _process(delta): if character.accessory != null: accessory.texture = character.accessory + + if character.underwear != null: + underwear.texture = character.underwear diff --git a/scripts/clothing/accessoryBase.gd b/scripts/clothing/accessoryBase.gd index 3ef80cb..75b7764 100644 --- a/scripts/clothing/accessoryBase.gd +++ b/scripts/clothing/accessoryBase.gd @@ -1,7 +1,6 @@ extends "res://scripts/clothing/baseClothing.gd" onready var character = preload("res://resources/character.tres") -onready var clothing = $clothing func _on_accessory_pressed(): - character.accessory = clothing.texture_normal + character.accessory = texture_normal diff --git a/scripts/clothing/baseClothing.gd b/scripts/clothing/baseClothing.gd index a9f2075..7d09770 100644 --- a/scripts/clothing/baseClothing.gd +++ b/scripts/clothing/baseClothing.gd @@ -1,2 +1,2 @@ -extends Control +extends TextureButton diff --git a/scripts/clothing/undiesBase.gd b/scripts/clothing/undiesBase.gd index a80b4cc..ca50e52 100644 --- a/scripts/clothing/undiesBase.gd +++ b/scripts/clothing/undiesBase.gd @@ -1,7 +1,6 @@ extends "res://scripts/clothing/baseClothing.gd" onready var character = preload("res://resources/character.tres") -onready var clothing = $clothing func _on_undies_pressed(): - character.underwear = clothing.texture_normal + character.underwear = texture_normal diff --git a/scripts/wardrobe.gd b/scripts/wardrobe.gd new file mode 100644 index 0000000..afae7b9 --- /dev/null +++ b/scripts/wardrobe.gd @@ -0,0 +1,7 @@ +extends TabContainer + +onready var character = preload("res://resources/character.tres") +onready var blank_top = preload("res://sprites/clothes/tops_placeholder.png") + +func _on_removeAccessory_pressed(): + character.accessory = blank_top