Skip to content

Commit 2972f30

Browse files
Merge pull request #124 from MistakeNot4892/fork/pyrelight
Updating from Neb dev.
2 parents 92f95d8 + 730bf71 commit 2972f30

File tree

1,071 files changed

+9864
-8597
lines changed

Some content is hidden

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

1,071 files changed

+9864
-8597
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,6 @@ jobs:
5858
uses: actions/setup-python@v4
5959
with:
6060
python-version: '3.x'
61-
- name: Setup Cache
62-
uses: actions/cache@v3
63-
with:
64-
path: $HOME/spaceman_dmm/$SPACEMAN_DMM_VERSION
65-
key: ${{ runner.os }}-spacemandmm-${{ env.SPACEMAN_DMM_VERSION }}
6661
- name: Install OpenDream
6762
uses: robinraju/release-downloader@v1.9
6863
with:
@@ -71,7 +66,7 @@ jobs:
7166
fileName: "DMCompiler_linux-x64.tar.gz"
7267
extract: true
7368
- name: Run OpenDream
74-
run: ./DMCompiler_linux-x64/DMCompiler nebula.dme --suppress-unimplemented --skip-anything-typecheck --version=${BYOND_MAJOR}.${BYOND_MINOR} | python tools/od_annotator/__main__.py "$@"
69+
run: ./DMCompiler_linux-x64/DMCompiler nebula.dme --define=UNIT_TEST --suppress-unimplemented --skip-anything-typecheck --version=${BYOND_MAJOR}.${BYOND_MINOR} | bash test/annotate_od.sh
7570
Code:
7671
runs-on: ubuntu-22.04
7772
steps:

