summaryrefslogtreecommitdiffstats
path: root/cwd/assets
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2021-07-06 15:00:50 +0200
committerGitHub <noreply@github.com>2021-07-06 15:00:50 +0200
commit4354b1b85b92e378ac0ea7c542edc033c6abdaff (patch)
tree4e2fa2a75f76778b1982a84c5a17d8d8744dd078 /cwd/assets
parentMerge pull request #66 from LaG1924/ftr/more-rmlui (diff)
parentAdded disconnect messages (diff)
downloadAltCraft-build-3.tar
AltCraft-build-3.tar.gz
AltCraft-build-3.tar.bz2
AltCraft-build-3.tar.lz
AltCraft-build-3.tar.xz
AltCraft-build-3.tar.zst
AltCraft-build-3.zip
Diffstat (limited to 'cwd/assets')
-rw-r--r--cwd/assets/altcraft/scripts/init.lua11
-rw-r--r--cwd/assets/altcraft/shaders/vert/face.vs2
2 files changed, 12 insertions, 1 deletions
diff --git a/cwd/assets/altcraft/scripts/init.lua b/cwd/assets/altcraft/scripts/init.lua
index b60a988..c938e94 100644
--- a/cwd/assets/altcraft/scripts/init.lua
+++ b/cwd/assets/altcraft/scripts/init.lua
@@ -7,6 +7,7 @@ local plugin = {
onTick = nil,
onRequestBlockInfo = nil,
onChatMessage = nil,
+ onDisconnected = nil,
}
function plugin.onLoad ()
@@ -104,6 +105,16 @@ function plugin.onChatMessage(chat, pos)
MoveChatToBottom = true
end
+function plugin.onDisconnected(reason)
+ local mmDoc = {}
+ for i,d in ipairs(rmlui.contexts["default"].documents) do
+ if d.title == "MainMenu" then
+ mmDoc = d
+ end
+ end
+ mmDoc:GetElementById('disclaimer').inner_rml = reason
+end
+
AC.RegisterDimension(0, Dimension.new("overworld", true))
AC.RegisterDimension(-1, Dimension.new("the_nether", false))
AC.RegisterDimension(1, Dimension.new("the_end", false))
diff --git a/cwd/assets/altcraft/shaders/vert/face.vs b/cwd/assets/altcraft/shaders/vert/face.vs
index 469ea94..93e623d 100644
--- a/cwd/assets/altcraft/shaders/vert/face.vs
+++ b/cwd/assets/altcraft/shaders/vert/face.vs
@@ -23,5 +23,5 @@ void main() {
vs_out.Texture.y -= (uv[2].y - uv[0].y) * trunc(mod(GlobalTime * 4.0f, animation));
float faceLight = clamp(light.x / 15.0 + (light.y / 15.0) * DayTime, MinLightLevel, 1.0);
- vs_out.Color = mix(color.rgb * faceLight, vec3(1,1,1) * faceLight, (color == vec3(0,0,0)));
+ vs_out.Color = mix(color.rgb * faceLight, vec3(1,1,1) * faceLight, float(color == vec3(0,0,0)));
}