Skip to content

Commit

Permalink
chore: Add type annotations where sensible (#190)
Browse files Browse the repository at this point in the history
Closes #185
  • Loading branch information
elementbound authored Jan 28, 2024
1 parent cc57a77 commit d24a57f
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion addons/netfox.extras/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
name="netfox.extras"
description="Game-specific utilities for Netfox"
author="Tamas Galffy"
version="1.1.1"
version="1.1.2"
script="netfox-extras.gd"
2 changes: 1 addition & 1 deletion addons/netfox.internals/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
name="netfox.internals"
description="Shared internals for netfox addons"
author="Tamas Galffy"
version="1.1.1"
version="1.1.2"
script="plugin.gd"
4 changes: 2 additions & 2 deletions addons/netfox.noray/noray.gd
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ extends Node
var _peer: StreamPeerTCP = StreamPeerTCP.new()
var _protocol: NorayProtocolHandler = NorayProtocolHandler.new()
var _address: String = ""
var _oid = ""
var _pid = ""
var _oid: String = ""
var _pid: String = ""
var _local_port: int = -1

static var _logger: _NetfoxLogger = _NetfoxLogger.for_noray("Noray")
Expand Down
2 changes: 1 addition & 1 deletion addons/netfox.noray/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
name="netfox.noray"
description="Bulletproof your connectivity with noray integration for netfox"
author="Tamas Galffy"
version="1.1.1"
version="1.1.2"
script="netfox-noray.gd"
2 changes: 1 addition & 1 deletion addons/netfox.noray/protocol-handler.gd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class_name NorayProtocolHandler
## Emitted for every command parsed during a [method ingest] call.
signal on_command(command: String, data: String)

var _strbuf = ""
var _strbuf: String = ""

## Resets the parser.
func reset():
Expand Down
4 changes: 2 additions & 2 deletions addons/netfox/network-time.gd
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,9 @@ var _local_tick: int = 0

# Cache the synced clients, as the rpc call itself may arrive multiple times
# ( for some reason? )
var _synced_clients = {}
var _synced_clients: Dictionary = {}

static var _logger = _NetfoxLogger.for_netfox("NetworkTime")
static var _logger: _NetfoxLogger = _NetfoxLogger.for_netfox("NetworkTime")

## Start NetworkTime.
##
Expand Down
2 changes: 1 addition & 1 deletion addons/netfox/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
name="netfox"
description="Shared internals for netfox addons"
author="Tamas Galffy"
version="1.1.1"
version="1.1.2"
script="netfox.gd"
2 changes: 1 addition & 1 deletion addons/netfox/rollback/network-rollback.gd
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ signal on_record_tick(tick: int)
signal after_loop()

var _tick: int = 0
var _resim_from = INF
var _resim_from: int

var _is_rollback: bool = false
var _simulated_nodes: Dictionary = {}
Expand Down
2 changes: 1 addition & 1 deletion addons/netfox/rollback/rollback-freshness-store.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class_name RollbackFreshnessStore
## This class tracks nodes and whether they have processed any given tick during
## a rollback.

var _data = {}
var _data: Dictionary = {}

func is_fresh(node: Node, tick: int) -> bool:
if not _data.has(tick):
Expand Down
8 changes: 4 additions & 4 deletions addons/netfox/rollback/rollback-synchronizer.gd
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ var _auth_state_props: Array[PropertyEntry] = []
var _auth_input_props: Array[PropertyEntry] = []
var _nodes: Array[Node] = []

var _states = {}
var _inputs = {}
var _latest_state = -1
var _earliest_input = INF
var _states: Dictionary = {}
var _inputs: Dictionary = {}
var _latest_state: int = -1
var _earliest_input: int

var _property_cache: PropertyCache
var _freshness_store: RollbackFreshnessStore
Expand Down

0 comments on commit d24a57f

Please sign in to comment.