Skip to content

Commit 730bf71

Browse files
Merge branch 'dev' of github.com:NebulaSS13/Nebula into fork/pyrelight
2 parents 7ce6a1b + 602924b commit 730bf71

File tree

73 files changed

+1512
-1515
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1512
-1515
lines changed

code/datums/communication/dsay.dm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
mute_setting = MUTE_DEADCHAT
1111
show_preference_setting = /datum/client_preference/show_dsay
1212

13+
// Changes the default speech_method kwarg.
1314
/decl/communication_channel/dsay/communicate(communicator, message, speech_method = /decl/dsay_communication/say)
14-
..()
15+
return ..()
1516

1617
/decl/communication_channel/dsay/can_communicate(var/client/communicator, var/message, var/speech_method_type)
1718
var/decl/dsay_communication/speech_method = GET_DECL(speech_method_type)

code/game/atoms.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@
620620
Used for atoms performing audible actions
621621
622622
- `message`: The string to show to anyone who can hear this atom
623-
- `dead_message?`: The string deaf mobs will see
623+
- `deaf_message?`: The string deaf mobs will see
624624
- `hearing_distance?`: The number of tiles away the message can be heard. Defaults to world.view
625625
- `check_ghosts?`: TRUE if ghosts should hear the message if their preferences allow
626626
- `radio_message?`: The string to send over radios

code/game/machinery/_machines_base/machinery.dm

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,9 @@ Class Procs:
240240
/obj/machinery/CouldNotUseTopic(var/mob/user)
241241
user.unset_machine()
242242

243+
// This must not be converted to use OnTopic.
244+
// mechanics_text and power_text can be done at a distance (via examination)
245+
// while the TOPIC_REFRESH handling must come after OnTopic has resolved in the parent call of Topic.
243246
/obj/machinery/Topic(href, href_list, datum/topic_state/state)
244247
if(href_list["mechanics_text"] && construct_state) // This is an OOC examine thing handled via Topic; specifically bypass all checks, but do nothing other than message to chat.
245248
var/list/info = get_tool_manipulation_info()
@@ -254,6 +257,13 @@ Class Procs:
254257
. = ..()
255258
if(. == TOPIC_REFRESH)
256259
updateUsrDialog() // Update legacy UIs to the extent possible.
260+
SSnano.update_uis(src) // And our modern NanoUI ones, too.
261+
update_icon() // A lot of machines like to do icon updates on refresh, so we'll handle it for them here.
262+
else if(. == TOPIC_CLOSE)
263+
usr.unset_machine()
264+
var/datum/nanoui/open_ui = SSnano.get_open_ui(usr, src, "main")
265+
if(open_ui)
266+
open_ui.close()
257267

258268
/obj/machinery/proc/get_tool_manipulation_info()
259269
return construct_state?.mechanics_info()

code/game/machinery/atmo_control.dm

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,6 @@
114114

115115
data["automation"] = automation
116116

117-
/obj/machinery/computer/air_control/Process()
118-
..()
119-
120117
/obj/machinery/computer/air_control/receive_signal(datum/signal/signal)
121118
if(!signal || signal.encryption)
122119
return
@@ -148,56 +145,56 @@
148145
if(href_list["in_refresh_status"])
149146
input_info = null
150147
refreshing_input = TRUE
151-
signal.data = list ("tag" = input_tag, "status" = 1)
148+
signal.data = list("tag" = input_tag, "status" = 1)
152149
. = 1
153150

154151
if(href_list["in_toggle_injector"])
155152
input_info = null
156153
refreshing_input = TRUE
157-
signal.data = list ("tag" = input_tag, "power_toggle" = 1)
154+
signal.data = list("tag" = input_tag, "power_toggle" = 1)
158155
. = 1
159156

160157
if(href_list["in_set_flowrate"])
161158
input_info = null
162159
refreshing_input = TRUE
163-
input_flow_setting = input("What would you like to set the rate limit to?", "Set Volume", input_flow_setting) as num|null
160+
input_flow_setting = input(user, "What would you like to set the rate limit to?", "Set Volume", input_flow_setting) as num|null
164161
input_flow_setting = clamp(input_flow_setting, 0, ATMOS_DEFAULT_VOLUME_PUMP+500)
165-
signal.data = list ("tag" = input_tag, "set_volume_rate" = input_flow_setting)
162+
signal.data = list("tag" = input_tag, "set_volume_rate" = input_flow_setting)
166163
. = 1
167164

168165
if(href_list["in_set_max"])
169166
input_info = null
170167
refreshing_input = TRUE
171168
input_flow_setting = ATMOS_DEFAULT_VOLUME_PUMP+500
172-
signal.data = list ("tag" = input_tag, "set_volume_rate" = input_flow_setting)
169+
signal.data = list("tag" = input_tag, "set_volume_rate" = input_flow_setting)
173170
. = 1
174171

