Skip to content

Commit 54b2e5f

Browse files
NullSnapshotZomgPonies
authored andcommitted
Fixed up security, medical, card, and crew. Made Computer 3 actually do what it's supposed to do.
Conflicts: code/datums/browser.dm html/browser/common.css
1 parent f35d8d3 commit 54b2e5f

File tree

8 files changed

+29
-51
lines changed

8 files changed

+29
-51
lines changed

Diff for: code/WorkInProgress/computer3/computers/card.dm

+2-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@
174174
dat = show_manifest()
175175

176176

177-
popup = new(usr, "ID Computer", name, 940, 520)
177+
popup.width = 940
178+
popup.height = 520
178179
popup.set_content(dat)
179180
popup.open()
180181
return

Diff for: code/WorkInProgress/computer3/computers/crew.dm

+2-1
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,6 @@
6767
Topic(href, list/href_list)
6868
if(!interactable() || !computer.cardslot || ..(href,href_list))
6969
return
70-
computer.updateUsrDialog()
70+
if("update" in href_list)
71+
interact()
7172
return

Diff for: code/WorkInProgress/computer3/computers/medical.dm

+4-6
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444
usr << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
4545
return
4646
var/dat
47-
if (src.temp)
47+
48+
if (temp)
4849
dat = text("<TT>[src.temp]</TT><BR><BR><A href='?src=\ref[src];temp=1'>Clear Screen</A>")
4950
else
5051
dat = text("Confirm Identity: <A href='?src=\ref[];scan=1'>[]</A><HR>", src, (src.scan ? text("[]", src.scan.name) : "----------"))
@@ -138,7 +139,8 @@
138139
else
139140
else
140141
dat += text("<A href='?src=\ref[];login=1'>{Log In}</A>", src)
141-
var/datum/browser/popup = new(usr, "med_comp", "Medical Records", 600, 400)
142+
popup.width = 600
143+
popup.height = 400
142144
popup.set_content(dat)
143145
popup.set_title_image(usr.browse_rsc_icon(computer.icon, computer.icon_state))
144146
popup.open()
@@ -147,15 +149,11 @@
147149
Topic(href, href_list)
148150
if(!interactable() || !computer.cardslot || ..(href,href_list))
149151
return
150-
151152
if (!( data_core.general.Find(src.active1) ))
152153
src.active1 = null
153-
154154
if (!( data_core.medical.Find(src.active2) ))
155155
src.active2 = null
156156

157-
usr.set_machine(src)
158-
159157
if (href_list["temp"])
160158
src.temp = null
161159

Diff for: code/WorkInProgress/computer3/computers/security.dm

+2-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@
193193
else
194194
else
195195
dat += text("<A href='?src=\ref[];choice=Log In'>{Log In}</A>", src)
196-
var/datum/browser/popup = new(usr, "secure_rec", "Security Records", 600, 400)
196+
popup.width = 600
197+
popup.height = 400
197198
popup.set_content(dat)
198199
popup.set_title_image(usr.browse_rsc_icon(computer.icon, computer.icon_state))
199200
popup.open()

Diff for: code/WorkInProgress/computer3/program.dm

+1
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ Programs are a file that can be executed
155155
popup = new(user, "\ref[computer]", name, nref=src)
156156
popup.set_title_image(usr.browse_rsc_icon(overlay.icon, overlay.icon_state))
157157
popup.set_title_buttons(topic_link(src,"quit","<img src=\ref['icons/NTOS/tb_close.png']>"))
158+
// popup.set_title_buttons("<a href='?src=\ref[src];quit'><img src=\ref['icons/NTOS/tb_close.png']></a>")
158159
if(popup.user != user)
159160
popup.user = user
160161
popup.set_title_image(usr.browse_rsc_icon(overlay.icon, overlay.icon_state))

Diff for: code/__HELPERS/unsorted.dm

-25
Original file line numberDiff line numberDiff line change
@@ -563,31 +563,6 @@ var/list/sortMobsOrder = list( "/mob/living/silicon/ai",
563563
return loc
564564

565565

566-
// Registers the on-close verb for a browse window (client/verb/.windowclose)
567-
// this will be called when the close-button of a window is pressed.
568-
//
569-
// This is usually only needed for devices that regularly update the browse window,
570-
// e.g. canisters, timers, etc.
571-
//
572-
// windowid should be the specified window name
573-
// e.g. code is : user << browse(text, "window=fred")
574-
// then use : onclose(user, "fred")
575-
//
576-
// Optionally, specify the "ref" parameter as the controlled atom (usually src)
577-
// to pass a "close=1" parameter to the atom's Topic() proc for special handling.
578-
// Otherwise, the user mob's machine var will be reset directly.
579-
//
580-
/proc/onclose(mob/user, windowid, var/atom/ref=null)
581-
if(!user.client) return
582-
var/param = "null"
583-
if(ref)
584-
param = "\ref[ref]"
585-
586-
winset(user, windowid, "on-close=\".windowclose [param]\"")
587-
588-
//world << "OnClose [user]: [windowid] : ["on-close=\".windowclose [param]\""]"
589-
590-
591566
// the on-close client verb
592567
// called when a browser popup window is closed after registering with proc/onclose()
593568
// if a valid atom reference is supplied, call the atom's Topic() with "close=1"

Diff for: code/datums/browser.dm

+2-2
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
// Otherwise, the user mob's machine var will be reset directly.
145145
//
146146

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

176176
// no atomref specified (or not found)

Diff for: html/browser/common.css

+16-15
Original file line numberDiff line numberDiff line change
@@ -156,22 +156,23 @@ h4
156156
}
157157

158158
.uiTitleWrapper
159-
{
160-
position:fixed;
161-
top:0px;
162-
left:0px;
163-
right:0px;
164-
z-index: 10
165-
}
159+
{
160+
position:fixed;
161+
top:0px;
162+
left:0px;
163+
right:0px;
164+
z-index: 10
165+
}
166+
167+
.uiTitleButtons
168+
{
169+
position:fixed;
170+
top:0px;
171+
right:0px;
172+
height:32px;
173+
z-index:11;
174+
}
166175

167-
.uiTitleButtons
168-
{
169-
position:fixed;
170-
top:0px;
171-
right:0px;
172-
height:32px;
173-
z-index:11;
174-
}
175176

176177
.uiTitle.icon
177178
{

0 commit comments

Comments
 (0)