Skip to content

Commit 91719a4

Browse files
516 Compile Compatibility (tgstation#88611)
Renames all uses of caller, as they (currently) shadow the new byond var and will in future error Ups our "wan if compiled after" experiement compile version to 516 Adds an alternate 516 unit test
1 parent 6b252b5 commit 91719a4

File tree

36 files changed

+282
-277
lines changed

36 files changed

+282
-277
lines changed

.github/alternate_byond_versions.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
# This is useful for making sure we maintain compatibility with both older and newer versions,
33
# while still having our main tests run on a guaranteed pinned version.
44

5-
# Format is version: map
5+
# Format is "version: map" or "version: map;max_required_client_version"
66
# Example:
77
# 500.1337: runtimestation
8+
# 516.1638: runtimestation;516
9+
# Lowest supported version
810
515.1627: runtimestation
11+
# Beta version
12+
516.1648: runtimestation;516

.github/workflows/ci_suite.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ jobs:
183183
- name: Find Alternate Tests
184184
id: alternate_test_finder
185185
run: |
186-
ALTERNATE_TESTS_JSON=$(jq -nRc '[inputs | capture("^(?<major>[0-9]+)\\.(?<minor>[0-9]+): (?<map>.+)$")]' .github/alternate_byond_versions.txt)
186+
ALTERNATE_TESTS_JSON=$(jq -nRc '[inputs | capture("^(?<major>[0-9]+)\\.(?<minor>[0-9]+): (?<map>[^;]+);?(?<max_client_version>[0-9]+)?$")]' .github/alternate_byond_versions.txt)
187187
echo "alternate_tests=$ALTERNATE_TESTS_JSON" >> $GITHUB_OUTPUT
188188
- name: Collect byond client version configuration
189189
id: max_required_byond_client
@@ -219,7 +219,7 @@ jobs:
219219
map: ${{ matrix.setup.map }}
220220
major: ${{ matrix.setup.major }}
221221
minor: ${{ matrix.setup.minor }}
222-
max_required_byond_client: ${{needs.collect_data.outputs.max_required_byond_client}}
222+
max_required_byond_client: ${{ matrix.setup.max_client_version || needs.collect_data.outputs.max_required_byond_client }}
223223

224224
compare_screenshots:
225225
if: needs.collect_data.outputs.alternate_tests == '[]' || needs.run_alternate_tests.result == 'success'

code/__HELPERS/paths/path.dm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,8 @@
264264
* Passed into CanAStarPass to provide context for a pathing attempt
265265
*
266266
* Also used to check if using a cached path_map is safe
267-
* There are some vars here that are unused. They exist to cover cases where caller_ref is used
268-
* They're the properties of caller_ref used in those cases.
267+
* There are some vars here that are unused. They exist to cover cases where requester_ref is used
268+
* They're the properties of requester_ref used in those cases.
269269
* It's kinda annoying, but there's some proc chains we can't convert to this datum
270270
*/
271271
/datum/can_pass_info
@@ -314,7 +314,7 @@
314314
/// Weakref to the requester used to generate this info
315315
/// Should not use this almost ever, it's for context and to allow for proc chains that
316316
/// Require a movable
317-
var/datum/weakref/caller_ref = null
317+
var/datum/weakref/requester_ref = null
318318

319319
/datum/can_pass_info/New(atom/movable/construct_from, list/access, no_id = FALSE, call_depth = 0)
320320
// No infiniloops
@@ -327,7 +327,7 @@
327327
if(isnull(construct_from))
328328
return
329329

330-
src.caller_ref = WEAKREF(construct_from)
330+
src.requester_ref = WEAKREF(construct_from)
331331
src.pass_flags = construct_from.pass_flags
332332
src.movement_type = construct_from.movement_type
333333
src.thrown = !!construct_from.throwing
@@ -361,8 +361,8 @@ GLOBAL_LIST_INIT(can_pass_info_vars, GLOBAL_PROC_REF(can_pass_check_vars))
361361
var/datum/isaac = new()
362362
var/list/altar = assoc_to_keys(lamb.vars - isaac.vars)
363363
// Don't compare against calling atom, it's not relevant here
364-
altar -= "caller_ref"
365-
ASSERT("caller_ref" in lamb.vars, "caller_ref var was not found in /datum/can_pass_info, why are we filtering for it?")
364+
altar -= "requester_ref"
365+
ASSERT("requester_ref" in lamb.vars, "requester_ref var was not found in /datum/can_pass_info, why are we filtering for it?")
366366
// We will bespoke handle pulling_info
367367
altar -= "pulling_info"
368368
ASSERT("pulling_info" in lamb.vars, "pulling_info var was not found in /datum/can_pass_info, why are we filtering for it?")

code/_experiments.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
#define EXPERIMENT_MY_COOL_FEATURE
1818
#endif
1919

20-
#if DM_VERSION >= 516
21-
#error "Remove all 515 experiments"
20+
#if DM_VERSION >= 517
21+
#error "Remove all 516 experiments"
2222
#endif

code/datums/actions/cooldown_action.dm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@
250250
return PreActivate(user)
251251

252252
/// Intercepts client owner clicks to activate the ability
253-
/datum/action/cooldown/proc/InterceptClickOn(mob/living/caller, params, atom/target)
253+
/datum/action/cooldown/proc/InterceptClickOn(mob/living/clicker, params, atom/target)
254254
if(!IsAvailable(feedback = TRUE))
255255
return FALSE
256256
if(!target)
@@ -261,8 +261,8 @@
261261

262262
// And if we reach here, the action was complete successfully
263263
if(unset_after_click)
264-
unset_click_ability(caller, refund_cooldown = FALSE)
265-
caller.next_click = world.time + click_cd_override
264+
unset_click_ability(clicker, refund_cooldown = FALSE)
265+
clicker.next_click = world.time + click_cd_override
266266

267267
return TRUE
268268

code/datums/actions/innate_action.dm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,17 @@
7676
on_who.click_intercept = null
7777

7878
/// Handles whenever a mob clicks on something
79-
/datum/action/innate/proc/InterceptClickOn(mob/living/caller, params, atom/clicked_on)
79+
/datum/action/innate/proc/InterceptClickOn(mob/living/clicker, params, atom/clicked_on)
8080
if(!IsAvailable(feedback = TRUE))
81-
unset_ranged_ability(caller)
81+
unset_ranged_ability(clicker)
8282
return FALSE
8383
if(!clicked_on)
8484
return FALSE
8585

86-
return do_ability(caller, clicked_on)
86+
return do_ability(clicker, clicked_on)
8787

8888
/// Actually goes through and does the click ability
89-
/datum/action/innate/proc/do_ability(mob/living/caller, atom/clicked_on)
89+
/datum/action/innate/proc/do_ability(mob/living/clicker, atom/clicked_on)
9090
return FALSE
9191

9292
/datum/action/innate/Remove(mob/removed_from)

code/datums/components/pet_commands/pet_command.dm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
try_activate_command(commander = speaker, radial_command = FALSE)
7676

7777
/// Respond to a callout
78-
/datum/pet_command/proc/respond_to_callout(mob/living/caller, datum/callout_option/callout, atom/target)
78+
/datum/pet_command/proc/respond_to_callout(mob/living/speaker, datum/callout_option/callout, atom/target)
7979
SIGNAL_HANDLER
8080

8181
if (isnull(callout_type) || !ispath(callout, callout_type))
@@ -85,21 +85,21 @@
8585
if (!parent)
8686
return
8787

88-
if (!valid_callout_target(caller, callout, target))
88+
if (!valid_callout_target(speaker, callout, target))
8989
var/found_new_target = FALSE
9090
for (var/atom/new_target in range(2, target))
91-
if (valid_callout_target(caller, callout, new_target))
91+
if (valid_callout_target(speaker, callout, new_target))
9292
target = new_target
9393
found_new_target = TRUE
9494

9595
if (!found_new_target)
9696
return
9797

98-
if (try_activate_command(commander = caller, radial_command = FALSE))
98+
if (try_activate_command(commander = speaker, radial_command = FALSE))
9999
look_for_target(parent, target)
100100

101101
/// Does this callout with this target trigger this command?
102-
/datum/pet_command/proc/valid_callout_target(mob/living/caller, datum/callout_option/callout, atom/target)
102+
/datum/pet_command/proc/valid_callout_target(mob/living/speaker, datum/callout_option/callout, atom/target)
103103
return TRUE
104104

105105
/**

code/datums/components/pet_commands/pet_commands_basic.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,8 @@
274274
. = ..()
275275
set_command_target(parent, victim)
276276

277-
/datum/pet_command/protect_owner/valid_callout_target(mob/living/caller, datum/callout_option/callout, atom/target)
278-
return target == caller || get_dist(caller, target) <= 1
277+
/datum/pet_command/protect_owner/valid_callout_target(mob/living/speaker, datum/callout_option/callout, atom/target)
278+
return target == speaker || get_dist(speaker, target) <= 1
279279

280280
/datum/pet_command/protect_owner/proc/set_attacking_target(atom/source, mob/living/attacker)
281281
SIGNAL_HANDLER

code/datums/components/plumbing/_plumbing.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@
337337
tile_covered = should_hide
338338
parent_obj.update_appearance()
339339

340-
/datum/component/plumbing/proc/change_ducting_layer(obj/caller, obj/changer, new_layer = DUCT_LAYER_DEFAULT)
340+
/datum/component/plumbing/proc/change_ducting_layer(obj/source, obj/changer, new_layer = DUCT_LAYER_DEFAULT)
341341
SIGNAL_HANDLER
342342
ducting_layer = new_layer
343343

code/datums/components/plumbing/simple_components.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@
2222
demand_connects = NORTH
2323
supply_connects = SOUTH
2424

25-
/datum/component/plumbing/manifold/change_ducting_layer(obj/caller, obj/changer, new_layer)
25+
/datum/component/plumbing/manifold/change_ducting_layer(obj/source, obj/changer, new_layer)
2626
return

0 commit comments

Comments
 (0)