175172
if(href_list["out_refresh_status"])
176173
output_info = null
177174
refreshing_output = TRUE
178-
signal.data = list ("tag" = output_tag, "status" = 1)
175+
signal.data = list("tag" = output_tag, "status" = 1)
179176
. = 1
180177

181178
if(href_list["out_toggle_power"])
182179
output_info = null
183180
refreshing_output = TRUE
184-
signal.data = list ("tag" = output_tag, "power_toggle" = 1, "status" = 1)
181+
signal.data = list("tag" = output_tag, "power_toggle" = 1, "status" = 1)
185182
. = 1
186183

187184
if(href_list["out_set_pressure"])
188185
output_info = null
189186
refreshing_output = TRUE
190-
pressure_setting = input("How much pressure would you like to output?", "Set Pressure", pressure_setting) as num|null
187+
pressure_setting = input(user, "How much pressure would you like to output?", "Set Pressure", pressure_setting) as num|null
191188
pressure_setting = clamp(pressure_setting, 0, MAX_PUMP_PRESSURE)
192-
signal.data = list ("tag" = output_tag, "set_internal_pressure" = "[pressure_setting]", "status" = 1)
189+
signal.data = list("tag" = output_tag, "set_internal_pressure" = "[pressure_setting]", "status" = 1)
193190
. = 1
194191

195192
if(href_list["s_out_set_pressure"])
196193
output_info = null
197194
refreshing_output = TRUE
198-
pressure_setting = input("How much pressure would you like to maintain inside the core?", "Set Core Pressure", pressure_setting) as num|null
195+
pressure_setting = input(user, "How much pressure would you like to maintain inside the core?", "Set Core Pressure", pressure_setting) as num|null
199196
pressure_setting = clamp(pressure_setting, 0, MAX_PUMP_PRESSURE)
200-
signal.data = list ("tag" = output_tag, "set_external_pressure" = pressure_setting, "checks" = 1, "status" = 1)
197+
signal.data = list("tag" = output_tag, "set_external_pressure" = pressure_setting, "checks" = 1, "status" = 1)
201198
. = 1
202199

203200
if(href_list["s_set_default"])
@@ -210,11 +207,11 @@
210207
output_info = null
211208
refreshing_output = TRUE
212209
pressure_setting = MAX_PUMP_PRESSURE
213-
signal.data = list ("tag" = output_tag, "set_internal_pressure" = pressure_setting, "status" = 1)
210+
signal.data = list("tag" = output_tag, "set_internal_pressure" = pressure_setting, "status" = 1)
214211
. = 1
215212

216213
if(href_list["set_frequency"])
217-
var/F = input("What frequency would you like to set this to? (Decimal is added automatically)", "Adjust Frequency", frequency) as num|null
214+
var/F = input(user, "What frequency would you like to set this to? (Decimal is added automatically)", "Adjust Frequency", frequency) as num|null
218215
if(F)
219216
frequency = F
220217
set_frequency(F)
@@ -291,7 +288,7 @@
291288
else
292289
..(signal)
293290

294-
/obj/machinery/computer/air_control/fuel_injection/Topic(href, href_list)
291+
/obj/machinery/computer/air_control/fuel_injection/OnTopic(mob/user, href_list, datum/topic_state/state)
295292
if((. = ..()))
296293
return
297294

code/game/machinery/computer/area_atmos.dm

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,25 +88,25 @@
8888
show_browser(user, "[dat]", "window=miningshuttle;size=400x400")
8989
status = ""
9090

91-
/obj/machinery/computer/area_atmos/Topic(href, href_list)
92-
if(..())
91+
/obj/machinery/computer/area_atmos/OnTopic(mob/user, href_list)
92+
if((. = ..()))
9393
return
94-
usr.set_machine(src)
95-
9694

9795
if(href_list["scan"])
9896
scanscrubbers()
97+
return TOPIC_REFRESH
9998
else if(href_list["toggle"])
10099
var/obj/machinery/portable_atmospherics/powered/scrubber/huge/scrubber = locate(href_list["scrub"])
101100

102101
if(!validscrubber(scrubber))
103-
spawn(20)
102+
spawn(2 SECONDS)
104103
status = "ERROR: Couldn't connect to scrubber! (timeout)"
105104
connectedscrubbers -= scrubber
106-
src.updateUsrDialog()
107-
return
105+
updateUsrDialog()
106+
return TOPIC_REFRESH
108107

109108
scrubber.update_use_power(text2num(href_list["toggle"]) ? POWER_USE_ACTIVE : POWER_USE_IDLE)
109+
return TOPIC_REFRESH
110110

111111
/obj/machinery/computer/area_atmos/proc/validscrubber(var/obj/machinery/portable_atmospherics/powered/scrubber/huge/scrubber)
112112
if(!isobj(scrubber) || get_dist(scrubber.loc, src.loc) > src.range || scrubber.loc.z != src.loc.z)

0 commit comments

Comments
 (0)