brand new start

This commit is contained in:
Rendo 2025-08-01 02:47:32 +05:00
commit f15f38bfc4
464 changed files with 5 additions and 20007 deletions

View file

@ -1,20 +0,0 @@
using Godot;
namespace Newlon.Resources;
[GlobalClass]
[Tool]
public partial class MoneyReward : RewardResource
{
[Export] public int Cost;
public override PackedScene GetPreview()
{
return Scene;
}
public override bool Redeem()
{
PlayerProgress.Instance.Money += Cost;
return true;
}
}

View file

@ -1 +0,0 @@
uid://dtfmy3los1si1

View file

@ -1,29 +0,0 @@
using Godot;
namespace Newlon.Resources;
[GlobalClass]
[Tool]
public partial class PlantReward : RewardResource
{
[Export]
public PlantResource Plant { get; private set; }
public override PackedScene GetPreview()
{
return Plant.Scene;
}
public override bool Redeem()
{
if (PlayerProgress.Instance.PlayerPlants.Contains(Plant) == false)
{
PlayerProgress.Instance.PlayerPlants.Add(Plant);
return true;
}
else
{
return false;
}
}
}

View file

@ -1 +0,0 @@
uid://c8e40t5nbo83r

View file

@ -1,15 +0,0 @@
using Godot;
namespace Newlon.Resources;
[GlobalClass]
[Tool]
public abstract partial class RewardResource : Resource
{
[Export]
public PackedScene Scene { get; private set; }
[Export] public string Name { get; private set; }
[Export] public string Description { get; private set; }
public abstract PackedScene GetPreview();
public abstract bool Redeem();
}

View file

@ -1 +0,0 @@
uid://co3cs8suo67gw

View file

@ -1,28 +0,0 @@
using Godot;
[Tool]
public partial class EntityResource : Resource
{
[Export] public string NameKey;
[Export] public string DescriptionKey;
[Export] public float Cost;
[Export] public PackedScene Scene;
[Export] public float ReloadTime;
[Export(PropertyHint.Range, "0,1,0.01")] public float ReloadProgress;
[Export] public Texture2D Preview;
[Export] public CustomSeedpacketFrame CustomFrame;
[Export] public int Order = 0;
public string parsedDescription;
public bool isDescriptionParsed;
private string internal_id = "";
public string GetInternalID()
{
if (internal_id == "")
{
string[] splitstr = ResourcePath.Split('/');
string file = splitstr[splitstr.Length - 1].ToLower();
internal_id = file.TrimSuffix(".tres");
}
return internal_id;
}
}

View file

@ -1 +0,0 @@
uid://j7wr5mj7j81b

View file

@ -1,11 +0,0 @@
using Godot;
namespace Newlon.Resources;
[GlobalClass]
[Tool]
public partial class GridEntityResource : EntityResource
{
[Export] public int Layer = 1;
[Export] public bool DontRegister = false;
}

View file

@ -1 +0,0 @@
uid://bwjyra0xvhde5

View file

@ -1,9 +0,0 @@
using Godot;
namespace Newlon.Resources;
[GlobalClass]
[Tool]
public partial class PlantResource : GridEntityResource
{
}

View file

@ -1 +0,0 @@
uid://cyenlko1knygw

View file

@ -1,28 +0,0 @@
using Godot;
namespace Newlon.Resources;
[GlobalClass]
[Tool]
public partial class ZombieResource : EntityResource
{
public GridEntityResource ToGridEntity()
{
GridEntityResource result = new();
result.NameKey = NameKey;
result.DescriptionKey = DescriptionKey;
result.Cost = Cost;
result.Scene = Scene;
result.ReloadTime = ReloadTime;
result.ReloadProgress = ReloadProgress;
result.Preview = Preview;
result.CustomFrame = CustomFrame;
result.Order = Order;
result.Layer = 1;
result.DontRegister = true;
return result;
}
}

View file

@ -1 +0,0 @@
uid://cqxj7o8hdm82n