mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Ensure computers work on centcom or when only one zlevel is accessible.
This commit is contained in:
@@ -91,7 +91,7 @@
|
|||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
/obj/machinery/computer/security/attack_hand(var/mob/user as mob)
|
/obj/machinery/computer/security/attack_hand(var/mob/user as mob)
|
||||||
if (using_map && !(src.z in using_map.station_levels))
|
if (using_map && !(src.z in using_map.contact_levels))
|
||||||
user << "<span class='danger'>Unable to establish a connection:</span> You're too far away from the station!"
|
user << "<span class='danger'>Unable to establish a connection:</span> You're too far away from the station!"
|
||||||
return
|
return
|
||||||
if(stat & (NOPOWER|BROKEN)) return
|
if(stat & (NOPOWER|BROKEN)) return
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
/obj/machinery/computer/communications/Topic(href, href_list)
|
/obj/machinery/computer/communications/Topic(href, href_list)
|
||||||
if(..())
|
if(..())
|
||||||
return 1
|
return 1
|
||||||
if (using_map && !(src.z in using_map.station_levels))
|
if (using_map && !(src.z in using_map.contact_levels))
|
||||||
usr << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
|
usr << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
|
||||||
return
|
return
|
||||||
usr.set_machine(src)
|
usr.set_machine(src)
|
||||||
@@ -274,7 +274,7 @@
|
|||||||
/obj/machinery/computer/communications/attack_hand(var/mob/user as mob)
|
/obj/machinery/computer/communications/attack_hand(var/mob/user as mob)
|
||||||
if(..())
|
if(..())
|
||||||
return
|
return
|
||||||
if (using_map && !(src.z in using_map.station_levels))
|
if (using_map && !(src.z in using_map.contact_levels))
|
||||||
user << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
|
user << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
|
|
||||||
attackby(obj/item/weapon/O as obj, mob/user as mob)
|
attackby(obj/item/weapon/O as obj, mob/user as mob)
|
||||||
if (user.z > 6)
|
if (using_map && !(user.z in using_map.contact_levels))
|
||||||
user << "<span class='danger'>Unable to establish a connection:</span> You're too far away from the station!"
|
user << "<span class='danger'>Unable to establish a connection:</span> You're too far away from the station!"
|
||||||
return
|
return
|
||||||
if(istype(O, /obj/item/weapon/aiModule))
|
if(istype(O, /obj/item/weapon/aiModule))
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
/obj/machinery/computer/secure_data/attack_hand(mob/user as mob)
|
/obj/machinery/computer/secure_data/attack_hand(mob/user as mob)
|
||||||
if(..())
|
if(..())
|
||||||
return
|
return
|
||||||
if (using_map && !(src.z in using_map.station_levels))
|
if (using_map && !(src.z in using_map.contact_levels))
|
||||||
user << "<span class='warning'>Unable to establish a connection:</span> You're too far away from the station!"
|
user << "<span class='warning'>Unable to establish a connection:</span> You're too far away from the station!"
|
||||||
return
|
return
|
||||||
var/dat
|
var/dat
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
/obj/machinery/computer/skills/attack_hand(mob/user as mob)
|
/obj/machinery/computer/skills/attack_hand(mob/user as mob)
|
||||||
if(..())
|
if(..())
|
||||||
return
|
return
|
||||||
if (using_map && !(src.z in using_map.station_levels))
|
if (using_map && !(src.z in using_map.contact_levels))
|
||||||
user << "<span class='danger'>Unable to establish a connection:</span> You're too far away from the station!"
|
user << "<span class='danger'>Unable to establish a connection:</span> You're too far away from the station!"
|
||||||
return
|
return
|
||||||
var/dat
|
var/dat
|
||||||
|
|||||||
@@ -33,6 +33,8 @@
|
|||||||
ui.add_template("mapContent", "crew_monitor_map_content.tmpl")
|
ui.add_template("mapContent", "crew_monitor_map_content.tmpl")
|
||||||
// adding a template with the key "mapHeader" replaces the map header content
|
// adding a template with the key "mapHeader" replaces the map header content
|
||||||
ui.add_template("mapHeader", "crew_monitor_map_header.tmpl")
|
ui.add_template("mapHeader", "crew_monitor_map_header.tmpl")
|
||||||
|
if(!(ui.map_z_level in data["map_levels"]))
|
||||||
|
ui.set_map_z_level(data["map_levels"][1])
|
||||||
|
|
||||||
ui.set_initial_data(data)
|
ui.set_initial_data(data)
|
||||||
ui.open()
|
ui.open()
|
||||||
|
|||||||
Reference in New Issue
Block a user