Skip to content

Commit a7c1722

Browse files
committed
Merge remote-tracking branch 'upstream/master' into Admin-Sound-Default-Fix
2 parents 62cace9 + c33d5a0 commit a7c1722

File tree

230 files changed

+1714
-1634
lines changed

Some content is hidden

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

230 files changed

+1714
-1634
lines changed

.github/alternate_byond_versions.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,3 @@
55
# Format is version: map
66
# Example:
77
# 500.1337: runtimestation
8-
9-
516.1656: runtime

.github/workflows/ci_suite.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,11 @@ jobs:
183183
restore-keys: |
184184
${{ runner.os }}-build-
185185
${{ runner.os }}-
186+
- name: Restore BYOND cache
187+
uses: actions/cache@v3
188+
with:
189+
path: C:\\byond
190+
key: ${{ runner.os }}-byond-${{ secrets.CACHE_PURGE_KEY }}
186191
- name: Compile
187192
run: pwsh tools/ci/build.ps1
188193
env:

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y make man
2020
RUN update-alternatives --install /usr/local/bin/python python /usr/bin/python3 20
2121
ARG BYOND_MAJOR
2222
ARG BYOND_MINOR
23-
ARG BYOND_DOWNLOAD_URL=https://secure.byond.com/download/build/${BYOND_MAJOR}/${BYOND_MAJOR}.${BYOND_MINOR}_byond_linux.zip
24-
RUN curl ${BYOND_DOWNLOAD_URL} -o byond.zip \
23+
ARG BYOND_DOWNLOAD_URL=http://www.byond.com/download/build/${BYOND_MAJOR}/${BYOND_MAJOR}.${BYOND_MINOR}_byond_linux.zip
24+
RUN curl ${BYOND_DOWNLOAD_URL} -o byond.zip -A "CMSS13/1.0 Continuous Integration"\
2525
&& unzip byond.zip \
2626
&& rm -rf byond.zip
2727
RUN DEBIAN_FRONTEND=noninteractive apt-get clean && rm -rf /var/lib/apt/lists/*

SpacemanDMM.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ engine = "auxtools"
1313

1414
[diagnostics]
1515
var_in_proc_parameter = "error"
16+
redefined_proc = "warning"

code/__DEFINES/MC.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
NEW_SS_GLOBAL(SS##X);\
119119
PreInit();\
120120
}\
121-
/datum/controller/subsystem/processing/##X/fire() {..() /*just so it shows up on the profiler*/} \
121+
/datum/controller/subsystem/processing/##X/fire() {CAN_BE_REDEFINED(TRUE); ..() /*just so it shows up on the profiler*/} \
122122
/datum/controller/subsystem/processing/##X
123123

124124
#define log_qdel(X) log_debug(X)

code/__DEFINES/__spacemandmm.dm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#define SHOULD_BE_PURE(X) set SpacemanDMM_should_be_pure = X
1212
#define PRIVATE_PROC(X) set SpacemanDMM_private_proc = X
1313
#define PROTECTED_PROC(X) set SpacemanDMM_protected_proc = X
14+
#define CAN_BE_REDEFINED(X) set SpacemanDMM_can_be_redefined = X
1415
#define VAR_FINAL var/SpacemanDMM_final
1516
#define VAR_PRIVATE var/SpacemanDMM_private
1617
#define VAR_PROTECTED var/SpacemanDMM_protected
@@ -23,6 +24,7 @@
2324
#define SHOULD_BE_PURE(X)
2425
#define PRIVATE_PROC(X)
2526
#define PROTECTED_PROC(X)
27+
#define CAN_BE_REDEFINED(X)
2628
#define VAR_FINAL var
2729
#define VAR_PRIVATE var
2830
#define VAR_PROTECTED var

code/__DEFINES/_click.dm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@
3939
//Pixel coordinates in screen_loc format ("[tile_x]:[pixel_x],[tile_y]:[pixel_y]")
4040
#define SCREEN_LOC "screen-loc"
4141

