Added First Login help + Glow

This commit is contained in:
MasterGordon 2018-07-19 15:47:16 +02:00
parent 425932ca60
commit ca8f9bb9ad
9 changed files with 527 additions and 498 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
php/mysqldata.php
/nbproject/private/

View File

@ -20,16 +20,16 @@
<body id="body">
<div id="login">
<img class="logo" draggable="false" src="images/logo.svg"><br><br>
<p>Username:</p><input class="form" id="login_username"></input><br><br>
<p>Password:</p><input class="form" id="login_password" type="password"></input><br><br>
<p>Username:</p><input class="form" id="login_username"><br><br>
<p>Password:</p><input class="form" id="login_password" type="password"><br><br>
<button class="form" id="login_button">Login</button>
<p class="change">Register?</p>
</div>
<div id="register">
<img class="logo" draggable="false" src="images/logo.svg"><br><br>
<p>Username:</p><input class="form" id="register_username"></input><br><br>
<p>Password:</p><input class="form" id="register_password1" type="password"></input><br><br>
<p>Repeat Password:</p><input class="form" id="register_password2" type="password"></input><br><br>
<p>Username:</p><input class="form" id="register_username"><br><br>
<p>Password:</p><input class="form" id="register_password1" type="password"><br><br>
<p>Repeat Password:</p><input class="form" id="register_password2" type="password"><br><br>
<button class="form" id="register_button">Register</button>
<p class="change">Login?</p>
</div>

View File

@ -44,8 +44,13 @@ $(document).ready(function() {
})
})
$.get("php/playerdata.php", function (data) {
try {
if (JSON.parse(data).status == "nologin")
window.location.replace("index.html")
} catch (err) {
mode = "help"
$('#help').fadeIn(200)
}
})
loadGameData()
loadItems()
@ -445,7 +450,8 @@ function prepairRender() {
if ($(this).attr("id").startsWith("itemBig_"))
if (id < itemId.length) {
id = itemId[id]
} else return
} else
return
hoverTooltip = true
$('#tooltip').text(lang.items[id] + " (" + formatCount(items[id].value) + " " + lang.money + ")")
$('#tooltip').show()
@ -504,6 +510,10 @@ function drawInfoBar() {
selectedX = 3
} else if (mode == "selectFactory") {
selectedX = 8
}else if (mode == "help") {
selectedX = 5
}else if (mode == "oretiers") {
selectedX = 6
}
if (selectedX != -1) {

View File

@ -1,32 +1,32 @@
"bauxite"
"beryllium"
"lead"
"chrome"
"diamonds"
"iron"
"naturalgas"
"oil"
"gold"
"kaolin"
"cobalt"
"coal"
"copper"
"lithium"
"magnesium"
"manganese"
"molybdenum"
"nickel"
"phosphate"
"platinum"
"potash"
"rubies"
"silver"
"soda"
"tantalum"
"titanium"
"uranium"
"vanadium"
"tungsten"
"zinc"
"tin"
"salt"
["bauxite",
"beryllium",
"lead",
"chrome",
"diamonds",
"iron",
"naturalgas",
"oil",
"gold",
"kaolin",
"cobalt",
"coal",
"copper",
"lithium",
"magnesium",
"manganese",
"molybdenum",
"nickel",
"phosphate",
"platinum",
"potash",
"rubies",
"silver",
"soda",
"tantalum",
"titanium",
"uranium",
"vanadium",
"tungsten",
"zinc",
"tin",
"salt"]

View File

@ -980,7 +980,7 @@ class TeleporterInput extends Tile {
this.frequency = 0
this.cost = [{
"id": 0,
"count": 50
"count": 50000
}]
this.texture = {
"0": ["teleporter00", "teleporter01", "teleporter02", "teleporter03", "teleporter04", "teleporter06", "teleporter07", "teleporter08", "teleporter09"],
@ -1028,10 +1028,10 @@ class TeleporterOutput extends Tile {
this.frequency = 0
this.cost = [{
"id": 0,
"count": 50
"count": 100000
}]
this.texture = {
"0": ["teleporterout01", "teleporterout02", "teleporterout03", "teleporterout04", "teleporterout05", "teleporterout06", "teleporterout07", "teleporterout08", "teleporterout09"],
"0": ["teleporterout09", "teleporterout01", "teleporterout02", "teleporterout03", "teleporterout04", "teleporterout05", "teleporterout06", "teleporterout07", "teleporterout08"],
"1": []
}
this.options = [{

View File

@ -104,15 +104,15 @@
}
},
"teleporterinput": {
"name": "teleporterinput",
"description": "Puts a selected Item to the left and all other straight.",
"name": "Teleporter (input)",
"description": "Teleports items to a Teleporter (output) with the same frequency.",
"options": {
"frequency": "Frequency"
}
},
"teleporteroutput": {
"name": "teleporteroutput",
"description": "Puts a selected Item to the left and all other straight.",
"name": "Teleporter (output)",
"description": "Recieves items from a Teleporter (input) with the same frequency.",
"options": {
"frequency": "Frequency"
}

View File

@ -0,0 +1,3 @@
file.reference.factory-Factory=.
files.encoding=UTF-8
site.root.folder=${file.reference.factory-Factory}

9
nbproject/project.xml Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.web.clientproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/clientside-project/1">
<name>Factory</name>
</data>
</configuration>
</project>

6
php/database.php Normal file
View File

@ -0,0 +1,6 @@
CREATE TABLE `users` (
`username` text NOT NULL,
`password` text NOT NULL,
`gamedata` mediumtext,
`gametime` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;