Compare commits
No commits in common. 'f1a2e6166bee1646877ebdac62c8ea8b5f348c3a' and '30750d2e3cb0c20391c6d09a5f4eea84a4a414c1' have entirely different histories.
f1a2e6166b
...
30750d2e3c
Binary file not shown.
|
Before Width: | Height: | Size: 80 KiB |
@ -1,40 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://s1yoemhrupwe"
|
||||
path="res://.godot/imported/vesna_indoor_bed.png-82be6dfddfce8701f4d35f6270cb0cdb.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/indoor/vesna_indoor_bed.png"
|
||||
dest_files=["res://.godot/imported/vesna_indoor_bed.png-82be6dfddfce8701f4d35f6270cb0cdb.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
|
Before Width: | Height: | Size: 21 KiB |
@ -1,40 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dnlhlf1mx01h5"
|
||||
path="res://.godot/imported/vesna_indoor_door.png-480faae15ccfa0c6172c753cd0b4d6a0.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/indoor/vesna_indoor_door.png"
|
||||
dest_files=["res://.godot/imported/vesna_indoor_door.png-480faae15ccfa0c6172c753cd0b4d6a0.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
@ -1,12 +0,0 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://7pvvop5hfl01"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://iquhbkr7pqeg" path="res://scripts/CSharp/Common/Savegame/SaveCheats.cs" id="1_vcrak"]
|
||||
[ext_resource type="Script" uid="uid://ca4s0algeij1h" path="res://scripts/CSharp/Common/Savegame/SaveIDProviderTool.cs" id="2_q0tmy"]
|
||||
|
||||
[node name="SaveSystem" type="Node"]
|
||||
|
||||
[node name="SaveGameCheat" type="Node" parent="."]
|
||||
script = ExtResource("1_vcrak")
|
||||
|
||||
[node name="SaveIDProvider" type="Node" parent="."]
|
||||
script = ExtResource("2_q0tmy")
|
||||
@ -1,69 +0,0 @@
|
||||
using Godot;
|
||||
using Babushka.scripts.CSharp.Common.Savegame;
|
||||
using Godot.Collections;
|
||||
|
||||
/// <summary>
|
||||
/// Simple collectible scene objects with saveable state.
|
||||
/// </summary>
|
||||
public partial class TrashObject : Sprite2D, ISaveable
|
||||
{
|
||||
private bool _collected;
|
||||
|
||||
/// <summary>
|
||||
/// Loads objects state on scene start.
|
||||
/// </summary>
|
||||
public override void _Ready()
|
||||
{
|
||||
LoadFromSaveData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets object state to collected and updates save data.
|
||||
/// </summary>
|
||||
public void Collect()
|
||||
{
|
||||
SetCollectedState();
|
||||
UpdateSaveData();
|
||||
}
|
||||
|
||||
private void SetCollectedState()
|
||||
{
|
||||
_collected = true;
|
||||
Visible = false;
|
||||
ProcessMode = ProcessModeEnum.Disabled;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the save data with the current state of the object.
|
||||
/// </summary>
|
||||
public void UpdateSaveData()
|
||||
{
|
||||
var payloadData = new Dictionary<string, Variant>
|
||||
{
|
||||
{ "collectedState", _collected },
|
||||
};
|
||||
|
||||
string id = GetMeta("SaveID").AsString();
|
||||
SavegameService.AppendDataToSave( id, payloadData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Loads objects state from save data.
|
||||
/// </summary>
|
||||
public void LoadFromSaveData()
|
||||
{
|
||||
string id = GetMeta("SaveID").AsString();
|
||||
|
||||
Dictionary<string, Variant> save = SavegameService.GetSaveData(id);
|
||||
if (save.Count > 0)
|
||||
{
|
||||
if (save.TryGetValue("collectedState", out Variant collectedVar))
|
||||
{
|
||||
if (collectedVar.AsBool())
|
||||
{
|
||||
SetCollectedState();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1 +0,0 @@
|
||||
uid://c2cgj153m05sp
|
||||
Loading…
Reference in new issue