Compare commits

..

No commits in common. "74fd6919971ddf545b8191fbcdc830723bef8c5d" and "a4dc190998dd55fece58622bfd2fc1817e6198fa" have entirely different histories.

7 changed files with 33 additions and 412 deletions

View File

@ -1 +0,0 @@
print("Hello Client!")

View File

@ -1,393 +0,0 @@
{
"className": "engine",
"version": "Debug 0.10.0",
"gameCloudId": "",
"children": [
{
"name": "sounds",
"className": "sounds"
},
{
"ambientColour": [
0.92156863212585,
0.92156863212585,
0.92156863212585
],
"className": "graphics",
"name": "graphics",
"clearColour": [
0.21960784494877,
0.21960784494877,
0.258823543787
]
},
{
"children": [
{
"fov": 80,
"position": [
11,
5,
10
],
"className": "camera",
"name": "camera",
"rotation": [
-0.065341390669346,
0.90250700712204,
-0.1477076113224,
-0.39924192428589
]
},
{
"rotation": [
0.54463905096054,
0,
0,
0.83867055177689
],
"position": [
3,
2,
0
],
"power": 1,
"specularColour": [
1,
1,
1
],
"shadowNearClip": 0.2,
"radius": 11,
"shadowFarClip": 1000,
"lumThreshold": 0.01,
"className": "light",
"type": 0,
"shadows": false,
"falloff": 1,
"diffuseColour": [
1,
1,
1
],
"name": "mainLight",
"shadowFarDistance": 500
},
{
"velocity": [
0,
0,
0
],
"rotation": [
0,
0,
0,
1
],
"emissiveColour": [
0,
0,
0
],
"linearFactor": [
1,
1,
1
],
"friction": 0.5,
"mesh": "primitive:cube",
"restitution": 0,
"spinningFriction": 0,
"workshopLocked": true,
"colour": [
0.60000002384186,
0.60000002384186,
0.60000002384186
],
"name": "basePlate",
"roughness": 0,
"size": [
100,
1,
100
],
"position": [
0,
-1,
0
],
"renderQueue": 0,
"physics": true,
"angularFactor": [
1,
1,
1
],
"metalness": 0,
"static": true,
"rollingFriction": 0,
"className": "block",
"linearDamping": 0,
"castsShadows": false,
"angularDamping": 0,
"wireframe": false,
"angularVelocity": [
0,
0,
0
],
"opacity": 1
},
{
"velocity": [
0,
0,
0
],
"rotation": [
0,
0,
0,
1
],
"emissiveColour": [
0,
0,
0
],
"linearFactor": [
1,
1,
1
],
"friction": 0.5,
"mesh": "primitive:cube",
"restitution": 0,
"spinningFriction": 0,
"workshopLocked": false,
"colour": [
1,
0,
0
],
"name": "redBlock",
"roughness": 0,
"size": [
1,
1,
1
],
"position": [
0,
0,
0
],
"renderQueue": 0,
"physics": true,
"angularFactor": [
1,
1,
1
],
"metalness": 0,
"static": true,
"rollingFriction": 0,
"className": "block",
"linearDamping": 0,
"castsShadows": false,
"angularDamping": 0,
"wireframe": false,
"angularVelocity": [
0,
0,
0
],
"opacity": 1
},
{
"velocity": [
0,
0,
0
],
"rotation": [
0,
0.70710676908493,
0,
0.70710676908493
],
"emissiveColour": [
0,
0,
0
],
"linearFactor": [
1,
1,
1
],
"friction": 0.5,
"mesh": "primitive:wedge",
"restitution": 0,
"spinningFriction": 0,
"workshopLocked": false,
"colour": [
0,
1,
0
],
"name": "greenBlock",
"roughness": 0,
"size": [
1,
1,
1
],
"position": [
1,
0,
0
],
"renderQueue": 0,
"physics": true,
"angularFactor": [
1,
1,
1
],
"metalness": 0,
"static": true,
"rollingFriction": 0,
"className": "block",
"linearDamping": 0,
"castsShadows": false,
"angularDamping": 0,
"wireframe": false,
"angularVelocity": [
0,
0,
0
],
"opacity": 1
},
{
"velocity": [
0,
0,
0
],
"rotation": [
0,
0,
0,
1
],
"emissiveColour": [
0,
0,
0
],
"linearFactor": [
1,
1,
1
],
"friction": 0.5,
"mesh": "primitive:sphere",
"restitution": 0,
"spinningFriction": 0,
"workshopLocked": false,
"colour": [
0,
0,
1
],
"name": "blueBlock",
"roughness": 0,
"size": [
1,
1,
1
],
"position": [
0.5,
1,
0
],
"renderQueue": 0,
"physics": true,
"angularFactor": [
1,
1,
1
],
"metalness": 0,
"static": true,
"rollingFriction": 0,
"className": "block",
"linearDamping": 0,
"castsShadows": false,
"angularDamping": 0,
"wireframe": false,
"angularVelocity": [
0,
0,
0
],
"opacity": 1
}
],
"className": "workspace",
"name": "workspace"
},
{
"children": [
{
"children": [
{
"children": [
{
"autoRun": true,
"className": "script",
"source": "require('tevgit:demos/multiplayer/client.lua')",
"name": "clientLoader"
}
],
"name": "client",
"className": "luaClientFolder"
},
{
"children": [
{
"autoRun": true,
"className": "script",
"source": "require('tevgit:demos/multiplayer/server.lua')",
"name": "serverLoader"
}
],
"className": "luaServerFolder",
"name": "server"
},
{
"name": "shared",
"className": "luaSharedFolder"
}
],
"disableDefaultLoaders": true,
"className": "luaFolder",
"name": "lua"
}
],
"className": "assetsFolder",
"name": "assets"
},
{
"name": "interface",
"className": "interface"
}
],
"savedBy": "Jay",
"name": "teverse",
"signature": "unsigned"
}

