From 48b64809e280d2bb88f6976674f74b10ae36f575 Mon Sep 17 00:00:00 2001 From: FreezePhoenix <24441367+FreezePhoenix@users.noreply.github.com> Date: Wed, 14 Feb 2024 21:42:09 -0500 Subject: [PATCH 1/5] Pass computer type to render_computer_network --- js/functions.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/functions.js b/js/functions.js index f06b212..5b556ca 100644 --- a/js/functions.js +++ b/js/functions.js @@ -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); } 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; @@ -7006,4 +7006,4 @@ function electron_add_webview(url) { if(!url) url="http://thegame.com/character/GG/in/EU/I/"; $("body").append(""); -} \ No newline at end of file +} From 63c74df30200f0d13939eea1a050e0e968b16bb3 Mon Sep 17 00:00:00 2001 From: FreezePhoenix <24441367+FreezePhoenix@users.noreply.github.com> Date: Wed, 14 Feb 2024 21:46:57 -0500 Subject: [PATCH 2/5] Update functions.js to additionally pass the index of the computer --- js/functions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/functions.js b/js/functions.js index 5b556ca..003e149 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1244,7 +1244,7 @@ function inventory_click(num,event) if(character.items[num].name=="placeholder") return; if(character.items[num].name=="computer" || character.items[num].name=="supercomputer") // gameplay=="hardcore" && { - return render_computer_network(".inventory-item",character.items[num].name); + 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; From 8920509c888a9eb992707bf47fefaab9b00d1d4c Mon Sep 17 00:00:00 2001 From: FreezePhoenix <24441367+FreezePhoenix@users.noreply.github.com> Date: Wed, 14 Feb 2024 21:54:24 -0500 Subject: [PATCH 3/5] Update html.js to improve Computer and Super Computer UI --- js/html.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/js/html.js b/js/html.js index 3edb9e5..7a69b12 100644 --- a/js/html.js +++ b/js/html.js @@ -2154,10 +2154,20 @@ 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+="
CONNECTED.
"; + html+="
> TRADE HISTORY
"; + if(character.stand) { + html+="
> CLOSE STAND
"; + } else { + html+="
> OPEN STAND
"; + } + if(type == "supercomputer") { + html+="
> TRACKER
"; + } + html+="
> UPGRADE
"; // style='color: #C3C3C3' style='color: #D6D6D6' html+="
> COMPOUND
"; html+="
> EXCHANGE
"; @@ -2228,11 +2238,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="
"; $(selector).html(html); - render_computer($(".computernx")); + render_computer($(".computernx"),type,num); } function render_secondhands(type) From 2103f66304011d5e00fc762fb66126e12dce1abb Mon Sep 17 00:00:00 2001 From: FreezePhoenix <24441367+FreezePhoenix@users.noreply.github.com> Date: Sat, 17 Feb 2024 09:33:06 -0500 Subject: [PATCH 4/5] Update functions.js to add toggle_merchant --- js/functions.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/js/functions.js b/js/functions.js index 003e149..5cc9d96 100644 --- a/js/functions.js +++ b/js/functions.js @@ -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) From d7b2ddf209f94c34e0ae0b85e3f5f852c3c6e62e Mon Sep 17 00:00:00 2001 From: FreezePhoenix <24441367+FreezePhoenix@users.noreply.github.com> Date: Sat, 17 Feb 2024 09:34:18 -0500 Subject: [PATCH 5/5] Update html.js to improve Computer UI Replaces the OPEN STAND and CLOSE STAND button with a single TOGGLE STAND button. --- js/html.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/js/html.js b/js/html.js index 7a69b12..c9a4e65 100644 --- a/js/html.js +++ b/js/html.js @@ -2159,11 +2159,7 @@ function render_computer($element,type="computer",slot=0) var html=""; html+="
CONNECTED.
"; html+="
> TRADE HISTORY
"; - if(character.stand) { - html+="
> CLOSE STAND
"; - } else { - html+="
> OPEN STAND
"; - } + html+="
> TOGGLE STAND
"; if(type == "supercomputer") { html+="
> TRACKER
"; }