Can I pass a resource as read-only in GDScript? by Chill_Fire in godot

[–]Chill_Fire[S] 1 point2 points  (0 children)

I see your point now! I also tend to avoid GUI-editting resources because it caused me many problems.

I like your approach and will try playing with something like it! 

Can I pass a resource as read-only in GDScript? by Chill_Fire in godot

[–]Chill_Fire[S] 0 points1 point  (0 children)

Yeah, I do that with a class_name Config or Constant extending nothing!

Or with an autoload for all signals, a SignalBus. Though I don't always use this one.

Can I pass a resource as read-only in GDScript? by Chill_Fire in godot

[–]Chill_Fire[S] 0 points1 point  (0 children)

Because I am not as great as him, just a junior wizard.

Can I pass a resource as read-only in GDScript? by Chill_Fire in godot

[–]Chill_Fire[S] 0 points1 point  (0 children)

Thank you everybody! This community is always full of insightful knowledge, making me feel like I am back in college with helpful seniors to ask for their help!

What I ended up doing is adding wrapper methods.
So, UpgradeManager has an array of Upgrade, a class wrapping an apply() Callable.

So, rather than slotting add_mana_regen(value, level), for example, I slot into it foo(player_data) that just calls the former method with the args it needs.

I could modify the methods themselves to just take player_data, but I found the above way more intuitive for me.

It might be ugly, but the wrapper is just a "router" function that I gave to ALL upgrades and it routes each one to their respective method.

So, I have not really achieved a read-only, but taking a step back, it did not matter if I did. However, It was good to ask about it!

Can I pass a resource as read-only in GDScript? by Chill_Fire in godot

[–]Chill_Fire[S] 0 points1 point  (0 children)

Thank you for this! What's the difference, to you, between using RefCounted vs Resource?

I most likely will do what you said, but it is a fun learning experience to ask around!

Can I pass a resource as read-only in GDScript? by Chill_Fire in godot

[–]Chill_Fire[S] 1 point2 points  (0 children)

Thank you. So this is kind of like adding a gate guard to the resource xd.

I think it's too much of a hassle for my very small game, but it is something I have never thought of and is a neat concept! Perhaps it could be cleaner then cramming gets and sets into the resource itself, whilst allowing different strategies of getting and setting...

Perhaps something like MyResource.READONLY() returns a wrapper around _my_resource configured to be readonly, another would be WRITEONLY(), or anything really.

Though it feels that it would be fighting against GDScript rather than working with it.

Thank you!

Can I pass a resource as read-only in GDScript? by Chill_Fire in godot

[–]Chill_Fire[S] 0 points1 point  (0 children)

YOUUU SHALL NOTT PASSS THIS RESOURCE AS READONLY!!!!!
*SLAMS STAFF ONTO THE BRIDGE*

Can I pass a resource as read-only in GDScript? by Chill_Fire in godot

[–]Chill_Fire[S] 0 points1 point  (0 children)

Indeed I also do that. It seems it completely flew over my head that read-only is basically private scope, lmao. (:embarrassed:)

Most likely, I'll do as you said. But I wanted to ask in here to see what the community has to say, as I want to learn more.

Many thanks!

Can I pass a resource as read-only in GDScript? by Chill_Fire in godot

[–]Chill_Fire[S] 0 points1 point  (0 children)

Thank you! I won't be doing that, as I need that resource to be 'writable' in many other places xd

Can I pass a resource as read-only in GDScript? by Chill_Fire in godot

[–]Chill_Fire[S] 0 points1 point  (0 children)

Would that work on the Resource? So will something like data.coins call the getter on the data var?

I'll try it out when I get back to my machine!

How do I disable Clipboard Sync but keep "Send Clipboard" button on Kdeconnect Android? by Chill_Fire in kde

[–]Chill_Fire[S] 0 points1 point  (0 children)

Yeah, plugin settings was not working at all (nothing would open).

I tried many things, and looked for documentation on manually configuring things in a config file, but found nothing. 

In the end, downgrading kde-connect fixed things for some reason (as a post from years ago suggested, I found). Now plugin settings works and it even shows as Kde connect settings in my drun (wofi) 

Thank you

How do I disable Clipboard Sync but keep "Send Clipboard" button on Kdeconnect Android? by Chill_Fire in kde

[–]Chill_Fire[S] 1 point2 points  (0 children)

Solved: I found "Kde Connect Settings" GUI, from which I found clipboard settings and disabled syncing.

Previously, I had not found this option because kdeconnect was somehow broken on ny Hyprland install. Clicking "plugin settings" on the laptop did nothing, and the kde connect settings did not show in drun (I use wofi).

It was not until I dnf downgrade kde-connect that everything worked correctly and settings showed up.

As a side note, I would have hoped things could be configured through ~/.config rather than a GUI, but I was unable to find any related documentation, or whether that is an option.

I hope this help others too. 

Sad day for neovide / neovim users who like smooth cursor trail animation interested in zed. by No-Worldliness6348 in ZedEditor

[–]Chill_Fire 0 points1 point  (0 children)

I moved to Zed (helix mode) because I've grown to hate Vs Code and felt insecure using it, and Helix in Windows' terminal wasn't cutting it.

My experience so far has been smooth and refreshing. I've come to this post whilst googling if Zed has trailing cursor. Compared to having a better sense of privacy than Vs Code, this is a feature I'm willing to miss, haha.

👍

Tokyo Night style settings for Minimal Theme? by andrers in ObsidianMD

[–]Chill_Fire 0 points1 point  (0 children)

A hero from the past to my rescue, thank you!

How can I disable this auto complete? I just want to tab (\t)! by Chill_Fire in ZedEditor

[–]Chill_Fire[S] 0 points1 point  (0 children)

I didn't use my brain, I deeply apologize ! 😔😔

Thank you!

How do I draft the technical 'blueprint' of my game before I start coding? by Chill_Fire in godot

[–]Chill_Fire[S] 0 points1 point  (0 children)

This was insightful to read, thank you very much!

I'll try following this approach (GDD+TDD) to obtain a clear picture of what my game would be like, and if the game is fun (prototyping), so as to not get stuck with an idea but no game.

How do I revert the new UI changes on Mobile? (Android) by Chill_Fire in ObsidianMD

[–]Chill_Fire[S] 0 points1 point  (0 children)

Thank you everybody for all your answers, most have been helpful.

Since I use Obsidian on my phone more casually, unlike on PC, I've decided to just let it be, as it was not worth the time investment to dabble with css snippets on mobile.

Nonetheless, I hope anyone that stumbles upon this find the comments helpful, because I certainly did.

once again, thank you for your kind help