Fix uplinks being inaccessible off-Horizon (#13880)

This commit is contained in:
Wildkins
2022-05-10 14:49:00 -04:00
committed by GitHub
parent 09742adec2
commit 71f0ea2056
3 changed files with 19 additions and 10 deletions

View File

@@ -4,7 +4,7 @@
program_icon_state = "generic" program_icon_state = "generic"
extended_desc = "This program allows communication over the NTRC network." extended_desc = "This program allows communication over the NTRC network."
size = 2 size = 2
requires_ntnet = TRUE requires_ntnet = FALSE
requires_ntnet_feature = NTNET_COMMUNICATION requires_ntnet_feature = NTNET_COMMUNICATION
program_type = PROGRAM_TYPE_ALL program_type = PROGRAM_TYPE_ALL
network_destination = "NTRC server" network_destination = "NTRC server"
@@ -60,6 +60,7 @@
return return
// Following actions require signal // Following actions require signal
if(!get_signal(NTNET_COMMUNICATION)) if(!get_signal(NTNET_COMMUNICATION))
to_chat(usr, FONT_SMALL(SPAN_WARNING("\The [src] displays, \"NETWORK ERROR - Unable to connect to NTNet. Please retry. If problem persists, contact your system administrator.\".")))
return return
if(href_list["send"]) if(href_list["send"])
@@ -272,4 +273,4 @@
if(src in my_user.clients) if(src in my_user.clients)
my_user.clients.Remove(src) my_user.clients.Remove(src)
if(src in ntnet_global.chat_clients) if(src in ntnet_global.chat_clients)
ntnet_global.chat_clients.Remove(src) ntnet_global.chat_clients.Remove(src)

View File

@@ -0,0 +1,6 @@
author: JohnWildkins
delete-after: True
changes:
- bugfix: "PDA-based uplinks can now be accessed without a network connection (i.e. off-Horizon)."

View File

@@ -2,7 +2,6 @@
<div> <div>
<h2 v-if="!s.service" class="red">Chat service is not enabled, please enable it from main menu.</h2> <h2 v-if="!s.service" class="red">Chat service is not enabled, please enable it from main menu.</h2>
<h2 v-else-if="!s.registered" class="red">No registered user detected.</h2> <h2 v-else-if="!s.registered" class="red">No registered user detected.</h2>
<h2 v-else-if="!s.signal" class="red">No network signal.</h2>
<template v-else> <template v-else>
<div> <div>
<vui-button v-if="s.can_netadmin_mode || s.netadmin_mode" :class="{ on: s.netadmin_mode }" :params="{toggleadmin: 1}">Admin Mode</vui-button> <vui-button v-if="s.can_netadmin_mode || s.netadmin_mode" :class="{ on: s.netadmin_mode }" :params="{toggleadmin: 1}">Admin Mode</vui-button>
@@ -14,13 +13,16 @@
</template> </template>
<vui-button :class="{'selected': s.message_mute == true}" :params="{mute_message: 1}">{{ s.message_mute == true ? "Unmute Messages" : "Mute Messages" }}</vui-button> <vui-button :class="{'selected': s.message_mute == true}" :params="{mute_message: 1}">{{ s.message_mute == true ? "Unmute Messages" : "Mute Messages" }}</vui-button>
</div> </div>
<div> <h2 v-if="!s.signal" class="red">No network signal. Limited functionality available.</h2>
<vui-button :class="{ on: active == null }" @click="active = null">Explore</vui-button> <template v-else>
<vui-button v-for="ref in tab_channels" :key="ref" :class="{ on: active == ref }" @click="active = ref">{{ s.channels[ref].title }}</vui-button> <div>
</div> <vui-button :class="{ on: active == null }" @click="active = null">Explore</vui-button>
<hr> <vui-button v-for="ref in tab_channels" :key="ref" :class="{ on: active == ref }" @click="active = ref">{{ s.channels[ref].title }}</vui-button>
<view-mcomputer-chat-explore v-if="active == null"/> </div>
<view-mcomputer-chat-chat v-else :reference="active" @on-leave="active = null"/> <hr>
<view-mcomputer-chat-explore v-if="active == null"/>
<view-mcomputer-chat-chat v-else :reference="active" @on-leave="active = null"/>
</template>
</template> </template>
</div> </div>
</template> </template>