Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 009c63a

Browse files
authored
Update auxmos version (#22763)
* upgrade * bindings * update the shit
1 parent 38ba455 commit 009c63a

File tree

3 files changed

+88
-32
lines changed

3 files changed

+88
-32
lines changed

auxmos.dll

68 KB
Binary file not shown.

auxmos.pdb

-72 KB
Binary file not shown.

code/__DEFINES/bindings.dm

Lines changed: 88 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -11,179 +11,235 @@
1111

1212
#define AUXMOS (__auxmos || __detect_auxmos())
1313

14-
/proc/__auxmos_shutdown()
15-
return call_ext(AUXMOS, "byond:auxmos_shutdown_ffi")()
16-
17-
/datum/controller/subsystem/air/proc/process_excited_groups_auxtools(remaining)
18-
return call_ext(AUXMOS, "byond:groups_hook_ffi")(src, remaining)
19-
20-
/datum/controller/subsystem/air/proc/process_turfs_auxtools(remaining)
21-
return call_ext(AUXMOS, "byond:process_turf_hook_ffi")(src, remaining)
22-
23-
/datum/controller/subsystem/air/proc/finish_turf_processing_auxtools(time_remaining)
24-
return call_ext(AUXMOS, "byond:finish_process_turfs_ffi")(time_remaining)
25-
26-
/datum/controller/subsystem/air/proc/thread_running()
27-
return call_ext(AUXMOS, "byond:thread_running_hook_ffi")()
28-
29-
/turf/proc/__update_auxtools_turf_adjacency_info()
30-
return call_ext(AUXMOS, "byond:hook_infos_ffi")(src)
31-
32-
/turf/proc/update_air_ref(flag)
33-
return call_ext(AUXMOS, "byond:hook_register_turf_ffi")(src, flag)
34-
35-
/proc/finalize_gas_refs()
36-
return call_ext(AUXMOS, "byond:finalize_gas_refs_ffi")()
37-
38-
/datum/controller/subsystem/air/proc/auxtools_update_reactions()
39-
return call_ext(AUXMOS, "byond:update_reactions_ffi")()
40-
41-
/proc/auxtools_atmos_init(gas_data)
42-
return call_ext(AUXMOS, "byond:hook_init_ffi")(gas_data)
43-
44-
/proc/_auxtools_register_gas(gas)
45-
return call_ext(AUXMOS, "byond:hook_register_gas_ffi")(gas)
14+
/proc/byondapi_stack_trace(msg)
15+
CRASH(msg)
4616

17+
/// Returns: true. Parses gas strings like "o2=2500;plasma=5000;TEMP=370" and turns src mixes into the parsed gas mixture, invalid patterns will be ignored
4718
/datum/gas_mixture/proc/__auxtools_parse_gas_string(string)
4819
return call_ext(AUXMOS, "byond:parse_gas_string_ffi")(src, string)
4920

21+
/// Returns: the total amount of gas mixtures in the arena, including "free" ones.
5022
/datum/controller/subsystem/air/proc/get_max_gas_mixes()
5123
return call_ext(AUXMOS, "byond:hook_max_gas_mixes_ffi")()
5224

25+
/// Returns: the amount of gas mixtures that are attached to a byond gas mixture.
5326
/datum/controller/subsystem/air/proc/get_amt_gas_mixes()
5427
return call_ext(AUXMOS, "byond:hook_amt_gas_mixes_ffi")()
5528

29+
/// Args: (list). Takes every gas in the list and makes them all identical, scaled to their respective volumes. The total heat and amount of substance in all of the combined gases is conserved.
5630
/proc/equalize_all_gases_in_list(gas_list)
5731
return call_ext(AUXMOS, "byond:equalize_all_hook_ffi")(gas_list)
5832

33+
/// Args: (temperature). Returns: how much oxidizer for fire is in the mixture at the given temperature. If temperature is omitted, just uses current temperature instead.
5934
/datum/gas_mixture/proc/get_oxidation_power(temp)
6035
return call_ext(AUXMOS, "byond:oxidation_power_hook_ffi")(src, temp)
6136

37+
/// Args: (temperature). Returns: how much fuel for fire is in the mixture at the given temperature. If temperature is omitted, just uses current temperature instead.
6238
/datum/gas_mixture/proc/get_fuel_amount(temp)
6339
return call_ext(AUXMOS, "byond:fuel_amount_hook_ffi")(src, temp)
6440

41+
/// Args: (mixture). Makes `src` a copy of `mixture`, with volumes taken into account.
6542
/datum/gas_mixture/proc/equalize_with(total)
6643
return call_ext(AUXMOS, "byond:equalize_with_hook_ffi")(src, total)
6744

45+
/// Args: (mixture, ratio). Transfers `ratio` of `src` to `mixture`.
6846
/datum/gas_mixture/proc/transfer_ratio_to(other, ratio)
6947
return call_ext(AUXMOS, "byond:transfer_ratio_hook_ffi")(src, other, ratio)
7048

49+
/// Args: (mixture, amount). Takes the `amount` given and transfers it from `src` to `mixture`.
7150
/datum/gas_mixture/proc/transfer_to(other, moles)
7251
return call_ext(AUXMOS, "byond:transfer_hook_ffi")(src, other, moles)
7352

53+
/// Args: (heat). Adds a given amount of heat to the mixture, i.e. in joules taking into account capacity.
7454
/datum/gas_mixture/proc/adjust_heat(temp)
7555
return call_ext(AUXMOS, "byond:adjust_heat_hook_ffi")(src, temp)
7656

57+
/// Args: (holder). Runs all reactions on this gas mixture. Holder is used by the reactions, and can be any arbitrary datum or null.
7758
/datum/gas_mixture/proc/react(holder)
7859
return call_ext(AUXMOS, "byond:react_hook_ffi")(src, holder)
7960

61+
/// Returns: true if the two mixtures are different enough for processing, false otherwise.
8062
/datum/gas_mixture/proc/compare(other)
8163
return call_ext(AUXMOS, "byond:compare_hook_ffi")(src, other)
8264

65+
/// Clears the gas mixture my removing all of its gases.
8366
/datum/gas_mixture/proc/clear()
8467
return call_ext(AUXMOS, "byond:clear_hook_ffi")(src)
8568

69+
/// Marks the mix as immutable, meaning it will never change. This cannot be undone.
8670
/datum/gas_mixture/proc/mark_immutable()
8771
return call_ext(AUXMOS, "byond:mark_immutable_hook_ffi")(src)
8872

73+
/// Args: (mixture, ratio, gas_list). Takes gases given by `gas_list` and moves `ratio` amount of those gases from `src` into `mixture`.
8974
/datum/gas_mixture/proc/scrub_into(into, ratio_v, gas_list)
9075
return call_ext(AUXMOS, "byond:scrub_into_hook_ffi")(src, into, ratio_v, gas_list)
9176

77+
/// Args: (flag). As get_gases(), but only returns gases with the given flag.
9278
/datum/gas_mixture/proc/get_by_flag(flag_val)
9379
return call_ext(AUXMOS, "byond:get_by_flag_hook_ffi")(src, flag_val)
9480

81+
/// Args: (mixture, flag, amount). Takes `amount` from src that have the given `flag` and puts them into the given `mixture`. Returns: 0 if gas didn't have any with that flag, 1 if it did.
9582
/datum/gas_mixture/proc/__remove_by_flag(into, flag_val, amount_val)
9683
return call_ext(AUXMOS, "byond:remove_by_flag_hook_ffi")(src, into, flag_val, amount_val)
9784

85+
/// Args: (coefficient). Divides all gases by this amount.
9886
/datum/gas_mixture/proc/divide(num_val)
9987
return call_ext(AUXMOS, "byond:divide_hook_ffi")(src, num_val)
10088

89+
/// Args: (coefficient). Multiplies all gases by this amount.
10190
/datum/gas_mixture/proc/multiply(num_val)
10291
return call_ext(AUXMOS, "byond:multiply_hook_ffi")(src, num_val)
10392

93+
/// Args: (amount). Subtracts the given amount from each gas.
10494
/datum/gas_mixture/proc/subtract(num_val)
10595
return call_ext(AUXMOS, "byond:subtract_hook_ffi")(src, num_val)
10696

97+
/// Args: (amount). Adds the given amount to each gas.
10798
/datum/gas_mixture/proc/add(num_val)
10899
return call_ext(AUXMOS, "byond:add_hook_ffi")(src, num_val)
109100

101+
/// Args: (gas_id_1, amount_1, gas_id_2, amount_2, ...). As adjust_moles, but with variadic arguments.
110102
/datum/gas_mixture/proc/adjust_multi(...)
111103
var/list/args_copy = args.Copy()
112104
args_copy.Insert(1, src)
113105
return call_ext(AUXMOS, "byond:adjust_multi_hook_ffi")(arglist(args_copy))
114106

107+
/// Args: (gas_id, moles, temp). Adjusts the given gas's amount by the given amount, with that gas being treated as if it is at the given temperature.
115108
/datum/gas_mixture/proc/adjust_moles_temp(id_val, num_val, temp_val)
116109
return call_ext(AUXMOS, "byond:adjust_moles_temp_hook_ffi")(src, id_val, num_val, temp_val)
117110

111+
/// Args: (gas_id, moles). Adjusts the given gas's amount by the given amount, e.g. (GAS_O2, -0.1) will remove 0.1 moles of oxygen from the mixture.
118112
/datum/gas_mixture/proc/adjust_moles(id_val, num_val)
119113
return call_ext(AUXMOS, "byond:adjust_moles_hook_ffi")(src, id_val, num_val)
120114

115+
/// Args: (gas_id, moles). Sets the amount of substance of the given gas, in moles.
121116
/datum/gas_mixture/proc/set_moles(gas_id, amt_val)
122117
return call_ext(AUXMOS, "byond:set_moles_hook_ffi")(src, gas_id, amt_val)
123118

119+
/// Args: (gas_id). Returns: the amount of substance of the given gas, in moles.
124120
/datum/gas_mixture/proc/get_moles(gas_id)
125121
return call_ext(AUXMOS, "byond:get_moles_hook_ffi")(src, gas_id)
126122

123+
/// Args: (volume). Sets the volume of the gas.
127124
/datum/gas_mixture/proc/set_volume(vol_arg)
128125
return call_ext(AUXMOS, "byond:set_volume_hook_ffi")(src, vol_arg)
129126

127+
/// Args: (gas_id). Returns the heat capacity from the given gas, in J/K (probably).
130128
/datum/gas_mixture/proc/partial_heat_capacity(gas_id)
131129
return call_ext(AUXMOS, "byond:partial_heat_capacity_ffi")(src, gas_id)
132130

131+
/// Args: (temperature). Sets the temperature of the mixture. Will be set to 2.7 if it's too low.
133132
/datum/gas_mixture/proc/set_temperature(arg_temp)
134133
return call_ext(AUXMOS, "byond:set_temperature_hook_ffi")(src, arg_temp)
135134

135+
/// Returns: a list of the gases in the mixture, associated with their IDs.
136136
/datum/gas_mixture/proc/get_gases()
137137
return call_ext(AUXMOS, "byond:get_gases_hook_ffi")(src)
138138

139+
/// Args: (src, mixture, conductivity) or (src, conductivity, temperature, heat_capacity). Adjusts temperature of src based on parameters. Returns: temperature of sharer after sharing is complete.
139140
/datum/gas_mixture/proc/temperature_share(...)
140141
var/list/args_copy = args.Copy()
141142
args_copy.Insert(1, src)
142143
return call_ext(AUXMOS, "byond:temperature_share_hook_ffi")(arglist(args_copy))
143144

145+
/// Arg: (mixture). Makes src into a copy of the argument mixture.
144146
/datum/gas_mixture/proc/copy_from(giver)
145147
return call_ext(AUXMOS, "byond:copy_from_hook_ffi")(src, giver)
146148

149+
/// Args: (mixture, amount). Takes the given amount of gas from src and puts it into the argument mixture. Amount is amount of substance in moles.
147150
/datum/gas_mixture/proc/__remove(into, amount_arg)
148151
return call_ext(AUXMOS, "byond:remove_hook_ffi")(src, into, amount_arg)
149152

153+
/// Args: (mixture, ratio). Takes the given ratio of gas from src and puts it into the argument mixture. Ratio is a number between 0 and 1.
150154
/datum/gas_mixture/proc/__remove_ratio(into, ratio_arg)
151155
return call_ext(AUXMOS, "byond:remove_ratio_hook_ffi")(src, into, ratio_arg)
152156

157+
/// Args: (mixture). Merges the gas from the giver into src, without modifying the giver mix.
153158
/datum/gas_mixture/proc/merge(giver)
154159
return call_ext(AUXMOS, "byond:merge_hook_ffi")(src, giver)
155160

161+
/// Returns: the mix's thermal energy, the product of the mixture's heat capacity and its temperature.
156162
/datum/gas_mixture/proc/thermal_energy()
157163
return call_ext(AUXMOS, "byond:thermal_energy_hook_ffi")(src)
158164

165+
/// Returns: the mix's volume, in liters.
159166
/datum/gas_mixture/proc/return_volume()
160167
return call_ext(AUXMOS, "byond:return_volume_hook_ffi")(src)
161168

169+
/// Returns: the mix's temperature, in kelvins.
162170
/datum/gas_mixture/proc/return_temperature()
163171
return call_ext(AUXMOS, "byond:return_temperature_hook_ffi")(src)
164172

173+
/// Returns: the mix's pressure, in kilopascals.
165174
/datum/gas_mixture/proc/return_pressure()
166175
return call_ext(AUXMOS, "byond:return_pressure_hook_ffi")(src)
167176

177+
/// Returns: Amount of substance, in moles.
168178
/datum/gas_mixture/proc/total_moles()
169179
return call_ext(AUXMOS, "byond:total_moles_hook_ffi")(src)
170180

181+
/// Args: (min_heat_cap). Sets the mix's minimum heat capacity.
171182
/datum/gas_mixture/proc/set_min_heat_capacity(arg_min)
172183
return call_ext(AUXMOS, "byond:min_heat_cap_hook_ffi")(src, arg_min)
173184

185+
/// Returns: Heat capacity, in J/K (probably).
174186
/datum/gas_mixture/proc/heat_capacity()
175187
return call_ext(AUXMOS, "byond:heat_cap_hook_ffi")(src)
176188

189+
/// Adds the gas mixture's ID to the queue of mixtures that have been deleted, to be reused later.
190+
/// This version is only if auxcleanup is not being used; it should be called from /datum/gas_mixture/Del.
177191
/datum/gas_mixture/proc/__gasmixture_unregister()
178192
return call_ext(AUXMOS, "byond:unregister_gasmixture_hook_ffi")(src)
179193

194+
/// Fills in the first unused slot in the gas mixtures vector, or adds another one, then sets the argument ByondValue to point to it.
180195
/datum/gas_mixture/proc/__gasmixture_register()
181196
return call_ext(AUXMOS, "byond:register_gasmixture_hook_ffi")(src)
182197

198+
/// Args: (ms). Runs callbacks until time limit is reached. If time limit is omitted, runs all callbacks.
183199
/proc/process_atmos_callbacks(remaining)
184200
return call_ext(AUXMOS, "byond:atmos_callback_handle_ffi")(remaining)
185201

202+
/// Updates adjacency infos for turfs, only use this in immediateupdateturfs.
203+
/turf/proc/__update_auxtools_turf_adjacency_info()
204+
return call_ext(AUXMOS, "byond:hook_infos_ffi")(src)
205+
206+
/// Returns: null. Updates turf air infos, whether the turf is closed, is space or a regular turf, or even a planet turf is decided here.
207+
/turf/proc/update_air_ref(flag)
208+
return call_ext(AUXMOS, "byond:hook_register_turf_ffi")(src, flag)
209+
210+
/// Returns: If this cycle is interrupted by overtiming or not. Starts a katmos equalize cycle, does nothing if process_turfs isn't ran.
186211
/datum/controller/subsystem/air/proc/process_turf_equalize_auxtools(remaining)
187212
return call_ext(AUXMOS, "byond:equalize_hook_ffi")(src, remaining)
188213

214+
/// Returns: If this cycle is interrupted by overtiming or not. Starts a processing turfs cycle.
215+
/datum/controller/subsystem/air/proc/process_turfs_auxtools(remaining)
216+
return call_ext(AUXMOS, "byond:process_turf_hook_ffi")(src, remaining)
217+
218+
/// Returns: If this cycle is interrupted by overtiming or not. Calls all outstanding callbacks created by other processes, usually ones that can't run on other threads and only the main thread.
219+
/datum/controller/subsystem/air/proc/finish_turf_processing_auxtools(time_remaining)
220+
return call_ext(AUXMOS, "byond:finish_process_turfs_ffi")(time_remaining)
221+
222+
/// Returns: If a processing thread is running or not.
223+
/datum/controller/subsystem/air/proc/thread_running()
224+
return call_ext(AUXMOS, "byond:thread_running_hook_ffi")()
225+
226+
/// Returns: If this cycle is interrupted by overtiming or not. Starts a processing excited groups cycle, does nothing if process_turfs isn't ran.
227+
/datum/controller/subsystem/air/proc/process_excited_groups_auxtools(remaining)
228+
return call_ext(AUXMOS, "byond:groups_hook_ffi")(src, remaining)
229+
230+
/// For updating reagent gas fire products, do not use for now.
231+
/proc/finalize_gas_refs()
232+
return call_ext(AUXMOS, "byond:finalize_gas_refs_ffi")()
233+
234+
/// For updating reaction informations for auxmos, only call this when it is changed.
235+
/datum/controller/subsystem/air/proc/auxtools_update_reactions()
236+
return call_ext(AUXMOS, "byond:update_reactions_ffi")()
237+
238+
/// Registers gases, and get reaction infos for auxmos, only call when ssair is initing.
239+
/proc/auxtools_atmos_init(gas_data)
240+
return call_ext(AUXMOS, "byond:hook_init_ffi")(gas_data)
241+
242+
/// For registering gases, do not touch this.
243+
/proc/_auxtools_register_gas(gas)
244+
return call_ext(AUXMOS, "byond:hook_register_gas_ffi")(gas)
189245

0 commit comments

Comments
 (0)