42+
//Click catcher e.g. /atom/moveable/screen/click_catcher
43+
#define CLICK_CATCHER "click_catcher"
44+
#define CLICK_CATCHER_ADD_PARAM ";click_catcher=1"
45+
4246
/// From /mob/proc/click_adjacent() : (atom/A, obj/item/W, mods) makes it so the affterattack proc isn't called
4347
#define ATTACKBY_HINT_NO_AFTERATTACK (1 << 0)
4448
/// From /mob/proc/click_adjacent() : (atom/A, obj/item/W, mods) applies the click delay to next_move

code/__DEFINES/_globals.dm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#ifndef TESTING
3636
#define GLOBAL_PROTECT(X)\
3737
/datum/controller/global_vars/InitGlobal##X(){\
38+
CAN_BE_REDEFINED(TRUE);\
3839
..();\
3940
gvars_datum_protected_varlist[#X] = TRUE;\
4041
}
@@ -44,6 +45,7 @@
4445

4546
#define GLOBAL_SORTED(X)\
4647
/datum/controller/global_vars/InitGlobal##X(){\
48+
CAN_BE_REDEFINED(TRUE);\
4749
..();\
4850
##X = sortAssoc(##X);\
4951
}

code/__DEFINES/client_prefs.dm

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
#define BE_ALIEN_AFTER_DEATH (1<<0)
22
#define BE_AGENT (1<<1)
33

4+
/// Determines how abilities are activated, whether they're activated via middle click, shift click or right click.
5+
#define XENO_ABILITY_CLICK_MIDDLE 1
6+
#define XENO_ABILITY_CLICK_SHIFT 2
7+
#define XENO_ABILITY_CLICK_RIGHT 3
8+
9+
/// Update this to whatever the largest value of the XENO_ABILITY_CLICK_* defines is.
10+
#define XENO_ABILITY_CLICK_MAX 3
11+
412
//toggle_prefs bits from /datum/preferences
513
#define TOGGLE_IGNORE_SELF (1<<0) // Determines whether you will not hurt yourself when clicking yourself
614
#define TOGGLE_HELP_INTENT_SAFETY (1<<1) // Determines whether help intent will be completely harmless
7-
#define TOGGLE_MIDDLE_MOUSE_CLICK (1<<2) // This toggles whether selected ability for xeno uses middle mouse clicking or shift clicking
15+
// Deprecated. Can't remove this or bitshift values down because it would fuck up the savefiles
16+
// Feel free to replace this whatever you want, if you can find a useful toggle for it. Alternatively, don't because savefiles using flags
17+
// Is a complete and utter mistake.
18+
#define TOGGLE_FREE_PLACE_YOUR_OWN_TOGGLE_HERE (1<<2)
819
#define TOGGLE_DIRECTIONAL_ATTACK (1<<3) // This toggles whether attacks for xeno use directional attacks
920
#define TOGGLE_AUTO_EJECT_MAGAZINE_OFF (1<<4) // This toggles whether guns with auto ejectors will not auto eject their magazines
1021
// MUTUALLY EXCLUSIVE TO TOGGLE_AUTO_EJECT_MAGAZINE_TO_HAND

code/__DEFINES/dcs/signals/atom/mob/signals_mob.dm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,3 +191,6 @@
191191
#define COMSIG_MOB_END_TUTORIAL "mob_end_tutorial"
192192

193193
#define COMSIG_MOB_NESTED "mob_nested"
194+
195+
/// From /modules/animations/animations_library.dm and /code/modules/mob/mob.dm
196+
#define COMSIG_MOB_ANIMATING "mob_animating"

code/__DEFINES/language.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#define LANGUAGE_RUSSIAN "Russian"
55
#define LANGUAGE_RUSPATOIS "Russian Patois"
66
#define LANGUAGE_GERMAN "German"
7+
#define LANGUAGE_SCANDINAVIAN "Scandinavian"
78
#define LANGUAGE_SPANISH "Spanish"
89
#define LANGUAGE_PORTUGUESE "Portuguese"
910
#define LANGUAGE_FRENCH "French"

