Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxinger15 committed Dec 25, 2020
0 parents commit 140baa2
Show file tree
Hide file tree
Showing 23 changed files with 18,586 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# vu-serverdescription

## Paste **your** markdown string in the ext > client > readme.lua file
Make sure that there are no blank spaces on the left of your markdown rows or the parser wouldn't display
your markdown string correctly

If someone wan't to add the ability to load the markdown from venice-rcon will I be very grateful :blush:

<img src="./github_styles/example.png" width="854" height="480"/>
36 changes: 36 additions & 0 deletions ext/client/__init__.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
local readme = require("readme.lua")

Events:Subscribe(
"Player:Connected",
function(player)
if player.id == PlayerManager:GetLocalPlayer().id then
WebUI:Init()
WebUI:ExecuteJS(
'document.dispatchEvent(new CustomEvent("serverdiscription:UI:markdown",{detail:' ..
json.encode(readme) .. "}))"
)
WebUI:Show()
end
end
)

Hooks:Install(
"UI:PushScreen",
1,
function(hook, screen, priority, parentGraph, stateNodeGuid)
local screen = UIGraphAsset(screen)
if screen.name == "UI/Flow/Screen/EORWinningTeamScreen" then
WebUI:Hide()
end

if screen.name == "UI/Flow/Screen/SpawnScreenPC" then
WebUI:Show()
end
end
)

Events:Subscribe('Player:Respawn', function(player)
if player.id == PlayerManager:GetLocalPlayer().id then
WebUI:Hide()
end
end)
14 changes: 14 additions & 0 deletions ext/client/readme.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
local readme = [[
### Join all Conquest Classics by Maxinger15
There you get a well configured server.
### Another one
Hey serveradmin. You are one of thousands who didn't read the readme.md
Please remember for the future to read the readme.md before you install a mod
and have a look if you have to configure something.
Thank you!!!
]]


return readme
Binary file added github_styles/example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions mod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Name": "vu-serverdescription",
"Description": "Renders a readme in the spawnscreen",
"Version": "1.0.0",
"HasVeniceEXT": true,
"HasWebUI": true,
"Dependencies": {
"veniceext": "^1.0.0"
}
}
Loading

0 comments on commit 140baa2

Please sign in to comment.