Merge pull request #106 from FreezePhoenix/patch-11

Improve Computer and Super Computer UI
This commit is contained in:
Kaan Soral
2024-02-21 15:53:41 +03:00
committed by GitHub
2 changed files with 21 additions and 6 deletions
+12 -3
View File
@@ -1242,9 +1242,9 @@ function inventory_click(num,event)
else if(character.items[num])
{
if(character.items[num].name=="placeholder") return;
if(character.items[num].name=="computer") // gameplay=="hardcore" &&
if(character.items[num].name=="computer" || character.items[num].name=="supercomputer") // gameplay=="hardcore" &&
{
return render_computer_network(".inventory-item");
return render_computer_network(".inventory-item",character.items[num].name,num);
}
render_item(".inventory-item",{id:"citem"+num,item:G.items[character.items[num].name],name:character.items[num].name,actual:character.items[num],num:num,inventory_ui:num});
last_invclick=num+iname;
@@ -2848,6 +2848,15 @@ function close_merchant()
return push_deferred("merchant");
}
function toggle_merchant(num) {
if(character.stand) {
socket.emit("merchant",{close:1});
} else {
socket.emit("merchant",{num:num});
}
return push_deferred("merchant");
}
function donate(gold)
{
if(gold===undefined)
@@ -7006,4 +7015,4 @@ function electron_add_webview(url)
{
if(!url) url="http://thegame.com/character/GG/in/EU/I/";
$("body").append("<webview src='"+url+"' style='position: fixed; top: 0px; left: 0px; bottom: 0px; right: 0px' disablewebsecurity nodeintegration></webview>");
}
}
+9 -3
View File
@@ -2154,10 +2154,16 @@ function render_tracker()
show_modal(html,{wwidth:578,hideinbackground:true});
}
function render_computer($element)
function render_computer($element,type="computer",slot=0)
{
var html="";
html+="<div style=\"color: #32A3B0\">CONNECTED.</div>";
html+="<div onclick='socket.emit(\"trade_history\",{})' class='clickable' style='color: #E4E4E4'><span style='color: #BA61A4'>&gt;</span> TRADE HISTORY</div>";
html+="<div onclick='toggle_merchant(\"" + slot + "\")' class='clickable' style='color: #E4E4E4'><span style='color: #BA61A4'>&gt;</span> TOGGLE STAND</div>";
if(type == "supercomputer") {
html+="<div onclick=\"socket.emit('tracker')\" class='clickable' style='color: #E4E4E4'><span style='color: #BA61A4'>&gt;</span> TRACKER</div>";
}
html+="<div onclick='render_upgrade_shrine()' class='clickable' style='color: #E4E4E4'><span style='color: #BA61A4'>&gt;</span> UPGRADE</div>"; // style='color: #C3C3C3' style='color: #D6D6D6'
html+="<div onclick='render_compound_shrine()' class='clickable' style='color: #E4E4E4'><span style='color: #BA61A4'>&gt;</span> COMPOUND</div>";
html+="<div onclick='render_exchange_shrine()' class='clickable' style='color: #E4E4E4'><span style='color: #BA61A4'>&gt;</span> EXCHANGE</div>";
@@ -2228,11 +2234,11 @@ function render_skill(selector,skill_name,args)
else $(selector).html(html);
}
function render_computer_network(selector)
function render_computer_network(selector,type,num)
{
var html="<div style='background-color: black; border: 5px solid gray; font-size: 24px; display: inline-block; padding: 20px; line-height: 24px; max-width: 240px;' class='buyitem'><div class='computernx'></div></div>";
$(selector).html(html);
render_computer($(".computernx"));
render_computer($(".computernx"),type,num);
}
function render_secondhands(type)