mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-20 11:35:19 +01:00
browse to browser part 1 (#17800)
* browse to browser * some more * fix that * fix that * . * datum browser update port * . * .
This commit is contained in:
@@ -77,10 +77,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)
|
||||
@@ -101,10 +101,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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -229,8 +229,6 @@
|
||||
if(gurgled && clean_types & CLEAN_WASH)
|
||||
gurgled = FALSE
|
||||
cut_overlay(gurgled_overlays[gurgled_color])
|
||||
name = initial(name)
|
||||
desc = initial(desc)
|
||||
if(contaminated && clean_types & CLEAN_RAD) // Phoron and stuff, washing machine needed
|
||||
contaminated = FALSE
|
||||
cut_overlay(contamination_overlay)
|
||||
|
||||
Reference in New Issue
Block a user