From 5b5e78a34f64365f4c0d587b122ba2ae77f0fa1b Mon Sep 17 00:00:00 2001 From: Lukas Moungos Date: Wed, 31 Jul 2019 22:55:16 +0200 Subject: [PATCH] Inventory Improvements Actual --- .../assets/css/inventory/style.css | 75 ++++-- .../assets/html/inventory/handel/script.js | 138 +++++++--- .../assets/html/inventory/index.html | 8 +- .../assets/img/items/aal.svg | 52 ++++ .../assets/img/items/fish.svg | 1 - .../assets/img/items/flounder.svg | 88 +++++++ .../assets/img/items/perch.svg | 82 ++++++ .../assets/img/items/salmon.svg | 70 +++++ .../assets/img/items/tuna.svg | 60 +++++ .../assets/img/items/wood.svg | 1 + .../assets/img/items/zander.svg | 91 +++++++ .../assets/js/inventory/script.js | 239 +++++++++++++----- .../Inventory/Items/Aal.cs | 24 ++ .../Inventory/Items/Barsch.cs | 24 ++ .../Inventory/Items/Lachs.cs | 24 ++ .../Inventory/Items/Thunfisch.cs | 24 ++ .../Inventory/Items/Zander.cs | 24 ++ .../Managers/ManagerOfInventory.cs | 2 - 18 files changed, 894 insertions(+), 133 deletions(-) create mode 100644 ReallifeGamemode.Client/assets/img/items/aal.svg delete mode 100644 ReallifeGamemode.Client/assets/img/items/fish.svg create mode 100644 ReallifeGamemode.Client/assets/img/items/flounder.svg create mode 100644 ReallifeGamemode.Client/assets/img/items/perch.svg create mode 100644 ReallifeGamemode.Client/assets/img/items/salmon.svg create mode 100644 ReallifeGamemode.Client/assets/img/items/tuna.svg create mode 100644 ReallifeGamemode.Client/assets/img/items/wood.svg create mode 100644 ReallifeGamemode.Client/assets/img/items/zander.svg create mode 100644 ReallifeGamemode.Server/Inventory/Items/Aal.cs create mode 100644 ReallifeGamemode.Server/Inventory/Items/Barsch.cs create mode 100644 ReallifeGamemode.Server/Inventory/Items/Lachs.cs create mode 100644 ReallifeGamemode.Server/Inventory/Items/Thunfisch.cs create mode 100644 ReallifeGamemode.Server/Inventory/Items/Zander.cs diff --git a/ReallifeGamemode.Client/assets/css/inventory/style.css b/ReallifeGamemode.Client/assets/css/inventory/style.css index 9ccfa3e0..32a97152 100644 --- a/ReallifeGamemode.Client/assets/css/inventory/style.css +++ b/ReallifeGamemode.Client/assets/css/inventory/style.css @@ -127,18 +127,7 @@ h5 { } .pInvWrapper { - background: rgba(0,0,0,0.4); - height: 395px; - width: 394px; - display: block; - padding: 5px; - position: absolute; - left: 38%; - top: 0; -} - -.pInvWrapper { - background: rgba(0,0,0,0.4); + background: rgba(0,0,0,0.6); height: 395px; width: 394px; display: block; @@ -149,7 +138,7 @@ h5 { } .phanWrapper { - background: rgba(0,0,0,0.4); + background: rgba(0,0,0,0.6); height: 170px; width: 394px; display: block; @@ -158,10 +147,20 @@ h5 { left: 38%; top: 50%; } +.Betrag { + background: rgba(0,0,0,0.6); + height: 100%; + width: 100%; + display: block; + transform: translate(-50%, -50%); + position: absolute; + left: 50%; + top: 50%; +} -#invContainer{ - width: 110%; - height: auto; +#invContainer { + width: 110%; + height: auto; } #handelContainer{ width: 110%; @@ -199,8 +198,8 @@ h5 { .selected { - box-shadow: 0px 0px 6px white; - border: 1px solid yellow; + box-shadow: 0px 0px 6px white; + border: 1px solid yellow; } .common { @@ -212,13 +211,13 @@ h5 { text-shadow: 0 0 0 1px black; } -.uncommon { +.fishes { box-shadow: 0 0 2px 1px #3333ff inset; } - -.uncommon h3 { - color: #3333ff; - text-shadow: 0 0 0 1px black; + +.fishes h3 { + color: #3333ff; + text-shadow: 0 0 0 1px black; } .rare { @@ -284,7 +283,7 @@ h5 { background-color: #313131; /* blau */ border: none; height: 30px; - width: 124px; + width: 100% text-align: center; text-decoration: none; display: inline-block; @@ -293,6 +292,19 @@ h5 { left: 1.5%; color:#ffffff; } +#tf_zahl { + background-color: #313131; /* blau */ + border: none; + height: 30px; + width: 100%; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 12px; + position: relative; + left: 1.5%; + color: #ffffff; +} #tf_name { background-color: #313131; /* blau */ border: none; @@ -324,4 +336,19 @@ h5 { left: 1.5%; color: #ffffff; } +#tf_submitZahl { + background-color: #008CBA; /* blau */ + border: none; + height: 32px; + width: 124px; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 16px; + font-color: white; + position: relative; + left: 1.5%; + color: #ffffff; +} + /* tasks */ \ No newline at end of file diff --git a/ReallifeGamemode.Client/assets/html/inventory/handel/script.js b/ReallifeGamemode.Client/assets/html/inventory/handel/script.js index c3ec1ac4..61ab079c 100644 --- a/ReallifeGamemode.Client/assets/html/inventory/handel/script.js +++ b/ReallifeGamemode.Client/assets/html/inventory/handel/script.js @@ -20,30 +20,18 @@ function setItems(itemIdArr1, itemAmountArr1, money1) { } } - - -var fish = { - name: "Fisch", - weight: 1, - currentWeight: 1, - dropweight: function () { - var randomweight = Math.floor((Math.random() * 10) + 1); - this.weight = randomweight; - this.currentWeight = randomweight; - }, - def: 15, +var holz = { + name: "Holz", rarity: 'common', - statSlots: [], - runes: [], - amount: 1, - usable: 'false', selected: 'false', - stackable: 'false', + usable: 'true', + amount: 1, + currentWeight: 0.65, + stackable: 'true', object: 'true', itemId: 1, - img: 'package://assets/img/items/fish.svg' + img: "package://assets/img/items/wood.svg" } - var hamburger = { name: "Hamburger", rarity: 'common', @@ -56,7 +44,6 @@ var hamburger = { itemId: 2, img: "package://assets/img/items/burger.svg" } - var cocaine = { name: "Koks", rarity: 'common', @@ -69,7 +56,6 @@ var cocaine = { itemId: 3, img: "package://assets/img/items/cocaine.svg" } - var cannabis = { name: "Cannabis", rarity: 'common', @@ -82,10 +68,98 @@ var cannabis = { itemId: 4, img: "package://assets/img/items/cannabis.svg" } +var flunder = { + name: "Flunder", + weight: 7.7, + currentWeight: 1, + rarity: 'fishes', + statSlots: [], + runes: [], + amount: 1, + usable: 'false', + selected: 'false', + stackable: 'false', + object: 'true', + itemId: 5, + img: 'package://assets/img/items/flounder.svg' +} +var aal = { + name: "Aal", + weight: 3.6, + currentWeight: 1, + rarity: 'fishes', + statSlots: [], + runes: [], + amount: 1, + usable: 'false', + selected: 'false', + stackable: 'false', + object: 'true', + itemId: 6, + img: 'package://assets/img/items/aal.svg' +} +var barsch = { + name: "Barsch", + weight: 2.6, + currentWeight: 1, + rarity: 'fishes', + statSlots: [], + runes: [], + amount: 1, + usable: 'false', + selected: 'false', + stackable: 'false', + object: 'true', + itemId: 7, + img: 'package://assets/img/items/perch.svg' +} +var lachs = { + name: "Lachs", + weight: 4.2, + currentWeight: 1, + rarity: 'fishes', + statSlots: [], + runes: [], + amount: 1, + usable: 'false', + selected: 'false', + stackable: 'false', + object: 'true', + itemId: 8, + img: 'package://assets/img/items/salmon.svg' +} +var thunfisch = { + name: "Thunfisch", + weight: 11, + currentWeight: 1, + rarity: 'fishes', + statSlots: [], + runes: [], + amount: 1, + usable: 'false', + selected: 'false', + stackable: 'false', + object: 'true', + itemId: 9, + img: 'package://assets/img/items/salmon.svg' +} +var zander = { + name: "Zander", + weight: 5, + currentWeight: 1, + rarity: 'fishes', + statSlots: [], + runes: [], + amount: 1, + usable: 'false', + selected: 'false', + stackable: 'false', + object: 'true', + itemId: 10, + img: 'package://assets/img/items/zander.svg' +} -var allItems = [fish, hamburger, cocaine, cannabis]; - - +var allItems = [holz, hamburger, cocaine, cannabis, flunder, aal, barsch, lachs, thunfisch, zander]; //////////////////////// // Player Invenotry // @@ -251,20 +325,12 @@ var commands = { } -// Button funktionen -var elemakzeptieren = document.getElementById("buttonakzeptieren"); -elemakzeptieren.addEventListener('click', akzeptieren); - -var elemablehnen = document.getElementById("buttonablehnen"); -elemablehnen.addEventListener('click', ablehnen); - - //Handel Akzeptierenfenster -function akzeptieren() { +$("#buttonakzeptieren").click(function () { mp.trigger('CEF:acceptTrade'); -} +}); -function ablehnen() { +$("#buttonablehnen").click(function () { mp.trigger('CEF:declineTrade'); -} +}); diff --git a/ReallifeGamemode.Client/assets/html/inventory/index.html b/ReallifeGamemode.Client/assets/html/inventory/index.html index ec2ba455..2484c44d 100644 --- a/ReallifeGamemode.Client/assets/html/inventory/index.html +++ b/ReallifeGamemode.Client/assets/html/inventory/index.html @@ -21,14 +21,16 @@ + - -
+