toes-Socks icon

Socks

Socks is a library to facilitate joy in Webfishing mod development

Last updated 2 months ago
Total downloads 9570
Total rating 2 
Categories Libraries
Dependency string toes-Socks-0.2.1
Dependants 7 other packages depend on this package

This mod requires the following mods to function

toes-NoNameFix-1.0.0 icon
toes-NoNameFix

Hotfix for annoying no-name chat bug, by Toes & Balls

Preferred version: 1.0.0

README

Toes.Socks

WebFishing development library

About

Socks is an evolving (work-in-progress) development library for GDWeave mods. Our motivation publishing this library is primarily to share these solutions and utilities we've written to address problems we've personally encountered while making mods, with the hopes you might be able to spend more time focused on fun than overcoming technical roadblocks.

The Players module is borrowed from BlueberryWolf's but with performance and developer-experience improvements at the cost of being backward-compatible. Nonetheless, you should find Socks.Players will suit your existing needs without many changes. In addition, our modules introduce convenient utilities to make mod building more straightforward. The Socks.Chat module was created to address the naturally opaque and cumbersome process of hooking into the game's chat methods.

Usage

Documentation is generated from comments within the source files. Be sure to check it out!

Example

onready var Players = get_node_or_null("/root/ToesSocks/Players")
onready var Chat = get_node_or_null("/root/ToesSocks/Chat")

func _ready():
	Chat.connect("player_messaged", self, "_on_player_messaged")


func _on_player_messaged(message: String, player_name: String, is_self: bool):
	if is_self: return

	Chat.send("Hi, %s!" % player_name)

Example projects

Help

Please feel free to submit RFC issues with ideas for new utilities or even modules. I can be reached on Discord @toes for discussion, collaboration, or questions. If you need general help building mods, I suggest joining the Webfishing Modding Discord.