mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-12 08:36:00 +01:00
Fixes the holopad choice window spam. The holopad now uses the standard popup window used by computers and most machines. A simple click to close it.
Fixes /obj/item/clothing/suit/space/pirat hiding the mob's jumpsuit when worn.
This commit is contained in:
@@ -40,23 +40,46 @@ var/const/HOLOPAD_MODE = RANGE_BASED
|
||||
var/list/masters = list()//List of AIs that use the holopad
|
||||
var/last_request = 0 //to prevent request spam. ~Carn
|
||||
var/holo_range = 5 // Change to change how far the AI can move away from the holopad before deactivating.
|
||||
var/temp = ""
|
||||
|
||||
/obj/machinery/hologram/holopad/attack_hand(var/mob/living/carbon/human/user) //Carn: Hologram requests.
|
||||
if(!istype(user))
|
||||
return
|
||||
if(alert(user,"Would you like to request an AI's presence?",,"Yes","No") == "Yes")
|
||||
if(!Adjacent(user)) //also prevents request spam!
|
||||
user << "<span class='notice'>You are too far from the holopad.</span>"
|
||||
return
|
||||
if(last_request + 200 < world.time) //don't spam the AI with requests you jerk!
|
||||
if(user.stat || stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/dat
|
||||
if(temp)
|
||||
dat = temp
|
||||
else
|
||||
dat = "<A href='?src=\ref[src];AIrequest=1'>request an AI's presence.</A>"
|
||||
|
||||
var/datum/browser/popup = new(user, "holopad", name, 300, 100)
|
||||
popup.set_content(dat)
|
||||
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
|
||||
popup.open()
|
||||
|
||||
/obj/machinery/hologram/holopad/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if (href_list["AIrequest"])
|
||||
if(last_request + 200 < world.time)
|
||||
last_request = world.time
|
||||
user << "<span class='notice'>You request an AI's presence.</span>"
|
||||
temp = "You requested an AI's presence.<BR>"
|
||||
temp += "<A href='?src=\ref[src];mainmenu=1'>Main Menu</A>"
|
||||
var/area/area = get_area(src)
|
||||
for(var/mob/living/silicon/ai/AI in living_mob_list)
|
||||
if(!AI.client) continue
|
||||
AI << "<span class='info'>Your presence is requested at <a href='?src=\ref[AI];jumptoholopad=\ref[src]'>\the [area]</a>.</span>"
|
||||
else
|
||||
user << "<span class='notice'>A request for AI presence was already sent recently.</span>"
|
||||
temp = "A request for AI presence was already sent recently.<BR>"
|
||||
temp += "<A href='?src=\ref[src];mainmenu=1'>Main Menu</A>"
|
||||
|
||||
else if(href_list["mainmenu"])
|
||||
temp = ""
|
||||
|
||||
updateUsrDialog()
|
||||
add_fingerprint(usr)
|
||||
|
||||
/obj/machinery/hologram/holopad/attack_ai(mob/living/silicon/ai/user)
|
||||
if (!istype(user))
|
||||
|
||||
@@ -110,6 +110,7 @@
|
||||
icon_state = "pirate"
|
||||
item_state = "pirate"
|
||||
w_class = 3
|
||||
flags_inv = 0
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank/internals)
|
||||
slowdown = 0
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
author: phil235
|
||||
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- tweak: "The AI holopads now use a popup window just like computers and other machines."
|
||||
|
||||
Reference in New Issue
Block a user