Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions zap/src/output/luau/base.luau
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")

local outgoing_buff: buffer
local outgoing_used: number
local outgoing_size: number
Expand Down
4 changes: 2 additions & 2 deletions zap/src/output/luau/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1467,6 +1467,8 @@ impl<'src> ClientOutput<'src> {
pub fn output(mut self) -> String {
self.push_file_header("Client");

self.push_check_server();

self.push_remote_scope_validation();

if self.config.namespaces.is_empty() {
Expand All @@ -1478,8 +1480,6 @@ impl<'src> ClientOutput<'src> {

self.push_studio();

self.push_check_server();

self.push_remotes();

self.push_tydecls();
Expand Down
3 changes: 3 additions & 0 deletions zap/src/output/luau/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ pub trait Output<'src>: ConfigProvider<'src> {
"-- {scope} generated by Zap v{} (https://github.com/red-blox/zap)",
env!("CARGO_PKG_VERSION")
));

self.push_line("local RunService = game:GetService(\"RunService\")");
self.push_line("local ReplicatedStorage = game:GetService(\"ReplicatedStorage\")");
}

fn push_remote_scope_validation(&mut self) {
Expand Down
4 changes: 2 additions & 2 deletions zap/src/output/luau/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1614,6 +1614,8 @@ impl<'src> ServerOutput<'src> {
pub fn output(mut self) -> String {
self.push_file_header("Server");

self.push_check_client();

self.push_remote_scope_validation();

if self.config.namespaces.is_empty() {
Expand All @@ -1625,8 +1627,6 @@ impl<'src> ServerOutput<'src> {

self.push_studio();

self.push_check_client();

self.push_create_remotes();

self.push_player_map();
Expand Down
Loading