mirror of
https://git.tonybark.com/tonytins/CyberBits.git
synced 2026-05-12 05:23:34 -04:00
Initial migration to the new 2dog project project structure
This commit is contained in:
parent
55044ae4b8
commit
1f2032dcf8
34 changed files with 830 additions and 96 deletions
6
CyberBitsOld/Addon.cs
Normal file
6
CyberBitsOld/Addon.cs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
namespace Cyberbits;
|
||||
|
||||
public record Addon(
|
||||
[property: JsonPropertyName("cyberware")]
|
||||
string[] Cyberware
|
||||
);
|
||||
12
CyberBitsOld/Bits.cs
Normal file
12
CyberBitsOld/Bits.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
namespace Cyberbits;
|
||||
|
||||
public record Bits(
|
||||
[property: JsonPropertyName("image")]
|
||||
string Image,
|
||||
[property: JsonPropertyName("feat")]
|
||||
string Feat,
|
||||
[property: JsonPropertyName("base")]
|
||||
string[] Base,
|
||||
[property: JsonPropertyName("style")]
|
||||
string[] Style
|
||||
);
|
||||
19
CyberBitsOld/CyberBitsOld.csproj
Normal file
19
CyberBitsOld/CyberBitsOld.csproj
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<IsPackable>false</IsPackable>
|
||||
<RollForward>LatestMajor</RollForward>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="2dog" Version="0.1.14-pre" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<GodotProjectDir>./project</GodotProjectDir>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
31
CyberBitsOld/FileFetcher.cs
Normal file
31
CyberBitsOld/FileFetcher.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
namespace Cyberbits;
|
||||
|
||||
public static class FileFetcher
|
||||
{
|
||||
public static string LoadTextFile(string filename, bool userDir = false)
|
||||
{
|
||||
var location = "res";
|
||||
|
||||
if (userDir)
|
||||
location = "user";
|
||||
|
||||
using var file = FileAccess.Open($"{location}://{filename}", FileAccess.ModeFlags.Read);
|
||||
var contents = file.GetAsText();
|
||||
|
||||
file.Close();
|
||||
return contents;
|
||||
}
|
||||
|
||||
public static ConfigFile LoadConfig(string filename, bool userDir = false)
|
||||
{
|
||||
var config = new ConfigFile();
|
||||
|
||||
// Load data from a file.
|
||||
var err = config.Load(LoadTextFile(filename, userDir));
|
||||
|
||||
if (err != Error.Ok)
|
||||
sys.Environment.Exit(sys.Environment.ExitCode);
|
||||
|
||||
return config;
|
||||
}
|
||||
}
|
||||
10
CyberBitsOld/GlobalUsing.cs
Normal file
10
CyberBitsOld/GlobalUsing.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
// System
|
||||
global using System;
|
||||
global using sys = System;
|
||||
global using System.Text.Json;
|
||||
global using System.Text.Json.Serialization;
|
||||
|
||||
// Godot
|
||||
global using Godot;
|
||||
global using Godot.Collections;
|
||||
global using Engine = twodog.Engine;
|
||||
45
CyberBitsOld/Program.cs
Normal file
45
CyberBitsOld/Program.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using Cyberbits;
|
||||
|
||||
using var engine = new Engine("Cyberbits", Engine.ResolveProjectDir());
|
||||
using var godot = engine.Start();
|
||||
|
||||
// Load a scene
|
||||
var scene = GD.Load<PackedScene>("res://main.tscn");
|
||||
engine.Tree.Root.AddChild(scene.Instantiate());
|
||||
var load = engine.Tree.CurrentScene;
|
||||
|
||||
var bitsImage = load.GetNode<TextureRect>("BitsImage");
|
||||
// var bitsSelection = curScene.GetNode<OptionButton>("BitsSelection");
|
||||
var unlockedFeatLbl = load.GetNode<Label>("UnlockedFeatLbl");
|
||||
var cyberwareList = load.GetNode<ItemList>("CyberwareList");
|
||||
var genitalList = load.GetNode<ItemList>("GenitalList");
|
||||
|
||||
var baseContents = FileFetcher.LoadTextFile(ResourceFiles.COCK_JSON);
|
||||
var addonContents = FileFetcher.LoadTextFile(ResourceFiles.ADDONS_JSON);
|
||||
|
||||
var screenSize = DisplayServer.ScreenGetSize();
|
||||
var window = load.GetWindow();
|
||||
window.Size = new Vector2I(screenSize.X - 66, screenSize.Y - 1);
|
||||
|
||||
if (!FileAccess.FileExists(baseContents)
|
||||
|| !FileAccess.FileExists(addonContents))
|
||||
sys.Environment.Exit(sys.Environment.ExitCode);
|
||||
|
||||
var bits = JsonSerializer.Deserialize<Bits>(baseContents);
|
||||
var addon = JsonSerializer.Deserialize<Addon>(addonContents);
|
||||
|
||||
bitsImage.Texture.ResourcePath = bits.Image;
|
||||
unlockedFeatLbl.Text = $"Feat: {bits?.Feat}";
|
||||
|
||||
foreach (var selection in bits.Base)
|
||||
genitalList.AddItem(selection);
|
||||
|
||||
foreach (var cyberware in addon.Cyberware)
|
||||
cyberwareList.AddItem(cyberware);
|
||||
|
||||
// Run the main loop
|
||||
while (!godot.Iteration())
|
||||
{
|
||||
if (Console.KeyAvailable && Console.ReadKey(true).Key == ConsoleKey.Q)
|
||||
sys.Environment.Exit(sys.Environment.ExitCode);
|
||||
}
|
||||
8
CyberBitsOld/ResourceFiles.cs
Normal file
8
CyberBitsOld/ResourceFiles.cs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
namespace Cyberbits;
|
||||
|
||||
public struct ResourceFiles
|
||||
{
|
||||
public const string COCK_JSON = "resources/cock.json";
|
||||
public const string PUSSY_JSON = "resources/pussy.json";
|
||||
public const string ADDONS_JSON = "resources/addons.json";
|
||||
}
|
||||
1
CyberBitsOld/project/config.cfg
Normal file
1
CyberBitsOld/project/config.cfg
Normal file
|
|
@ -0,0 +1 @@
|
|||
hidpi = true
|
||||
103
CyberBitsOld/project/main.tscn
Normal file
103
CyberBitsOld/project/main.tscn
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
[gd_scene format=3 uid="uid://eosyt5tlfb0s"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dy3yusiqudfy7" path="res://sprites/cock.jpg" id="1_ig7tw"]
|
||||
|
||||
[node name="Main" type="Control" unique_id=1203792895]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="BitsImage" type="TextureRect" parent="." unique_id=420796857]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.02578125
|
||||
anchor_top = 0.2125
|
||||
anchor_right = 0.2921875
|
||||
anchor_bottom = 0.6861111
|
||||
texture = ExtResource("1_ig7tw")
|
||||
expand_mode = 3
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="GenitalList" type="ItemList" parent="." unique_id=1657021535]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.3140625
|
||||
anchor_top = 0.29722223
|
||||
anchor_right = 0.5804688
|
||||
anchor_bottom = 0.6611111
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="CyberwareList" type="ItemList" parent="." unique_id=1780192556]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.5921875
|
||||
anchor_top = 0.2986111
|
||||
anchor_right = 0.78984374
|
||||
anchor_bottom = 0.6194445
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="UnlockedFeatLbl" type="Label" parent="." unique_id=1358090682]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.40546876
|
||||
anchor_top = 0.23888889
|
||||
anchor_right = 0.5726563
|
||||
anchor_bottom = 0.27083334
|
||||
text = "Feat:"
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="BitsSelection" type="OptionButton" parent="." unique_id=1632883177]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.315625
|
||||
anchor_top = 0.23055555
|
||||
anchor_right = 0.37578124
|
||||
anchor_bottom = 0.28194445
|
||||
selected = 0
|
||||
fit_to_longest_item = false
|
||||
allow_reselect = true
|
||||
item_count = 2
|
||||
popup/item_0/text = "Dick"
|
||||
popup/item_0/id = 0
|
||||
popup/item_1/text = "Pussy"
|
||||
popup/item_1/id = 1
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="CyberwareLbl" type="Label" parent="." unique_id=1646946419]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.5921875
|
||||
anchor_top = 0.25277779
|
||||
anchor_right = 0.7867187
|
||||
anchor_bottom = 0.29166666
|
||||
text = "Cyberware"
|
||||
horizontal_alignment = 1
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="BioEssenceLbl" type="Label" parent="." unique_id=1183351215]
|
||||
layout_mode = 0
|
||||
offset_left = 759.0
|
||||
offset_top = 458.0
|
||||
offset_right = 877.0
|
||||
offset_bottom = 481.0
|
||||
text = "Bio-Essence: 10"
|
||||
|
||||
[node name="MegaDebtLbl" type="Label" parent="." unique_id=1875640511]
|
||||
layout_mode = 0
|
||||
offset_left = 896.0
|
||||
offset_top = 458.0
|
||||
offset_right = 1014.0
|
||||
offset_bottom = 481.0
|
||||
text = "Mega Debt: 10"
|
||||
|
||||
[node name="ActionRatingLbl" type="Label" parent="." unique_id=865651652]
|
||||
layout_mode = 0
|
||||
offset_left = 762.0
|
||||
offset_top = 489.0
|
||||
offset_right = 880.0
|
||||
offset_bottom = 512.0
|
||||
text = "Action Rating: 0"
|
||||
31
CyberBitsOld/project/project.godot
Normal file
31
CyberBitsOld/project/project.godot
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
; Engine configuration file.
|
||||
; It's best edited using the editor UI and not directly,
|
||||
; since the parameters that go here are not all obvious.
|
||||
;
|
||||
; Format:
|
||||
; [section] ; section goes between []
|
||||
; param=value ; assign values to parameters
|
||||
|
||||
config_version=5
|
||||
|
||||
custom_features="dotnet"
|
||||
|
||||
[animation]
|
||||
|
||||
compatibility/default_parent_skeleton_in_mesh_instance_3d=true
|
||||
|
||||
[application]
|
||||
|
||||
config/name="Cyberbits"
|
||||
run/main_scene="res://main.tscn"
|
||||
config/features=PackedStringArray("4.6")
|
||||
|
||||
[display]
|
||||
|
||||
window/size/viewport_width=1280
|
||||
window/size/viewport_height=720
|
||||
window/stretch/mode="viewport"
|
||||
|
||||
[dotnet]
|
||||
|
||||
project/assembly_name="CyberBits"
|
||||
6
CyberBitsOld/project/resources/addons.json
Normal file
6
CyberBitsOld/project/resources/addons.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"cyberware": [
|
||||
"Piercings",
|
||||
"Datajack"
|
||||
]
|
||||
}
|
||||
16
CyberBitsOld/project/resources/cock.json
Normal file
16
CyberBitsOld/project/resources/cock.json
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"image": "res://sprites/cock.jpg",
|
||||
"feat": "Aim Piss",
|
||||
"base": [
|
||||
"Au Natural",
|
||||
"Les Americaines"
|
||||
],
|
||||
"style": [
|
||||
"Bioware",
|
||||
"Cyberware"
|
||||
],
|
||||
"cyberware": [
|
||||
"Piercings",
|
||||
"Datajack"
|
||||
]
|
||||
}
|
||||
12
CyberBitsOld/project/resources/pussy.json
Normal file
12
CyberBitsOld/project/resources/pussy.json
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"image": "res://sprites/pussy.jpg",
|
||||
"feat": "Boom of the Mother Goddness",
|
||||
"base": [
|
||||
"Au Natural",
|
||||
"Les Americaines"
|
||||
],
|
||||
"style": [
|
||||
"Bioware",
|
||||
"Cyberware"
|
||||
]
|
||||
}
|
||||
BIN
CyberBitsOld/project/sprites/cock.jpg
Normal file
BIN
CyberBitsOld/project/sprites/cock.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 252 KiB |
40
CyberBitsOld/project/sprites/cock.jpg.import
Normal file
40
CyberBitsOld/project/sprites/cock.jpg.import
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dy3yusiqudfy7"
|
||||
path="res://.godot/imported/cock.jpg-dc731d312fd1d89d74474e6b2228fd74.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sprites/cock.jpg"
|
||||
dest_files=["res://.godot/imported/cock.jpg-dc731d312fd1d89d74474e6b2228fd74.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
|
||||
BIN
CyberBitsOld/project/sprites/pussy.jpg
Normal file
BIN
CyberBitsOld/project/sprites/pussy.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 334 KiB |
40
CyberBitsOld/project/sprites/pussy.jpg.import
Normal file
40
CyberBitsOld/project/sprites/pussy.jpg.import
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dkopqn7vnw8e1"
|
||||
path="res://.godot/imported/pussy.jpg-8a250a58765a4818bd67de2eff4bf0dc.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sprites/pussy.jpg"
|
||||
dest_files=["res://.godot/imported/pussy.jpg-8a250a58765a4818bd67de2eff4bf0dc.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
|
||||
Loading…
Add table
Add a link
Reference in a new issue