mirror of
https://github.com/Such-Software/wownerogue.git
synced 2026-11-14 02:53:53 +01:00
add stagenet warning and increase diff of game and also add modes
This commit is contained in:
@@ -343,6 +343,13 @@ const SocketHandlers = {
|
||||
UI.updateGameTitle(data.cryptoType);
|
||||
}
|
||||
|
||||
// Display testnet/stagenet warning if applicable
|
||||
if (data.testnetWarning) {
|
||||
SocketHandlers._showNetworkWarning(data.testnetWarning, data.network);
|
||||
} else {
|
||||
SocketHandlers._hideNetworkWarning();
|
||||
}
|
||||
|
||||
if (typeof PaymentUI !== 'undefined') {
|
||||
PaymentUI.updateConfig(data);
|
||||
// Show shop button if payments enabled
|
||||
@@ -354,6 +361,26 @@ const SocketHandlers = {
|
||||
}
|
||||
},
|
||||
|
||||
_showNetworkWarning: function(message, network) {
|
||||
let $warning = $('#networkWarning');
|
||||
if (!$warning.length) {
|
||||
$warning = $('<div id="networkWarning"></div>');
|
||||
// Insert at top of container
|
||||
$('.container').prepend($warning);
|
||||
}
|
||||
const networkUpper = (network || 'stagenet').toUpperCase();
|
||||
$warning.html(`
|
||||
<div style="background:#ff6600; color:#000; padding:10px; text-align:center; font-weight:bold; font-size:14px; border-bottom:2px solid #ff0000;">
|
||||
⚠️ ${networkUpper} MODE ⚠️<br>
|
||||
<span style="font-size:12px; font-weight:normal;">${message}</span>
|
||||
</div>
|
||||
`).show();
|
||||
},
|
||||
|
||||
_hideNetworkWarning: function() {
|
||||
$('#networkWarning').hide();
|
||||
},
|
||||
|
||||
onPaymentCreated: function(data) {
|
||||
console.log('Payment created:', data);
|
||||
if (typeof AudioAlerts !== 'undefined') { AudioAlerts.playRequestCoin(); }
|
||||
|
||||
Reference in New Issue
Block a user