Skip to content

Commit

Permalink
Adding scaling to prefab spawner
Browse files Browse the repository at this point in the history
  • Loading branch information
TwidgeVR committed Jul 29, 2020
1 parent 4f828de commit 03bc778
Show file tree
Hide file tree
Showing 5 changed files with 339 additions and 204 deletions.
27 changes: 18 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -673,15 +673,18 @@ server.post('/ajax', asyncMid( async( req, res, next ) => {
{
data = message.data
}
let result = ( !!message.data.Exception ) ? 'Fail' : 'OK'
response = {
'result' : result,
'data' : data
}
if ( !responseSent )
if ( data.Command.FullName != 'select.' || req.body.action == "select_prefab" )
{
responseSent = true;
return res.send( response )
let result = ( !!message.data.Exception ) ? 'Fail' : 'OK'
response = {
'result' : result,
'data' : data
}
if ( !responseSent )
{
responseSent = true;
return res.send( response )
}
}
}
} else {
Expand Down Expand Up @@ -775,6 +778,12 @@ server.post('/ajax', asyncMid( async( req, res, next ) => {
await getConnection(req).send( command )
return;

case "select_tostring":
console.log( "select tostring" )
command = "select tostring"
await getConnection(req).send( command )
return;

case "post_prefab":
if ( !!req.body.player && !!req.body.hash )
{
Expand Down Expand Up @@ -828,7 +837,7 @@ server.post('/ajax', asyncMid( async( req, res, next ) => {
{
await getConnection(req).send("select "+ req.body.selectedPrefabId)
}
await getConnection(req).send( command )
await getConnection(req).send( command )
return;

case "get_server_config":
Expand Down
Loading

0 comments on commit 03bc778

Please sign in to comment.