You are viewing a potentially older version of this package.
View all versions.
Socks
| Date uploaded | 10 months ago |
| Version | 0.999.0 |
| Download link | toes-Socks-0.999.0.zip |
| Downloads | 572 |
| Dependency string | toes-Socks-0.999.0 |
This mod requires the following mods to function
README
Socks
Sockpuppet pixel art by okayo top hat
Socks is the best library for Webfishing modders writing 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.
You may also like to check out Better Webfishing Mod Template for a template/guide to making patch mods that write over the game's code.
## Example Usage of building a mod with Socks
onready var Players = get_node("/root/ToesSocks/Players")
onready var Chat = get_node("/root/ToesSocks/Chat")
var currently_worn_hat := "hat_none"
var is_lobby_owner := false
func _ready():
Chat.connect("player_messaged", self, "_on_player_messaged")
Players.connect("ingame", self, "_on_ingame")
Players.connect("outgame", self, "_on_outgame")
func _on_player_messaged(message: String, player_name: String, is_self: bool):
if is_self: return
Chat.send("Hi, %s!" % player_name)
func _on_ingame() -> void:
# Initialize mod, once we are in-game
currently_worn_hat = Players.get_cosmetics()["hat"]
is_lobby_owner = Players.local_player == Players.get_lobby_owner()
func _on_outgame() -> void:
# Teardown in prep for next lobby
currently_worn_hat = "hat_none"
is_lobby_owner = false
Modules
GDScriptify has started breaking when generating our docs - forgive our outdated docs in the meantime until we fix that...
Chat
Players
Hotkeys
# tablecopter.gd
var enabled := false
func _ready():
# T Hotkey
var toggle_signal_name = Hotkeys.add(
{"name": "toggle_tablecopter", "label": "Toggle Tablecopter", "key_code": KEY_T, "repeat": false }
)
Hotkeys.connect(toggle_signal_name, self, "_handle_toggle")
# CTRL+T Hotkey
var mode_toggle_signal_name = Hotkeys.add(
{"name": HOTKEY_NAME + "_mode", "label": HOTKEY_LABEL + " Mode", "key_code": KEY_T, "repeat": false, "modifiers": ["control"] }
)
Hotkeys.connect(mode_toggle_signal_name, self, "_handle_mode_toggle")
func _handle_toggle():
enabled = !enabled
See Hotkey Configuration Documentation for all hotkey options
Example projects
📚 Project Links
CHANGELOG
Changelog
v0.1001.5
- Changed Socks modules to load as early as possible during
_inithook rather than_ready - Fixed issue rebinding hotkeys with modifiers
- Added/fixed handling of hotkeys.json should the file become corrupted
v0.1001.3
Happy Holidays ☃️
No changes
v0.1001.1
Happy Thanksgiving 🦃
No changes
v0.1001.00
Fixes regression in Chat module player-name parsing that was introduced in LucysLib compatibility changes
v0.1000.13
Happy Halloween 🦇
No changes
v0.1000.0
- Add: Chat `player_emoted signal
- Enhanced reliability of
ingameandoutgamesignals- This is potentially a breaking change if your mod relies on inconsistent behavior
- Added new
Playerssignalat_main_menu - Fixed
Players.get_lobby_ownerthrowing assertion errors if there was noActorassigned to the host- This is potentially a breaking change as it now explicitly returns
null(safely)
- This is potentially a breaking change as it now explicitly returns
v0.999.1 - Misc
- Hotfixed
skip_if_busyhotkey option not saving - Added Players.is_ignored to replace Players.is_player_ignored
- Changed Players.is_ignored to check and consider if the player has been ignored/blocked through Steam
v0.999.0 - New Socks.Hotkeys module
- Version 1 pre-release build
v0.5.0
- New
Chat.send_letterwrapper method
v0.4.0
- New
outgamesignal emitted from Players- You can use this like
ingameinstead of testing for the existence ofPlayers.local_playeretc
- You can use this like
- Fixed
Players.in_gamewas never properly reset to false after leaving a game- We'd sorta never ended up using this, personally, and honestly forgot about it until now, sorry!
v0.3.3
- Hotfixed URI messages causing crash; sorry!
- This happened because of an infinite loop! Link messages would trigger another link and so on.
- Fixed this by adding a negative-lookahead to the match to exclude messages with BBCode
[url=example.com]link[/url]
v0.3.2
- Hotfixed Chat module issues caused by recent LucyTools update/conflict causing messages to include unexpected BBCode
v0.3.1
- Hotfixed issue with URIs not being detected due to presence of BBCode in messages (LucyTools mod conflict)
v0.3.0
- New Socks.Utils module
- Added Players.get_lobby_owner for retrieving the current lobby's host
- Changed Players methods to default to the local player when appropriate:
- get_username
- get_title
- get_id
- get_chat_color
- get_position
- Chat links should now open in your browser rather than within the Steam overlay
- Opening Discord links will now require viewing a safety warning and confirmation from the user
v0.2.7
- Fixes
Recently Seen PlayersSteam integration. Now everyone you meet in lobbies will be listed in your Game Overview > Recent Players UI.
v0.2.6
- Hotfix Players.chat
v0.2.5
- Added Players.is_player_ignored helpers for checking if a player has been muted or blocked
v0.2.4
- Links will now generate for URL's in messages even when the message contains other preceding text
- System messages (e.g., MOTD) will now also generate clickable
[LINK]s
v0.2.1
- Added clickable links for URLs pasted into game chat
v0.2.0
- Fixed
player_removedevent not emitting as expected - Dependency on NoNameFix changed to v1.0.0
v0.1.99
New Socks.Chat methods
get_all,get_chatbox
New Socks.Players methods
Players.get_chat_colorPlayers.get_namesPlayers.find