View File

@ -1 +0,0 @@
print("Hello Server!")

View File

@ -8,7 +8,6 @@ local boundingBox = engine.construct("block", workspace, {
static = true,
physics = false,
workshopLocked = true,
doNotSerialise = true,
position = vector3(0, -100, 0)
})

View File

@ -9,12 +9,13 @@ local ui = require("tevgit:workshop/controllers/ui/core/ui.lua")
-- use a table of two icons,
-- [1] will be unexpanded and [2] will be used when the obj is expanded.
local overridingIcons = {
script = "fa:s-file-code",
scriptSource = "fa:s-file-code",
scriptContainer = "fa:s-microchip",
input = {"fa:s-keyboard", "fa:r-keyboard"},
debug = "fa:s-bug",
light = "fa:s-lightbulb",
block = "fa:s-cube",
camera = "fa:s-camera",
camera = "fa:s-camera"
}
-- dictionary of buttons to their corrosponding objects.
@ -67,7 +68,7 @@ local function updatePositions(frame)
else
-- object has no children
frame.icon.texture = regularIconWithOutChildren
frame.icon.imageAlpha = 0.5
frame.icon.imageAlpha = .2
frame.textAlpha = .6
frame.fontFile = "local:OpenSans-Regular.ttf"
end
@ -75,7 +76,7 @@ local function updatePositions(frame)
-- object is expanded
frame.textAlpha = 0.6
frame.fontFile = "local:OpenSans-Regular.ttf"
frame.icon.imageAlpha = 0.75
frame.icon.imageAlpha = 0.4
frame.icon.texture = expandedIcon
end
@ -187,9 +188,8 @@ local function createHierarchyButton(object, guiParent)
btn:once("destroying", function() childAddedEvent:disconnect() end)
if object:isA("luaSharedFolder")
or object:isA("luaServerFolder")
or object:isA("luaClientFolder") then
if object:isA("luaSharedFolder") or object:isA("luaServerFolder") or
object:isA("luaClientFolder") then
context.bind(btn, {
{name = "Add Script", callback = function() engine.construct("script", object) end}
})
@ -200,10 +200,10 @@ local function createHierarchyButton(object, guiParent)
end
controller.window = ui.window(shared.workshop.interface, "Hierarchy",
guiCoord(0, 260, 0, 400), -- size
guiCoord(1, -260, 0.75, -25), -- pos
true, -- dockable
true -- hidable
guiCoord(0, 260, 0, 400), -- size
guiCoord(1, -260, 0.75, -25), -- pos
true, -- dockable
true -- hidable
)
controller.window.visible = true

View File

@ -189,6 +189,26 @@ createInputs = {
return container
end,
scriptSource = function(instance, property, value)
local container = createInputs.default(value, pType, readOnly)
local presetSelect = ui.create("guiTextBox", container, {
size = guiCoord(1, -4, 0, 16),
position = guiCoord(0, 2, 0, 2),
borderRadius = 3,
text = "Edit Source",
fontSize = 16,
align = enums.align.middle,
backgroundAlpha = 0.75
}, "primary")
presetSelect:mouseLeftReleased(function ()
if instance[property] then
instance[property]:editExternal()
end
end)
return container
end,
string = function(instance, property, value)
local container = createInputs.default(value, pType, readOnly)
@ -196,15 +216,13 @@ createInputs = {
backgroundAlpha = 0.25,
readOnly = false,
multiline = false,
wrapped = true,
fontSize = 18,
name = "input",
size = guiCoord(1, -4, 0, 18),
position = guiCoord(0, 2, 0, 1),
text = "text input",
align = enums.align.middleLeft,
zIndex = 2,
cropChildren = true
zIndex = 2
}, "primary")
x:textInput(function ()

View File

@ -37,8 +37,7 @@ local function alphabeticalSorter(a, b) return a.property < b.property end
local excludePropertyList = {
physics = true, -- letting user changes this will break raycasts
doNotSerialise = true,
source = true
doNotSerialise = true
}
function controller.generateProperties()