Skip to content

Commit

Permalink
Fixed up security, medical, card, and crew. Made Computer 3 actually …
Browse files Browse the repository at this point in the history
…do what it's supposed to do.

Conflicts:
	code/datums/browser.dm
	html/browser/common.css
  • Loading branch information
NullSnapshot authored and ZomgPonies committed Jun 23, 2014
1 parent f35d8d3 commit 54b2e5f
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 51 deletions.
3 changes: 2 additions & 1 deletion code/WorkInProgress/computer3/computers/card.dm
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@
dat = show_manifest()


popup = new(usr, "ID Computer", name, 940, 520)
popup.width = 940
popup.height = 520
popup.set_content(dat)
popup.open()
return
Expand Down
3 changes: 2 additions & 1 deletion code/WorkInProgress/computer3/computers/crew.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,6 @@
Topic(href, list/href_list)
if(!interactable() || !computer.cardslot || ..(href,href_list))
return
computer.updateUsrDialog()
if("update" in href_list)
interact()
return
10 changes: 4 additions & 6 deletions code/WorkInProgress/computer3/computers/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
usr << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
return
var/dat
if (src.temp)

if (temp)
dat = text("<TT>[src.temp]</TT><BR><BR><A href='?src=\ref[src];temp=1'>Clear Screen</A>")
else
dat = text("Confirm Identity: <A href='?src=\ref[];scan=1'>[]</A><HR>", src, (src.scan ? text("[]", src.scan.name) : "----------"))
Expand Down Expand Up @@ -138,7 +139,8 @@
else
else
dat += text("<A href='?src=\ref[];login=1'>{Log In}</A>", src)
var/datum/browser/popup = new(usr, "med_comp", "Medical Records", 600, 400)
popup.width = 600
popup.height = 400
popup.set_content(dat)
popup.set_title_image(usr.browse_rsc_icon(computer.icon, computer.icon_state))
popup.open()
Expand All @@ -147,15 +149,11 @@
Topic(href, href_list)
if(!interactable() || !computer.cardslot || ..(href,href_list))
return

if (!( data_core.general.Find(src.active1) ))
src.active1 = null

if (!( data_core.medical.Find(src.active2) ))
src.active2 = null

usr.set_machine(src)

if (href_list["temp"])
src.temp = null

Expand Down
3 changes: 2 additions & 1 deletion code/WorkInProgress/computer3/computers/security.dm
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@
else
else
dat += text("<A href='?src=\ref[];choice=Log In'>{Log In}</A>", src)
var/datum/browser/popup = new(usr, "secure_rec", "Security Records", 600, 400)
popup.width = 600
popup.height = 400
popup.set_content(dat)
popup.set_title_image(usr.browse_rsc_icon(computer.icon, computer.icon_state))
popup.open()
Expand Down
1 change: 1 addition & 0 deletions code/WorkInProgress/computer3/program.dm
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ Programs are a file that can be executed
popup = new(user, "\ref[computer]", name, nref=src)
popup.set_title_image(usr.browse_rsc_icon(overlay.icon, overlay.icon_state))
popup.set_title_buttons(topic_link(src,"quit","<img src=\ref['icons/NTOS/tb_close.png']>"))
// popup.set_title_buttons("<a href='?src=\ref[src];quit'><img src=\ref['icons/NTOS/tb_close.png']></a>")
if(popup.user != user)
popup.user = user
popup.set_title_image(usr.browse_rsc_icon(overlay.icon, overlay.icon_state))
Expand Down
25 changes: 0 additions & 25 deletions code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -563,31 +563,6 @@ var/list/sortMobsOrder = list( "/mob/living/silicon/ai",
return loc


// Registers the on-close verb for a browse window (client/verb/.windowclose)
// this will be called when the close-button of a window is pressed.
//
// This is usually only needed for devices that regularly update the browse window,
// e.g. canisters, timers, etc.
//
// windowid should be the specified window name
// e.g. code is : user << browse(text, "window=fred")
// then use : onclose(user, "fred")
//
// Optionally, specify the "ref" parameter as the controlled atom (usually src)
// to pass a "close=1" parameter to the atom's Topic() proc for special handling.
// Otherwise, the user mob's machine var will be reset directly.
//
/proc/onclose(mob/user, windowid, var/atom/ref=null)
if(!user.client) return
var/param = "null"
if(ref)
param = "\ref[ref]"

winset(user, windowid, "on-close=\".windowclose [param]\"")

//world << "OnClose [user]: [windowid] : ["on-close=\".windowclose [param]\""]"


// the on-close client verb
// called when a browser popup window is closed after registering with proc/onclose()
// if a valid atom reference is supplied, call the atom's Topic() with "close=1"
Expand Down
4 changes: 2 additions & 2 deletions code/datums/browser.dm
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
// Otherwise, the user mob's machine var will be reset directly.
//

/proc/onclosed(mob/user, windowid, var/atom/ref=null)
/proc/onclose(mob/user, windowid, var/atom/ref=null)
if(!user || !user.client) return
var/param = "null"
if(ref)
Expand All @@ -170,7 +170,7 @@
if(hsrc)
//world << "[src] Topic [href] [hsrc]"
usr = src.mob
src.Topic("close=1", list("close"="1"), hsrc) // this will direct to the atom's
src.Topic("close=1", list("close"="1"), hsrc) // this will direct to the atom's
return // Topic() proc via client.Topic()

// no atomref specified (or not found)
Expand Down
31 changes: 16 additions & 15 deletions html/browser/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -156,22 +156,23 @@ h4
}

.uiTitleWrapper
{
position:fixed;
top:0px;
left:0px;
right:0px;
z-index: 10
}
{
position:fixed;
top:0px;
left:0px;
right:0px;
z-index: 10
}

.uiTitleButtons
{
position:fixed;
top:0px;
right:0px;
height:32px;
z-index:11;
}

.uiTitleButtons
{
position:fixed;
top:0px;
right:0px;
height:32px;
z-index:11;
}

.uiTitle.icon
{
Expand Down

0 comments on commit 54b2e5f

Please sign in to comment.