Skip to content
Open
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
34 changes: 34 additions & 0 deletions src/Custom Assetbundle.0a61c6.ttslua
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ function updateSettings()
queues(nil, Global.call("getQueue") == true and "True" or "False")
switcher(nil, Global.call("getSwitcher") == true and "True" or "False")
tilting(nil, Global.call("getTilting") == true and "True" or "False")
multivoting(nil, Global.call("getMultivoting") == true and "True" or "False")
--afk(player)
--afkTime(player)
timer(nil, Global.call("getTimer") == true and "True" or "False")
Expand Down Expand Up @@ -343,6 +344,39 @@ function tilting(player, enabled)
self.UI.setAttribute("tilting", "isOn", toboolean(enabled))
end

function multivoting(player, enabled)
if player ~= nil and not player.admin then
self.UI.setAttribute("multivoting", "isOn", self.UI.getAttribute("multivoting", "isOn"))
player.broadcast("[a020f0]» [da1918]ERROR: [ffffff]Only promoted players may change game settings! [a020f0]«")
return
end

-- Handle in the Global script
Global.call("setMultivoting", toboolean(enabled))

-- Update the view for everyone
self.UI.setAttribute("multivoting", "isOn", toboolean(enabled))

-- Put or remove multivoting message on the table
if toboolean(enabled) then
local text = spawnObject({
position = {x=0, y=0.961133063, z=-4.9},
rotation = {90.0,0,0.0},
type = "3DText"
})
text.TextTool.setValue("MULTIVOTING ENABLED")
text.TextTool.setFontColor("Orange")
text.TextTool.setFontSize(80)
else
for _, o in pairs(getObjects()) do
if o.type == "3D Text" and o.TextTool.getValue() == "MULTIVOTING ENABLED" then
o.destruct()
end
end
end

end

function afk(player)
if player ~= nil and not player.admin then
self.UI.setAttribute("afk", "isOn", self.UI.getAttribute("afk", "isOn"))
Expand Down
5 changes: 5 additions & 0 deletions src/Custom Assetbundle.0a61c6.xml
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,11 @@
<Cell><Toggle id="tilting" class="settingToggle" isOn="false" onValueChanged="tilting()"></Toggle></Cell>
</Row>

<Row class="settingRow">
<Cell><Text class="settingText">Multiple Votes Per Player</Text></Cell>
<Cell><Toggle id="multivoting" class="settingToggle" isOn="false" onValueChanged="multivoting()"></Toggle></Cell>
</Row>

<Row class="subcategoryRow">
<Text class="subcategoryText">AFK Settings</Text>
</Row>
Expand Down
Loading