Add File-Overview comments, move out of place comments

This commit is contained in:
VegaZ
2018-09-19 15:57:10 +02:00
parent 5a816c4201
commit d548a612ff
17 changed files with 101 additions and 62 deletions

View File

@@ -1,4 +1,9 @@
<!DOCTYPE html>
<!--
* @overview Life of German Reallife - Login Login login.html
* @author Orangebox, VegaZ
* @copyright (c) 2008 - 2018 Life of German
*-->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

View File

@@ -1,4 +1,10 @@
$('#loginBtn').click(() => {
/**
* @overview Life of German Reallife - Login Login login.js
* @author VegaZ
* @copyright (c) 2008 - 2018 Life of German
*/
$('#loginBtn').click(() => {
$('.alert').remove(); //Remove any alerts when we attempt to login/register
mp.trigger('loginInformationToServer', $('#usernameInputLogin').val(), $('#passwordInputLogin').val());
});

View File

@@ -1,4 +1,9 @@
var loginBrowser = mp.browsers.new('package://Login/login.html');
/**
* @overview Life of German Reallife - Login Main main.js
* @author VegaZ
* @copyright (c) 2008 - 2018 Life of German
*/
var loginBrowser = mp.browsers.new('package://Login/login.html');
mp.gui.cursor.show(true, true);
mp.events.add('loginInformationToServer', (username, password) => {

View File

@@ -1,4 +1,10 @@
.login-page {
/**
* @overview Life of German Reallife - Login CSS style.css
* @author Orangebox
* @copyright (c) 2008 - 2018 Life of German
*/
.login-page {
width: 360px;
margin: auto;
}

View File

@@ -1 +1,7 @@
/**
* @overview Life of German Reallife - Login index.js
* @author VegaZ
* @copyright (c) 2008 - 2018 Life of German
*/
require('./Login/main.js');

12
Main.cs
View File

@@ -1,15 +1,17 @@
using System;
using GTANetworkAPI;
/**
* @overview Life of German Reallife - Main Class (Main.cs)
* @author VegaZ, hydrant
* @copyright (c) 2008 - 2018 Life of German
*/
namespace reallife_gamemode
{
public class Main : Script
{
/**
* @overview Life of German Reallife - Main Class (Main.cs)
* @author VegaZ, hydrant
* @copyright (c) 2008 - 2018 Life of German
*/
[ServerEvent(Event.ResourceStart)]
public void OnResourceStart()

View File

@@ -1,15 +1,15 @@
/**
* @overview Life of German Reallife - DatabaseContext.cs
* @author VegaZ
* @copyright (c) 2008 - 2018 Life of German
*/
using System;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;
/**
* @overview Life of German Reallife - DatabaseContext.cs
* @author VegaZ
* @copyright (c) 2008 - 2018 Life of German
*/
namespace reallife_gamemode.Model
{
public partial class DatabaseContext : DbContext
@@ -35,6 +35,5 @@ namespace reallife_gamemode.Model
}
public DbSet<Server.Entities.User> Users { get; set; }
public DbSet<Server.Entities.Character> Characters { get; set; }
}
}

View File

@@ -6,16 +6,16 @@ using reallife_gamemode.Server.Extensions;
using reallife_gamemode.Server.Services;
using reallife_gamemode.Server.Util;
/**
* @overview Life of German Reallife - Admin Commands (Admin.cs)
* @author VegaZ, hydrant
* @copyright (c) 2008 - 2018 Life of German
*/
namespace reallife_gamemode.Server.Commands
{
public class Admin : Script
{
/**
* @overview Life of German Reallife - Admin Commands (Admin.cs)
* @author VegaZ, hydrant
* @copyright (c) 2008 - 2018 Life of German
*/
[Command("o", "~m~Benutzung: ~s~/o [Nachricht]", GreedyArg = true)]
public void CmdAdminO(Client player, string message)
{

View File

@@ -1,16 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
namespace reallife_gamemode.Server.Entities
{
public class Character
{
[Key]
public int Id { get; set; }
public int UserId { get; set; }
public string Name { get; set; }
public byte Gender { get; set; }
}
}

View File

@@ -5,6 +5,12 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
/**
* @overview Life of German Reallife - Entities User (User.cs)
* @author VegaZ, hydrant
* @copyright (c) 2008 - 2018 Life of German
*/
namespace reallife_gamemode.Server.Entities
{
public class User

View File

@@ -7,6 +7,12 @@ using Microsoft.EntityFrameworkCore;
using reallife_gamemode.Model;
using reallife_gamemode.Server.Entities;
/**
* @overview Life of German Reallife - Event Login (Login.cs)
* @author VegaZ
* @copyright (c) 2008 - 2018 Life of German
*/
namespace reallife_gamemode.Server.Events
{
class Connect : Script

View File

@@ -3,6 +3,12 @@ using System.Collections.Generic;
using System.Text;
using GTANetworkAPI;
/**
* @overview Life of German Reallife - Event Login (Login.cs)
* @author VegaZ
* @copyright (c) 2008 - 2018 Life of German
*/
namespace reallife_gamemode.Server.Events
{
public class Login : Script

View File

@@ -6,6 +6,12 @@ using GTANetworkAPI;
using GTANetworkMethods;
using reallife_gamemode.Model;
/**
* @overview Life of German Reallife - Event Spawn (Spawn.cs)
* @author VegaZ
* @copyright (c) 2008 - 2018 Life of German
*/
namespace reallife_gamemode.Server.Event
{
public class Spawn : Script

View File

@@ -6,16 +6,16 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
/**
* @overview Life of German Reallife - Client Extension (ClientExtension.cs)
* @author VegaZ, hydrant
* @copyright (c) 2008 - 2018 Life of German
*/
namespace reallife_gamemode.Server.Extensions
{
public static class ClientExtension
{
/**
* @overview Life of German Reallife - Client Extension (ClientExtension.cs)
* @author VegaZ, hydrant
* @copyright (c) 2008 - 2018 Life of German
*/
public static User GetUser(this Client client)
{
using(DatabaseContext dbContext = new DatabaseContext())

View File

@@ -3,16 +3,16 @@ using System;
using System.Collections.Generic;
using System.Text;
/**
* @overview Life of German Reallife - Chat Service (ChatService.cs)
* @author hydrant
* @copyright (c) 2008 - 2018 Life of German
*/
namespace reallife_gamemode.Server.Services
{
class ChatService
{
/**
* @overview Life of German Reallife - Chat Service (ChatService.cs)
* @author hydrant
* @copyright (c) 2008 - 2018 Life of German
*/
public static void NotAuthorized(Client player)
{
player.SendChatMessage("~r~[FEHLER]~s~ Du kannst diesen Befehl nicht ausführen.");

View File

@@ -3,16 +3,16 @@ using System;
using System.Collections.Generic;
using System.Text;
/**
* @overview Life of German Reallife - Client Service (ClientService.cs)
* @author hydrant
* @copyright (c) 2008 - 2018 Life of German
*/
namespace reallife_gamemode.Server.Services
{
class ClientService
{
/**
* @overview Life of German Reallife - Client Service (ClientService.cs)
* @author hydrant
* @copyright (c) 2008 - 2018 Life of German
*/
public static Client GetClientByName(string name)
{
/* Funktionsaufbau: Prüft erst, ob ein Spieler mit exakt diesem Namen online ist

View File

@@ -2,15 +2,17 @@
using System.Collections.Generic;
using System.Text;
/**
* @overview Life of German Reallife - Admin Levels (AdminLevel.cs)
* @author VegaZ, hydrant
* @copyright (c) 2008 - 2018 Life of German
*/
namespace reallife_gamemode.Server.Util
{
public enum AdminLevel : int
{
/**
* @overview Life of German Reallife - Admin Levels (AdminLevel.cs)
* @author VegaZ, hydrant
* @copyright (c) 2008 - 2018 Life of German
*/
PLAYER,
SUPPORTER,