code/__DEFINES/machinery.dm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
#define USE_POWER_IDLE 1
77
#define USE_POWER_ACTIVE 2
88

9+
// door defines
10+
11+
#define DOOR_OPERATING_IDLE 0
12+
#define DOOR_OPERATING_OPENING 1
13+
#define DOOR_OPERATING_CLOSING 2
14+
915
// used by the simulator to select mob type
1016

1117
#define HUMAN_MODE "Unarmoured Humans"

code/__DEFINES/tgs.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// tgstation-server DMAPI
22
// The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in IETF RFC 2119.
33

4-
#define TGS_DMAPI_VERSION "7.3.1"
4+
#define TGS_DMAPI_VERSION "7.3.3"
55

66
// All functions and datums outside this document are subject to change with any version and should not be relied on.
77

code/__HELPERS/unsorted.dm

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -884,33 +884,33 @@ GLOBAL_DATUM(action_purple_power_up, /image)
884884
if((user_flags|target_flags) & INTERRUPT_OUT_OF_RANGE && target && get_dist(busy_user, target) > max_dist)
885885
. = FALSE
886886
break
887-
if(user_flags & INTERRUPT_LCLICK && busy_user.clicked_something["left"] || \
888-
target_is_mob && (target_flags & INTERRUPT_LCLICK && T.clicked_something["left"])
887+
if(user_flags & INTERRUPT_LCLICK && busy_user.clicked_something[LEFT_CLICK] || \
888+
target_is_mob && (target_flags & INTERRUPT_LCLICK && T.clicked_something[LEFT_CLICK])
889889
)
890890
. = FALSE
891891
break
892-
if(user_flags & INTERRUPT_RCLICK && busy_user.clicked_something["right"] || \
893-
target_is_mob && (target_flags & INTERRUPT_RCLICK && T.clicked_something["right"])
892+
if(user_flags & INTERRUPT_RCLICK && busy_user.clicked_something[RIGHT_CLICK] || \
893+
target_is_mob && (target_flags & INTERRUPT_RCLICK && T.clicked_something[RIGHT_CLICK])
894894
)
895895
. = FALSE
896896
break
897-
if(user_flags & INTERRUPT_SHIFTCLICK && busy_user.clicked_something["left"] && busy_user.clicked_something["shift"] || \
898-
target_is_mob && (target_flags & INTERRUPT_SHIFTCLICK && T.clicked_something["left"] && T.clicked_something["shift"])
897+
if(user_flags & INTERRUPT_SHIFTCLICK && busy_user.clicked_something[LEFT_CLICK] && busy_user.clicked_something[SHIFT_CLICK] || \
898+
target_is_mob && (target_flags & INTERRUPT_SHIFTCLICK && T.clicked_something[LEFT_CLICK] && T.clicked_something[SHIFT_CLICK])
899899
)
900900
. = FALSE
901901
break
902-
if(user_flags & INTERRUPT_ALTCLICK && busy_user.clicked_something["left"] && busy_user.clicked_something["alt"] || \
903-
target_is_mob && (target_flags & INTERRUPT_ALTCLICK && T.clicked_something["left"] && T.clicked_something["alt"])
902+
if(user_flags & INTERRUPT_ALTCLICK && busy_user.clicked_something[LEFT_CLICK] && busy_user.clicked_something[ALT_CLICK] || \
903+
target_is_mob && (target_flags & INTERRUPT_ALTCLICK && T.clicked_something[LEFT_CLICK] && T.clicked_something[ALT_CLICK])
904904
)
905905
. = FALSE
906906
break
907-
if(user_flags & INTERRUPT_CTRLCLICK && busy_user.clicked_something["left"] && busy_user.clicked_something["ctrl"] || \
908-
target_is_mob && (target_flags & INTERRUPT_CTRLCLICK && T.clicked_something["left"] && T.clicked_something["ctrl"])
907+
if(user_flags & INTERRUPT_CTRLCLICK && busy_user.clicked_something[LEFT_CLICK] && busy_user.clicked_something[CTRL_CLICK] || \
908+
target_is_mob && (target_flags & INTERRUPT_CTRLCLICK && T.clicked_something[LEFT_CLICK] && T.clicked_something[CTRL_CLICK])
909909
)
910910
. = FALSE
911911
break
912-
if(user_flags & INTERRUPT_MIDDLECLICK && busy_user.clicked_something["middle"] || \
913-
target_is_mob && (target_flags & INTERRUPT_MIDDLECLICK && T.clicked_something["middle"])
912+
if(user_flags & INTERRUPT_MIDDLECLICK && busy_user.clicked_something[MIDDLE_CLICK] || \
913+
target_is_mob && (target_flags & INTERRUPT_MIDDLECLICK && T.clicked_something[MIDDLE_CLICK])
914914
)
915915
. = FALSE
916916
break
@@ -1484,7 +1484,7 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
14841484
if(isRemoteControlling(user))
14851485
return TRUE
14861486
// If the user is not a xeno (with active ability) with the shift click pref on, we examine. God forgive me for snowflake
1487-
if(user.client?.prefs && !(user.client?.prefs?.toggle_prefs & TOGGLE_MIDDLE_MOUSE_CLICK))
1487+
if(user.get_ability_mouse_key() == XENO_ABILITY_CLICK_SHIFT)
14881488
if(isxeno(user))
14891489
var/mob/living/carbon/xenomorph/X = user
14901490
if(X.selected_ability)

code/_byond_version_compat.dm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// This file contains defines allowing targeting byond versions newer than the supported
22

33
//Update this whenever you need to take advantage of more recent byond features
4-
#define MIN_COMPILER_VERSION 515
5-
#define MIN_COMPILER_BUILD 1627
4+
#define MIN_COMPILER_VERSION 516
5+
#define MIN_COMPILER_BUILD 1655
66
#if (DM_VERSION < MIN_COMPILER_VERSION || DM_BUILD < MIN_COMPILER_BUILD) && !defined(SPACEMAN_DMM) && !defined(OPENDREAM)
77
//Don't forget to update this part
88
#error Your version of BYOND is too out-of-date to compile this project. Go to https://www.byond.com/download and update.
9-
#error You need version 515.1627 or higher
9+
#error You need version 516.1655 or higher
1010
#endif
1111

1212
// So we want to have compile time guarantees these methods exist on local type, unfortunately 515 killed the .proc/procname and .verb/verbname syntax so we have to use nameof()

code/_onclick/ai.dm

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,3 @@
1-
/*
2-
AI ClickOn()
3-
4-
Note currently ai is_mob_restrained() returns 0 in all cases,
5-
therefore restrained code has been removed
6-
7-
The AI can double click to move the camera (this was already true but is cleaner),
8-
or double click a mob to track them.
9-
10-
Note that AI have no need for the adjacency proc, and so this proc is a lot cleaner.
11-
*/
12-
13-
/mob/click(atom/A, list/mods)
14-
..()
15-
16-
if(!client || !client.remote_control)
17-
return FALSE
18-
19-
if (mods["middle"])
20-
A.AIMiddleClick(src)
21-
return 1
22-
23-
if (mods["shift"])
24-
A.AIShiftClick(src)
25-
return 1
26-
27-
if (mods["alt"])
28-
A.AIAltClick(src)
29-
return 1
30-
31-
if (mods["ctrl"])
32-
A.AICtrlClick(src)
33-
return 1
34-
35-
if (world.time <= next_move)
36-
return 1
37-
38-
A.attack_remote(src)
39-
return 1
40-
411
/*
422
AI has no need for the UnarmedAttack() and RangedAttack() procs,
433
because the AI code is not generic; attack_remote() is used instead.
@@ -49,16 +9,6 @@
499
/mob/living/silicon/ai/RangedAttack(atom/A)
5010
A.attack_remote(src)
5111

52-
/mob/UnarmedAttack(atom/A)
53-
if(!client || !client.remote_control)
54-
return FALSE
55-
A.attack_remote(src)
56-
57-
/mob/RangedAttack(atom/A)
58-
if(!client || !client.remote_control)
59-
return FALSE
60-
A.attack_remote(src)
61-
6212
/atom/proc/attack_remote(mob/user as mob)
6313
return
6414

code/_onclick/click.dm

Lines changed: 48 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
if ((A.flags_atom & NOINTERACT))
3131
if (istype(A, /atom/movable/screen/click_catcher))
3232
var/list/mods = params2list(params)
33-
var/turf/TU = params2turf(mods["screen-loc"], get_turf(client.eye), client)
33+
var/turf/TU = params2turf(mods[SCREEN_LOC], get_turf(client.eye), client)
3434
if (TU)
35-
params += ";click_catcher=1"
35+
params += CLICK_CATCHER_ADD_PARAM
3636
do_click(TU, location, params)
3737
return
3838

@@ -49,7 +49,7 @@
4949
clicked_something[mod] = TRUE
5050

5151
// Don't allow any other clicks while dragging something
52-
if (mods["drag"])
52+
if(mods[DRAG])
5353
return
5454

5555
if(client && SEND_SIGNAL(client, COMSIG_CLIENT_PRE_CLICK, A, mods) & COMPONENT_INTERRUPT_CLICK)
@@ -193,16 +193,51 @@
193193
* mob/RangedAttack(atom,params) - used only ranged, only used for tk and laser eyes but could be changed
194194
*/
195195

196+
/*
197+
AI ClickOn()
198+
199+
Note currently ai is_mob_restrained() returns 0 in all cases,
200+
therefore restrained code has been removed
201+
202+
The AI can double click to move the camera (this was already true but is cleaner),
203+
or double click a mob to track them.
204+
205+
Note that AI have no need for the adjacency proc, and so this proc is a lot cleaner.
206+
*/
207+
196208
/mob/proc/click(atom/A, list/mods)
197-
return FALSE
209+
if(!client || !client.remote_control)
210+
return FALSE
211+
212+
if(mods[MIDDLE_CLICK])
213+
A.AIMiddleClick(src)
214+
return TRUE
215+
216+
if(mods[SHIFT_CLICK])
217+
A.AIShiftClick(src)
218+
return TRUE
219+
220+
if(mods[ALT_CLICK])
221+
A.AIAltClick(src)
222+
return TRUE
223+
224+
if(mods[CTRL_CLICK])
225+
A.AICtrlClick(src)
226+
return TRUE
227+
228+
if(world.time <= next_move)
229+
return TRUE
230+
231+
A.attack_remote(src)
232+
return TRUE
198233

199234
/atom/proc/clicked(mob/user, list/mods)
200-
if (mods["shift"] && !mods["middle"])
235+
if (mods[SHIFT_CLICK] && !mods[MIDDLE_CLICK])
201236
if(can_examine(user))
202237
examine(user)
203238
return TRUE
204239

205-
if (mods["alt"])
240+
if (mods[ALT_CLICK])
206241
var/turf/T = get_turf(src)
207242
if(T && user.TurfAdjacent(T) && length(T.contents))
208243
user.set_listed_turf(T)
@@ -214,7 +249,7 @@
214249
if (..())
215250
return TRUE
216251

217-
if (mods["ctrl"])
252+
if (mods[CTRL_CLICK])
218253
if (Adjacent(user) && user.next_move < world.time)
219254
user.start_pulling(src)
220255
return TRUE
@@ -231,7 +266,9 @@
231266
in human click code to allow glove touches only at melee range.
232267
*/
233268
/mob/proc/UnarmedAttack(atom/A, proximity_flag, click_parameters)
234-
return
269+
if(!client || !client.remote_control)
270+
return FALSE
271+
A.attack_remote(src)
235272

236273
/*
237274
Ranged unarmed attack:
@@ -242,7 +279,9 @@
242279
animals lunging, etc.
243280
*/
244281
/mob/proc/RangedAttack(atom/A, params)
245-
return
282+
if(!client || !client.remote_control)
283+
return FALSE
284+
A.attack_remote(src)
246285

247286
/*
248287
Restrained ClickOn

0 commit comments

Comments
 (0)