code/__defines/MC.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
if (Datum.is_processing) {\
2525
if(Datum.is_processing != #Processor)\
2626
{\
27-
PRINT_STACK_TRACE("Failed to start processing. [log_info_line(Datum)] is already being processed by [Datum.is_processing] but queue attempt occured on [#Processor]."); \
27+
PRINT_STACK_TRACE("Failed to start processing. [log_info_line(Datum)] is already being processed by [Datum.is_processing] but queue attempt occurred on [#Processor]."); \
2828
}\
2929
} else {\
3030
Datum.is_processing = Processor._internal_name;\
@@ -36,7 +36,7 @@ if(Datum.is_processing) {\
3636
if(Processor.processing.Remove(Datum)) {\
3737
Datum.is_processing = null;\
3838
} else {\
39-
PRINT_STACK_TRACE("Failed to stop processing. [log_info_line(Datum)] is being processed by [Datum.is_processing] but de-queue attempt occured on [#Processor]."); \
39+
PRINT_STACK_TRACE("Failed to stop processing. [log_info_line(Datum)] is being processed by [Datum.is_processing] but de-queue attempt occurred on [#Processor]."); \
4040
}\
4141
}
4242

code/__defines/bodytype.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
// Bodytype feature flags
1919
/// Does not create DNA. Replaces SPECIES_FLAG_NO_SCAN.
2020
#define BODY_FLAG_NO_DNA BITFLAG(0)
21-
/// Cannot suffer halloss/recieves deceptive health indicator.
21+
/// Cannot suffer halloss/receives deceptive health indicator.
2222
#define BODY_FLAG_NO_PAIN BITFLAG(1)
2323
/// Cannot eat food/drink drinks even if a stomach organ is present.
2424
#define BODY_FLAG_NO_EAT BITFLAG(2)

code/__defines/flags.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ The latter will result in a linter warning and will not work correctly.
8686
#define ITEM_FLAG_PADDED BITFLAG(13) // When set on gloves, will act like pulling punches in unarmed combat.
8787
#define ITEM_FLAG_CAN_TAPE BITFLAG(14) // Whether the item can be taped onto something using tape
8888
#define ITEM_FLAG_IS_WEAPON BITFLAG(15) // Item is considered a weapon. Currently only used for force-based worth calculation.
89+
#define ITEM_FLAG_MAGNETISED BITFLAG(16) // When worn on feet and standing on an appropriate spot, will prevent slipping.
8990

9091
// Flags for pass_flags (/atom/var/pass_flags)
9192
#define PASS_FLAG_TABLE BITFLAG(0)

code/__defines/hud.dm

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,31 @@
1-
// Keys used to set and retrieve icons from the UI decl system.
2-
#define UI_ICON_INTERACTION "icon_interaction"
3-
#define UI_ICON_ZONE_SELECT "icon_zone_sel"
4-
#define UI_ICON_MOVEMENT "icon_movement"
5-
#define UI_ICON_INVENTORY "icon_inventory"
6-
#define UI_ICON_ATTACK "icon_attack"
7-
#define UI_ICON_HANDS "icon_hands"
8-
#define UI_ICON_INTERNALS "icon_internals"
9-
#define UI_ICON_HEALTH "icon_health"
10-
#define UI_ICON_CRIT_MARKER "icon_crit_marker"
11-
#define UI_ICON_NUTRITION "icon_nutrition"
12-
#define UI_ICON_HYDRATION "icon_hydration"
13-
#define UI_ICON_FIRE_INTENT "icon_fire_intent"
14-
#define UI_ICON_UP_HINT "icon_uphint"
15-
#define UI_ICON_STATUS "icon_status"
16-
#define UI_ICON_STATUS_FIRE "icon_status_fire"
17-
#define UI_ICON_CHARGE "icon_charge"
1+
// Keys used to create HUD elements, and to set and retrieve icons from the UI decl system.
2+
#define HUD_STAMINA /decl/hud_element/stamina
3+
#define HUD_DROP /decl/hud_element/drop
4+
#define HUD_RESIST /decl/hud_element/resist
5+
#define HUD_THROW /decl/hud_element/throw_toggle
6+
#define HUD_MANEUVER /decl/hud_element/maneuver
7+
#define HUD_ZONE_SELECT /decl/hud_element/zone_selector
8+
#define HUD_MOVEMENT /decl/hud_element/movement
9+
#define HUD_INVENTORY /decl/hud_element/inventory
10+
#define HUD_ATTACK /decl/hud_element/attack
11+
#define HUD_HANDS /decl/hud_element/hands
12+
#define HUD_INTERNALS /decl/hud_element/internals
13+
#define HUD_HEALTH /decl/hud_element/health
14+
#define HUD_INTENT /decl/hud_element/intent
15+
#define HUD_CRIT_MARKER /decl/hud_element/crit
16+
#define HUD_NUTRITION /decl/hud_element/nutrition
17+
#define HUD_HYDRATION /decl/hud_element/hydration
18+
#define HUD_FIRE_INTENT /decl/hud_element/gun_mode
19+
#define HUD_UP_HINT /decl/hud_element/upward
20+
#define HUD_BODYTEMP /decl/hud_element/bodytemp
21+
#define HUD_PRESSURE /decl/hud_element/pressure
22+
#define HUD_TOX /decl/hud_element/toxins
23+
#define HUD_OXY /decl/hud_element/oxygen
24+
#define HUD_FIRE /decl/hud_element/fire
25+
#define HUD_CHARGE /decl/hud_element/charge
26+
#define HUD_ROBOT_MODULE /decl/hud_element/module_selection
1827

1928
#define GET_HUD_ALERT(M, A) ((istype(M?.hud_used, /datum/hud) && (A in M.hud_used.alerts)) ? M.hud_used.alerts[A] : 0)
20-
2129
#define CLEAR_HUD_ALERTS(M) if(istype(M?.hud_used, /datum/hud) && M.hud_used.alerts) { M.hud_used.alerts = null; }
2230
#define SET_HUD_ALERT(M, A, V) if(istype(M?.hud_used, /datum/hud)) { LAZYSET(M.hud_used.alerts, A, V); }
2331
#define SET_HUD_ALERT_MIN(M, A, V) if(istype(M?.hud_used, /datum/hud) && V < LAZYACCESS(M.hud_used.alerts, A)) { LAZYSET(M.hud_used.alerts, A, V); }

code/__defines/machinery.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ var/global/defer_powernet_rebuild = 0 // True if net rebuild will be called
155155
#define PART_CARD /obj/item/stock_parts/computer/card_slot // ID Card slot component of this computer. Mostly for HoP modification console that needs ID slot for modification.
156156
#define PART_PRINTER /obj/item/stock_parts/computer/nano_printer // Nano Printer component of this computer, for your everyday paperwork needs.
157157
#define PART_DRIVE /obj/item/stock_parts/computer/hard_drive/portable // Portable data storage
158-
#define PART_AI /obj/item/stock_parts/computer/ai_slot // AI slot, an intellicard housing that allows modifications of AIs.
158+
#define PART_AI /obj/item/stock_parts/computer/ai_slot // AI slot, an intelliCard housing that allows modifications of AIs.
159159
#define PART_TESLA /obj/item/stock_parts/computer/tesla_link // Tesla Link, Allows remote charging from nearest APC.
160160
#define PART_SCANNER /obj/item/stock_parts/computer/scanner // One of several optional scanner attachments.
161161
#define PART_D_SLOT /obj/item/stock_parts/computer/drive_slot // Portable drive slot.

code/__defines/misc.dm

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,11 @@
142142
#define CONFIG_SERVER_JOIN_WHITELIST 3
143143
#define CONFIG_SERVER_CONNECT_WHITELIST 4
144144

145+
// Coating name color config enums
146+
#define CONFIG_COATING_COLOR_NONE 1
147+
#define CONFIG_COATING_COLOR_MIXTURE 2
148+
#define CONFIG_COATING_COLOR_COMPONENTS 3
149+
145150
// Location for server whitelist file to load from.
146151
#define CONFIG_SERVER_WHITELIST_FILE "config/server_whitelist.txt"
147152

@@ -252,6 +257,7 @@
252257

253258
//Inserts 'a' or 'an' before X in ways \a doesn't allow
254259
#define ADD_ARTICLE(X) "[(lowertext(X[1]) in global.vowels) ? "an" : "a"] [X]"
260+
#define ADD_ARTICLE_GENDER(X, GENDER) (GENDER == PLURAL ? "some [X]" : ADD_ARTICLE(X))
255261

256262
//Request Console Department Types
257263
#define RC_ASSIST 1 //Request Assistance
@@ -376,5 +382,11 @@
376382
#define CRAYON_DRAW_LETTER "letter"
377383
#define CRAYON_DRAW_ARROW "arrow"
378384

385+
// Enum for results of is_space_movement_permitted()
386+
#define SPACE_MOVE_SUPPORTED (-1)
387+
#define SPACE_MOVE_FORBIDDEN 0
388+
#define SPACE_MOVE_PERMITTED 1
389+
379390
// Default UI style applied to client prefs.
380391
#define DEFAULT_UI_STYLE /decl/ui_style/midnight
392+

code/__defines/mobs.dm

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,6 @@
272272

273273
#define SPECIES_HUMAN "Human"
274274
#define SPECIES_MONKEY "Monkey"
275-
#define SPECIES_ALIEN "Humanoid"
276-
#define SPECIES_GOLEM "Golem"
277275

278276
#define SURGERY_CLOSED 0
279277
#define SURGERY_OPEN 1

code/__defines/subsystems.dm

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@
4343
#define SS_INIT_OVERLAY 1
4444
#define SS_INIT_DEFAULT 0
4545
#define SS_INIT_AIR -1
46-
#define SS_INIT_VIS_CONTENTS -2
47-
#define SS_INIT_MISC_LATE -3
48-
#define SS_INIT_MISC_CODEX -4
49-
#define SS_INIT_ALARM -5
50-
#define SS_INIT_SHUTTLE -6
51-
#define SS_INIT_GOALS -7
52-
#define SS_INIT_LIGHTING -8
53-
#define SS_INIT_WEATHER -9
46+
#define SS_INIT_MISC_LATE -2
47+
#define SS_INIT_MISC_CODEX -3
48+
#define SS_INIT_ALARM -4
49+
#define SS_INIT_SHUTTLE -5
50+
#define SS_INIT_GOALS -6
51+
#define SS_INIT_LIGHTING -7
52+
#define SS_INIT_WEATHER -8
53+
#define SS_INIT_VIS_CONTENTS -9
5454
#define SS_INIT_ZCOPY -10
5555
#define SS_INIT_HOLOMAP -11
5656
#define SS_INIT_XENOARCH -12

code/_helpers/animations.dm

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,20 @@
6969
animate(time = 1)
7070
animate(alpha = 0, time = 3, easing = CIRCULAR_EASING|EASE_OUT)
7171

72+
// Shake animation stolen from Polaris.
73+
/atom
74+
/// How much to shake the atom when struck.
75+
/// Larger objs should have smaller numbers or it looks weird.
76+
var/shake_animation_degrees = 4
77+
7278
/atom/proc/shake_animation(var/intensity = 8)
7379
var/init_px = pixel_x
7480
var/shake_dir = pick(-1, 1)
75-
animate(src, transform=turn(matrix(), intensity*shake_dir), pixel_x=init_px + 2*shake_dir, time=1)
76-
animate(transform=null, pixel_x=init_px, time=6, easing=ELASTIC_EASING)
81+
var/matrix/M = matrix()
82+
M.Scale(icon_scale_x, icon_scale_y)
83+
M.Translate(0, 16*(icon_scale_y-1))
84+
animate(src, transform=turn(M, shake_animation_degrees * shake_dir), pixel_x=init_px + 2*shake_dir, time=1)
85+
animate(transform=M, pixel_x=init_px, time=6, easing=ELASTIC_EASING)
7786

7887
/atom/proc/SpinAnimation(speed = 10, loops = -1, clockwise = 1, segments = 3, parallel = TRUE)
7988
if(!segments)

0 commit comments

Comments
 (0)