[MIRROR] browse to browser part 1 (#11017)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-06-06 07:18:23 -07:00
committed by GitHub
parent d7cd22d2d0
commit 0fc7bb29d1
36 changed files with 428 additions and 423 deletions

View File

@@ -78,10 +78,10 @@
/obj/item/blueprints/interact()
var/area/A = get_area()
var/text = {"<HTML><head><title>[src]</title></head><BODY>
<h2>[station_name()] blueprints</h2>
<small>Property of [using_map.company_name]. For heads of staff only. Store in high-secure storage.</small><hr>
"}
var/text = {"
<h2>[station_name()] blueprints</h2>
<small>Property of [using_map.company_name]. For heads of staff only. Store in high-secure storage.</small><hr>
"}
var/curAreaType = get_area_type()
switch (curAreaType)
if (AREA_SPACE)
@@ -105,10 +105,10 @@
if(curAreaType & can_rename_areas_in)
text += "<p>You can <a href='byond://?src=\ref[src];action=edit_area'>rename the area</a>.</p>"
text += "</BODY></HTML>"
usr << browse(text, "window=blueprints")
onclose(usr, "blueprints")
var/datum/browser/popup = new(usr, "blueprints", "Blueprints")
popup.add_head_content("<title>[src]</title>")
popup.set_content(text)
popup.open()
/obj/item/blueprints/proc/get_area()
var/turf/T = get_turf(usr)

View File

@@ -1,7 +1,7 @@
// I placed this here because of how relevant it is.
// You place this in your uplinkable item to check if an uplink is active or not.
// If it is, it will display the uplink menu and return 1, else it'll return false.
// If it returns true, I recommend closing the item's normal menu with "user << browse(null, "window=name")"
// If it returns true, I recommend closing the item's normal menu
/obj/item/proc/active_uplink_check(mob/user as mob)
// Activates the uplink if it's active
if(hidden_uplink)
@@ -42,7 +42,7 @@
*
* 1. All obj/item 's have a hidden_uplink var. By default it's null. Give the item one with "new(src)", it must be in it's contents. Feel free to add "uses".
*
* 2. Code in the triggers. Use check_trigger for this, I recommend closing the item's menu with "usr << browse(null, "window=windowname") if it returns true.
* 2. Code in the triggers. Use check_trigger for this, I recommend closing the item's menu if it returns true.
* The var/value is the value that will be compared with the var/target. If they are equal it will activate the menu.
*
* 3. If you want the menu to stay until the users locks his uplink, add an active_uplink_check(mob/user as mob) in your interact/attack_hand proc.

View File

@@ -378,7 +378,7 @@ var/list/tape_roll_applications = list()
if(user.a_intent == I_HELP)
to_chat(user, span_warning("You refrain from breaking \the [src]."))
return
user.visible_message(span_bold("\The [user]") + "breaks \the [src]!",span_notice("You break \the [src]."))
user.visible_message(span_bold("\The [user]") + " breaks \the [src]!",span_notice("You break \the [src]."))
for (var/obj/item/tape/T in gettapeline())
if(T == src)